mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-02-06 16:09:20 +00:00
Menu: PHP 8.1 updates
This commit is contained in:
@@ -25,7 +25,7 @@
|
||||
*/
|
||||
|
||||
//check permissions
|
||||
if (!$included) {
|
||||
if(!defined('STDIN')) {
|
||||
//set the include path
|
||||
$conf = glob("{/usr/local/etc,/etc}/fusionpbx/config.conf", GLOB_BRACE);
|
||||
set_include_path(parse_ini_file($conf[0])['document.root']);
|
||||
@@ -47,13 +47,15 @@
|
||||
$text = $language->get();
|
||||
|
||||
//get the http value and set as a php variable
|
||||
if (!$included) {
|
||||
if (!empty($_REQUEST["menu_uuid"])) {
|
||||
$menu_uuid = $_REQUEST["menu_uuid"];
|
||||
}
|
||||
if (!empty($_REQUEST["menu_language"])) {
|
||||
$menu_language = $_REQUEST["menu_language"];
|
||||
}
|
||||
|
||||
//menu restore default
|
||||
require_once "resources/classes/menu.php";
|
||||
//require_once "resources/classes/menu.php";
|
||||
$menu = new menu;
|
||||
$menu->menu_uuid = $menu_uuid;
|
||||
$menu->menu_language = $menu_language;
|
||||
@@ -68,7 +70,7 @@
|
||||
unset($menu);
|
||||
|
||||
//redirect
|
||||
if (!$included) {
|
||||
if(!defined('STDIN')) {
|
||||
//show a message to the user
|
||||
message::add($text['message-restore']);
|
||||
header("Location: ".PROJECT_PATH."/core/menu/menu_edit.php?id=".urlencode($menu_uuid));
|
||||
|
||||
Reference in New Issue
Block a user