$smarty->assign('not_global', false);
} else {
    $smarty->assign('not_global', true);
}
$smarty->assign('not_default', false);
if ($section == 'global') {
    global $cachelib;
    if ($defprefs = $cachelib->getSerialized("tiki_default_preferences_cache")) {
        if ($defprefs['toolbar_global' . ($comments ? '_comments' : '')] != $current) {
            $smarty->assign('not_default', true);
        }
    }
}
if (!empty($_REQUEST['delete_tool']) && !empty($_REQUEST['tool_name'])) {
    // input from the tool edit form
    Toolbar::deleteTool($_REQUEST['tool_name']);
    if (strpos($_REQUEST['tool_name'], $current) !== false) {
        $current = str_replace($_REQUEST['tool_name'], '', $current);
        $current = str_replace(',,', ',', $current);
        $prefName = 'toolbar_' . $section . ($comments ? '_comments' : '');
        $tikilib->set_preference($prefName, $current);
    }
}
if (!empty($current)) {
    $current = preg_replace('/\\s+/', '', $current);
    $current = trim($current, '/');
    $current = explode('/', $current);
    $loadedRows = count($current);
    foreach ($current as &$line) {
        $bits = explode('|', $line);
        $line = array();