From 46190fadb48934e26c4b2c520b208a0aee5692ca Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Thu, 27 Jan 2022 09:07:59 -0700 Subject: [PATCH] Update upgrade.php --- core/upgrade/upgrade.php | 23 ++++++++++++++++------- 1 file changed, 16 insertions(+), 7 deletions(-) diff --git a/core/upgrade/upgrade.php b/core/upgrade/upgrade.php index 79f749f791..01a0df57ca 100644 --- a/core/upgrade/upgrade.php +++ b/core/upgrade/upgrade.php @@ -80,6 +80,7 @@ //restore the default menu if ($upgrade_type == 'menu') { + //get the menu uuid and language $sql = "select menu_uuid, menu_language from v_menus "; $sql .= "where menu_name = :menu_name "; @@ -91,14 +92,22 @@ $menu_language = $row["menu_language"]; } unset($sql, $parameters, $row); + + //show the menu + if (isset($argv[2]) && $argv[2] == 'view') { + print_r($_SESSION["menu"]); + } + + //set the menu back to default + if (isset($argv[2]) && (is_null($argv[2]) || $argv[2] == 'default')) { + //restore the menu + $included = true; + require_once("core/menu/menu_restore_default.php"); + unset($sel_menu); - //restore the menu - $included = true; - require_once("core/menu/menu_restore_default.php"); - unset($sel_menu); - - //send message to the console - echo $text['message-upgrade_menu']."\n"; + //send message to the console + echo $text['message-upgrade_menu']."\n"; + } } //restore the default permissions