diff --git a/workflow/engine/classes/class.system.php b/workflow/engine/classes/class.system.php index 4f2e73190..e450bcf00 100755 --- a/workflow/engine/classes/class.system.php +++ b/workflow/engine/classes/class.system.php @@ -706,7 +706,10 @@ class System { * @return $sContent */ public static function getPluginSchema($pluginName) { - return System::getSchema(PATH_PLUGINS . $pluginName . "/config/schema.xml"); + if (file_exists(PATH_PLUGINS . $pluginName . "/config/schema.xml")) + return System::getSchema(PATH_PLUGINS . $pluginName . "/config/schema.xml"); + else + return false; } /** diff --git a/workflow/engine/classes/class.wsTools.php b/workflow/engine/classes/class.wsTools.php index e548c8fec..4f44d3479 100644 --- a/workflow/engine/classes/class.wsTools.php +++ b/workflow/engine/classes/class.wsTools.php @@ -304,7 +304,8 @@ class workspaceTools { public function upgradePluginsDatabase() { foreach (System::getPlugins() as $pluginName) { $pluginSchema = System::getPluginSchema($pluginName); - $this->upgradeSchema($pluginSchema); + if ($pluginSchema !== false) + $this->upgradeSchema($pluginSchema); } } @@ -320,9 +321,8 @@ class workspaceTools { throw new Exception("Only MySQL is supported"); } - $currentSchema = System::getSchema(); $workspaceSchema = $this->getSchema(); - $changes = System::compareSchema($workspaceSchema, $currentSchema); + $changes = System::compareSchema($workspaceSchema, $schema); $changed = (count($changes['tablesToAdd']) > 0 || count($changes['tablesToAlter']) > 0 || count($changes['tablesWithNewIndex']) > 0 ||