diff --git a/e107_handlers/e_db_pdo_class.php b/e107_handlers/e_db_pdo_class.php index a24072773..55f4e19f7 100644 --- a/e107_handlers/e_db_pdo_class.php +++ b/e107_handlers/e_db_pdo_class.php @@ -9,13 +9,10 @@ define('MYSQL_ASSOC', 1); define('MYSQL_NUM', 2); define('MYSQL_BOTH', 3); -define('ALLOW_AUTO_FIELD_DEFS', true); require_once('e_db_interface.php'); require_once('e_db_legacy_trait.php'); - - /** * PDO MySQL class. All legacy mysql_ methods removed. * Class e_db_pdo @@ -775,7 +772,7 @@ class e_db_pdo implements e_db // See if we need to auto-add field types array - if(!isset($arg['_FIELD_TYPES']) && defined('ALLOW_AUTO_FIELD_DEFS') && ALLOW_AUTO_FIELD_DEFS === true) + if(!isset($arg['_FIELD_TYPES'])) { $arg = array_merge($arg, $this->getFieldDefs($tableName)); } @@ -984,7 +981,7 @@ class e_db_pdo implements e_db if(!isset($arg['data'])) { return false; } // See if we need to auto-add field types array - if(!isset($arg['_FIELD_TYPES']) && ALLOW_AUTO_FIELD_DEFS) + if(!isset($arg['_FIELD_TYPES'])) { $arg = array_merge($arg, $this->getFieldDefs($tableName)); } diff --git a/e107_handlers/mysql_class.php b/e107_handlers/mysql_class.php index 5de917a5b..88ebafd52 100644 --- a/e107_handlers/mysql_class.php +++ b/e107_handlers/mysql_class.php @@ -25,14 +25,6 @@ * Always use $this->getConfig() method to avoid issues pointed above */ -/* - Parameters related to auto-generation of field definitions on db_Insert() and db_Update() -*/ - define('ALLOW_AUTO_FIELD_DEFS', TRUE); // Temporary so new functionality can be disabled if it causes problems - // Uses it's own cache directory now - see e_CACHE_DB - //define('e_DB_CACHE', e_CACHE); - - if(defined('MYSQL_LIGHT')) { define('E107_DEBUG_LEVEL', 0); @@ -927,7 +919,7 @@ class e_db_mysql implements e_db // See if we need to auto-add field types array - if(!isset($arg['_FIELD_TYPES']) && ALLOW_AUTO_FIELD_DEFS) + if(!isset($arg['_FIELD_TYPES'])) { $arg = array_merge($arg, $this->getFieldDefs($tableName)); } @@ -1161,7 +1153,7 @@ class e_db_mysql implements e_db if(!isset($arg['data'])) { return false; } // See if we need to auto-add field types array - if(!isset($arg['_FIELD_TYPES']) && ALLOW_AUTO_FIELD_DEFS) + if(!isset($arg['_FIELD_TYPES'])) { $arg = array_merge($arg, $this->getFieldDefs($tableName)); }