本文整理匯總了PHP中Toolbar::saveTool方法的典型用法代碼示例。如果您正苦於以下問題:PHP Toolbar::saveTool方法的具體用法?PHP Toolbar::saveTool怎麽用?PHP Toolbar::saveTool使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Toolbar
的用法示例。
在下文中一共展示了Toolbar::saveTool方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的PHP代碼示例。
示例1: header
}
if (isset($_REQUEST['save'], $_REQUEST['pref'])) {
$prefName = 'toolbar_' . $section . ($comments ? '_comments' : '');
$tikilib->set_preference($prefName, $_REQUEST['pref']);
$tikilib->set_preference($prefName . 'modified', 'y');
}
if (isset($_REQUEST['reset']) && $section != 'global' || isset($_REQUEST['reset_global']) && $section == 'global') {
$prefName = 'toolbar_' . $section . ($comments ? '_comments' : '');
$tikilib->delete_preference($prefName);
$tikilib->set_preference($prefName . 'modified', 'n');
$smarty->loadPlugin('smarty_function_query');
header('location: ?' . smarty_function_query(array('_urlencode' => 'n'), $smarty));
}
if (!empty($_REQUEST['save_tool']) && !empty($_REQUEST['tool_name'])) {
// input from the tool edit form
Toolbar::saveTool($_REQUEST['tool_name'], $_REQUEST['tool_label'], $_REQUEST['tool_icon'], $_REQUEST['tool_token'], $_REQUEST['tool_syntax'], $_REQUEST['tool_type'], $_REQUEST['tool_plugin']);
$smarty->loadPlugin('smarty_function_query');
header('location: ?' . smarty_function_query(array('_urlencode' => 'n'), $smarty));
}
$current = $tikilib->get_preference('toolbar_' . $section . ($comments ? '_comments' : ''));
if (empty($current)) {
$current = $tikilib->get_preference('toolbar_global' . ($comments ? '_comments' : ''));
$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) {