1
0
mirror of https://github.com/e107inc/e107.git synced 2025-08-02 12:48:26 +02:00

Fixes the "dbupdate after a clean install" issue

The "isset" statement tested on a key in array "core_plugins", but the keys of that array were numeric.
So the "isset" was always false and the statements within the if clause were always executed.
That resulted for some reason in a "false positive" on the "featurebox" plugin, in case was not installed at this moment.
This commit is contained in:
Achim Ennenbach
2018-07-20 21:25:40 +02:00
parent 6ab8c5c0f3
commit 2990b57485

View File

@@ -1303,7 +1303,7 @@ class e107plugin
continue; continue;
} }
if(!isset($this->core_plugins[$path])) // check non-core plugins for sql file changes. if(!is_array($path, $this->core_plugins)) // check non-core plugins for sql file changes.
{ {
$dbv->errors = array(); $dbv->errors = array();
$dbv->compare($path); $dbv->compare($path);
@@ -1315,19 +1315,15 @@ class e107plugin
} }
} }
// $curVal = floatval($version);
$curVal = $version; $curVal = $version;
$fileVal = $plg->getVersion(); // floatval($data['@attributes']['version']); $fileVal = $plg->getVersion();
// $fileVal = floatval($fileVal);
if($ret = $this->execute_function($path, 'upgrade', 'required', array($this, $curVal, $fileVal))) // Check {plugin}_setup.php and run a 'required' method, if true, then update is required. if($ret = $this->execute_function($path, 'upgrade', 'required', array($this, $curVal, $fileVal))) // Check {plugin}_setup.php and run a 'required' method, if true, then update is required.
{ {
$mes->addDebug("Plugin Update(s) Required in ".$path."_seup.php [".$path."]"); $mes->addDebug("Plugin Update(s) Required in ".$path."_setup.php [".$path."]");
if($mode === 'boolean') if($mode === 'boolean')
{ {
return TRUE; return TRUE;
} }
@@ -1349,7 +1345,6 @@ class e107plugin
$needed[$path] = $data; $needed[$path] = $data;
} }
} }
// Display debug and log to file. // Display debug and log to file.
@@ -1359,8 +1354,6 @@ class e107plugin
} }
if($mode === 'boolean') if($mode === 'boolean')
{ {
return count($needed) ? true : FALSE; return count($needed) ? true : FALSE;