function orderMenu(array $subMenu, $pathPrefix) { foreach ($subMenu as $element => $submenu) { $content = new Content($pathPrefix . $element . '.md'); $order = 99; if ($content->getVar('menu_order') != '') { $order = $content->getVar('menu_order'); } if ($content->getVar('menu_display') != 'false') { $mainMenu[$order . '_' . $element] = array(); if (is_array($submenu)) { $mainMenu[$order . '_' . $element] = orderMenu($submenu, $pathPrefix . $element . '|'); } } } return $mainMenu; }
break; case "remove": if ($msg = TrashMenusection($cid)) { mosRedirect('index2.php?option=' . $option . '&menutype=' . $menutype . '&mosmsg= ' . $msg); } else { mosRedirect('index2.php?option=' . $option . '&menutype=' . $menutype); } break; case 'cancel': cancelMenu($option); break; case 'orderup': orderMenu($cid[0], -1, $option); break; case 'orderdown': orderMenu($cid[0], 1, $option); break; case 'accesspublic': accessMenu($cid[0], 0, $option, $menutype); break; case 'accessregistered': accessMenu($cid[0], 1, $option, $menutype); break; case 'accessspecial': accessMenu($cid[0], 2, $option, $menutype); break; case 'movemenu': moveMenu($option, $cid, $menutype); break; case 'movemenusave': moveMenuSave($option, $cid, $menu, $menutype);
break; case 'publish': case 'unpublish': publishMenuSection($cid, $task == 'publish', $menutype); break; case 'remove': TrashMenusection($cid, $menutype); break; case 'cancel': cancelMenu($option); break; case 'orderup': orderMenu(intval($cid[0]), -1, $option); break; case 'orderdown': orderMenu(intval($cid[0]), 1, $option); break; case 'accesspublic': accessMenu(intval($cid[0]), 0, $option, $menutype); break; case 'accessregistered': accessMenu(intval($cid[0]), 1, $option, $menutype); break; case 'accessspecial': accessMenu(intval($cid[0]), 2, $option, $menutype); break; case 'movemenu': moveMenu($option, $cid, $menutype); break; case 'movemenusave': moveMenuSave($option, $cid, $menu, $menutype);