mirror of
https://github.com/e107inc/e107.git
synced 2025-07-31 20:00:37 +02:00
Update routine improvements. Check for plugin xxxx_setup.php during db-verify
This commit is contained in:
@@ -231,7 +231,7 @@ class e107Update
|
||||
|
||||
function updatePlugin($path)
|
||||
{
|
||||
e107::getPlugin()->install_plugin_xml($path, 'upgrade');
|
||||
e107::getPlugin()->install_plugin_xml($path, 'upgrade');
|
||||
}
|
||||
|
||||
|
||||
|
@@ -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)
|
||||
{
|
||||
|
@@ -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 = "<table border='1'>
|
||||
$debug = "<table class='table' border='1'>
|
||||
<tr><td style='padding:5px;font-weight:bold'>FILE: ".$tbl." (key=".$key.")</td>
|
||||
<td style='padding:5px;font-weight:bold'>SQL: ".$tbl."</td>
|
||||
</tr>
|
||||
|
Reference in New Issue
Block a user