mirror of
https://github.com/fusionpbx/fusionpbx.git
synced 2026-01-06 11:43:50 +00:00
Update schema.php
Deprecate global upgrade_data_types variable and replace with a $this->data_types
This commit is contained in:
@@ -34,6 +34,7 @@ if (!class_exists('schema')) {
|
|||||||
public $apps;
|
public $apps;
|
||||||
public $db_type;
|
public $db_type;
|
||||||
public $result;
|
public $result;
|
||||||
|
public $data_types;
|
||||||
|
|
||||||
//class constructor
|
//class constructor
|
||||||
public function __construct() {
|
public function __construct() {
|
||||||
@@ -463,8 +464,9 @@ if (!class_exists('schema')) {
|
|||||||
public function schema ($format = '') {
|
public function schema ($format = '') {
|
||||||
|
|
||||||
//set the global variable
|
//set the global variable
|
||||||
global $db, $upgrade_data_types, $text,$output_format;
|
global $db, $text, $output_format;
|
||||||
if ($format=='') $format = $output_format;
|
|
||||||
|
if ($format == '') $format = $output_format;
|
||||||
|
|
||||||
//get the db variables
|
//get the db variables
|
||||||
require_once "resources/classes/config.php";
|
require_once "resources/classes/config.php";
|
||||||
@@ -665,7 +667,7 @@ if (!class_exists('schema')) {
|
|||||||
|
|
||||||
//change the data type if it has been changed
|
//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 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);
|
$db_field_type = $this->db_column_data_type ($db_type, $db_name, $table_name, $field_name);
|
||||||
$field_type_array = explode("(", $field_type);
|
$field_type_array = explode("(", $field_type);
|
||||||
$field_type = $field_type_array[0];
|
$field_type = $field_type_array[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user