浏览代码

Update schema.php

Deprecate global upgrade_data_types variable and replace with a $this->data_types
FusionPBX 4 年之前
父节点
当前提交
d81ad219ab
共有 1 个文件被更改,包括 5 次插入3 次删除
  1. 5 3
      resources/classes/schema.php

+ 5 - 3
resources/classes/schema.php

@@ -34,6 +34,7 @@ if (!class_exists('schema')) {
 			public $apps;
 			public $db_type;
 			public $result;
+			public $data_types;
 
 		//class constructor
 			public function __construct() {
@@ -463,8 +464,9 @@ if (!class_exists('schema')) {
 			public function schema ($format = '') {
  
  				//set the global variable
-					global $db, $upgrade_data_types, $text,$output_format;
-					if ($format=='') $format = $output_format;
+					global $db, $text, $output_format;
+
+					if ($format == '') $format = $output_format;
 
 				//get the db variables
 					require_once "resources/classes/config.php";
@@ -665,7 +667,7 @@ if (!class_exists('schema')) {
 
 												//change the data type if it has been changed
 													//if the data type in the app db array is different than the type in the database then change the data type
-													if ($upgrade_data_types) {
+													if ($this->data_types) {
 														$db_field_type = $this->db_column_data_type ($db_type, $db_name, $table_name, $field_name);
 														$field_type_array = explode("(", $field_type);
 														$field_type = $field_type_array[0];