浏览代码

Update upgrade.php

FusionPBX 3 年之前
父节点
当前提交
b5899b3777
共有 1 个文件被更改,包括 16 次插入7 次删除
  1. 16 7
      core/upgrade/upgrade.php

+ 16 - 7
core/upgrade/upgrade.php

@@ -80,6 +80,7 @@
 
 
 //restore the default menu
 //restore the default menu
 	if ($upgrade_type == 'menu') {
 	if ($upgrade_type == 'menu') {
+
 		//get the menu uuid and language
 		//get the menu uuid and language
 		$sql = "select menu_uuid, menu_language from v_menus ";
 		$sql = "select menu_uuid, menu_language from v_menus ";
 		$sql .= "where menu_name = :menu_name ";
 		$sql .= "where menu_name = :menu_name ";
@@ -91,14 +92,22 @@
 			$menu_language = $row["menu_language"];
 			$menu_language = $row["menu_language"];
 		}
 		}
 		unset($sql, $parameters, $row);
 		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
 //restore the default permissions