Update menu_restore_default.php
This commit is contained in:
@@ -17,7 +17,7 @@
|
|||||||
|
|
||||||
The Initial Developer of the Original Code is
|
The Initial Developer of the Original Code is
|
||||||
Mark J Crane <markjcrane@fusionpbx.com>
|
Mark J Crane <markjcrane@fusionpbx.com>
|
||||||
Portions created by the Initial Developer are Copyright (C) 2008-2014
|
Portions created by the Initial Developer are Copyright (C) 2008-2019
|
||||||
the Initial Developer. All Rights Reserved.
|
the Initial Developer. All Rights Reserved.
|
||||||
|
|
||||||
Contributor(s):
|
Contributor(s):
|
||||||
@@ -56,19 +56,20 @@
|
|||||||
$menu->menu_language = $menu_language;
|
$menu->menu_language = $menu_language;
|
||||||
$menu->delete();
|
$menu->delete();
|
||||||
$menu->restore();
|
$menu->restore();
|
||||||
|
unset($menu);
|
||||||
|
|
||||||
//unset the menu session variable
|
//get the menu array and save it to the session
|
||||||
$_SESSION["menu"] = "";
|
$menu = new menu;
|
||||||
|
$menu->menu_uuid = $_SESSION['domain']['menu']['uuid'];
|
||||||
//unset the default template
|
$_SESSION['menu']['array'] = $menu->menu_array();
|
||||||
$_SESSION["template_content"] = '';
|
unset($menu);
|
||||||
|
|
||||||
//redirect
|
//redirect
|
||||||
if (!$included) {
|
if (!$included) {
|
||||||
//show a message to the user
|
//show a message to the user
|
||||||
message::add($text['message-restore']);
|
message::add($text['message-restore']);
|
||||||
header("Location: ".PROJECT_PATH."/core/menu/menu_edit.php?id=".$menu_uuid);
|
header("Location: ".PROJECT_PATH."/core/menu/menu_edit.php?id=".urlencode($menu_uuid));
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
?>
|
?>
|
||||||
|
|||||||
Reference in New Issue
Block a user