Browse Source

Add missing resources/require.php

FusionPBX 2 years ago
parent
commit
7f89eb96e9
1 changed files with 9 additions and 8 deletions
  1. 9 8
      core/upgrade/upgrade_schema.php

+ 9 - 8
core/upgrade/upgrade_schema.php

@@ -34,14 +34,11 @@
 		set_include_path(parse_ini_file($conf[0])['document.root']);
 		set_include_path(parse_ini_file($conf[0])['document.root']);
 
 
 		//includes files
 		//includes files
+		require_once "resources/require.php";
 		include "resources/functions.php";
 		include "resources/functions.php";
-		require_once "resources/classes/text.php";
-		$_SERVER["DOCUMENT_ROOT"] = $document_root;
-		$format = 'text'; //html, text
 
 
-		//add multi-lingual support
-		$language = new text;
-		$text = $language->get();
+		//set the format
+		$format = 'text'; //html, text
 	}
 	}
 	else if (!$included) {
 	else if (!$included) {
 		//set the include path
 		//set the include path
@@ -58,13 +55,17 @@
 			echo "access denied";
 			echo "access denied";
 			exit;
 			exit;
 		}
 		}
-
 		require_once "resources/header.php";
 		require_once "resources/header.php";
-		$document['title'] = $text['title-upgrade_schema'];
 
 
+		//set the title and format
+		$document['title'] = $text['title-upgrade_schema'];
 		$format = 'html'; //html, text
 		$format = 'html'; //html, text
 	}
 	}
 
 
+//add multi-lingual support
+	$language = new text;
+	$text = $language->get();
+
 //get the database schema put it into an array then compare and update the database as needed.
 //get the database schema put it into an array then compare and update the database as needed.
 	require_once "resources/classes/schema.php";
 	require_once "resources/classes/schema.php";
 	$obj = new schema;
 	$obj = new schema;