Commit 7eb8e3bf authored by Jonny Bradley's avatar Jonny Bradley

[FIX] menus: Show raw wiki syntax in menu item admin instead of parsed result...

[FIX] menus: Show raw wiki syntax in menu item admin instead of parsed result (if menu parse is set)
parent 21387e4f
......@@ -589,7 +589,7 @@ class MenuLib extends TikiLib
return $res;
}
public function list_menu_options($menuId, $offset=0, $maxRecords=-1, $sort_mode='position_asc', $find='', $full=false, $level=0)
public function list_menu_options($menuId, $offset=0, $maxRecords=-1, $sort_mode='position_asc', $find='', $full=false, $level=0, $do_not_parse = false)
{
global $user, $tiki_p_admin, $prefs;
$wikilib = TikiLib::lib('wiki');
......@@ -616,7 +616,7 @@ class MenuLib extends TikiLib
$ret = array();
foreach ($result as $res) {
$res['canonic'] = $res['url'];
if (isset($menu['parse']) && $menu['parse'] === 'y') {
if (!$do_not_parse && isset($menu['parse']) && $menu['parse'] === 'y') {
$res['name'] = $wikilib->parse_data($res['name'], array('is_html' => ($prefs['menus_item_names_raw'] === 'y')));
}
if (preg_match('|^\(\((.+?)\)\)$|', $res['url'], $matches)) {
......
......@@ -145,7 +145,7 @@ $smarty->assign_by_ref('maxRecords', $maxRecords);
$smarty->assign_by_ref('sort_mode', $sort_mode);
$allchannels = $menulib->list_menu_options($_REQUEST["menuId"], 0, -1, $sort_mode, $find);
$allchannels = $menulib->sort_menu_options($allchannels);
$channels = $menulib->list_menu_options($_REQUEST["menuId"], $offset, $maxRecords, $sort_mode, $find, true);
$channels = $menulib->list_menu_options($_REQUEST["menuId"], $offset, $maxRecords, $sort_mode, $find, true, 0, true);
$channels = $menulib->describe_menu_types($channels);
$smarty->assign_by_ref('cant_pages', $channels["cant"]);
$smarty->assign_by_ref('channels', $channels["data"]);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment