From 69541f560b96439b7bd7aece1e37fe8fef128484 Mon Sep 17 00:00:00 2001 From: FusionPBX Date: Wed, 21 Oct 2020 14:28:15 -0600 Subject: [PATCH] Update schema.php Deprecate global upgrade_data_types variable and replace with a $this->data_types --- resources/classes/schema.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/resources/classes/schema.php b/resources/classes/schema.php index 31dc2ee347..c898c807e7 100644 --- a/resources/classes/schema.php +++ b/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];