diff --git a/e107_admin/e107_update.php b/e107_admin/e107_update.php index f1d8af4ae..b319fe2e1 100644 --- a/e107_admin/e107_update.php +++ b/e107_admin/e107_update.php @@ -231,7 +231,7 @@ class e107Update function updatePlugin($path) { - e107::getPlugin()->install_plugin_xml($path, 'upgrade'); + e107::getPlugin()->install_plugin_xml($path, 'upgrade'); } diff --git a/e107_admin/update_routines.php b/e107_admin/update_routines.php index d3c05452b..c6695fc08 100644 --- a/e107_admin/update_routines.php +++ b/e107_admin/update_routines.php @@ -957,7 +957,9 @@ function update_706_to_800($type='') require_once(e_HANDLER."db_verify_class.php"); $dbv = new db_verify; - $dbv->compareAll(); // core & plugins + $exclude = array_keys(e107::getPlugin()->updateRequired()); // search xxxxx_setup.php and check for 'upgrade_required()' == true. + + $dbv->compareAll($exclude); // core & plugins, but not plugins calling for an update with xxxxx_setup.php if(count($dbv->errors)) { @@ -968,17 +970,18 @@ function update_706_to_800($type='') return update_needed("Database Tables require updating."); } + $dbv->compileResults(); + $dbv->runFix(); // Fix entire core database structure and plugins too. } - - $dbv->compileResults(); + // print_a($dbv->results); // print_a($dbv->fixList); - $dbv->runFix(); // Fix entire core database structure. + //TODO - send notification messages to Log. - if($sql->gen("SELECT * FROM #page WHERE page_theme != '' AND menu_title = '' LIMIT 1")) + if($sql->field('page','page_theme') && $sql->gen("SELECT * FROM #page WHERE page_theme != '' AND menu_title = '' LIMIT 1")) { if ($just_check) { diff --git a/e107_handlers/db_verify_class.php b/e107_handlers/db_verify_class.php index 58abfc8c3..9b5d509c6 100644 --- a/e107_handlers/db_verify_class.php +++ b/e107_handlers/db_verify_class.php @@ -155,9 +155,15 @@ class db_verify /** * Check core tables and installed plugin tables + * @param $exclude - array of plugins to exclude. */ - function compareAll() + function compareAll($exclude = array()) { + foreach($exclude as $val) + { + unset($this->tables[$val]); + } + $dtables = array_keys($this->tables); foreach($dtables as $tb) @@ -175,6 +181,7 @@ class db_verify } + @@ -225,7 +232,7 @@ class db_verify if(isset($debugA) && (e_PAGE == 'db.php')) { - $debug = " + $debug = "
FILE: ".$tbl." (key=".$key.") SQL: ".$tbl."