mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-29 16:55:05 +02:00
Added a special behaviour when the section is 'mobile' to get the Pandora FMS mobile sections
This commit is contained in:
parent
3dcb6a14a2
commit
dcee34c715
@ -18,7 +18,29 @@ if ($get_sec_pages) {
|
|||||||
$sec = get_parameter('sec');
|
$sec = get_parameter('sec');
|
||||||
$menu_hash = get_parameter('menu_hash');
|
$menu_hash = get_parameter('menu_hash');
|
||||||
|
|
||||||
$pages = menu_get_sec_pages($sec,$menu_hash);
|
// WARNING: 'mobile' is a very special section
|
||||||
|
if ($sec === 'mobile') {
|
||||||
|
global $config;
|
||||||
|
require_once($config['homedir']."/mobile/operation/home.php");
|
||||||
|
|
||||||
|
$home = new Home();
|
||||||
|
$pagesItems = $home->getPagesItems();
|
||||||
|
|
||||||
|
if (empty($pagesItems)) {
|
||||||
|
$pagesItems = array();
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
ksort($pagesItems);
|
||||||
|
}
|
||||||
|
|
||||||
|
$pages = array();
|
||||||
|
foreach ($pagesItems as $page => $data) {
|
||||||
|
$pages[$page] = $data['name'];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$pages = menu_get_sec_pages($sec,$menu_hash);
|
||||||
|
}
|
||||||
|
|
||||||
echo json_encode($pages);
|
echo json_encode($pages);
|
||||||
return;
|
return;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user