Skip to content

Commit

Permalink
*6076* Plug-In version entries are not properly being installed/updated
Browse files Browse the repository at this point in the history
  • Loading branch information
fgrandel committed Oct 29, 2010
1 parent 56905ea commit ddd3975
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 24 deletions.
24 changes: 0 additions & 24 deletions classes/install/Install.inc.php
Expand Up @@ -142,30 +142,6 @@ function createData() {
$this->setError(INSTALLER_ERROR_DB, $this->dbconn->errorMsg());
return false;
}

// Add initial plugin data to versions table
$versionDao =& DAORegistry::getDAO('VersionDAO');
import('lib.pkp.classes.site.VersionCheck');
$categories = PluginRegistry::getCategories();
foreach ($categories as $category) {
PluginRegistry::loadCategory($category);
$plugins = PluginRegistry::getPlugins($category);
foreach ($plugins as $plugin) {
$versionFile = $plugin->getPluginPath() . '/version.xml';

if (FileManager::fileExists($versionFile)) {
$versionInfo =& VersionCheck::parseVersionXML($versionFile);
$pluginVersion = $versionInfo['version'];
} else {
$pluginVersion = new Version(
1, 0, 0, 0, Core::getCurrentDate(), 1,
'plugins.'.$category, basename($plugin->getPluginPath()), '', 0, $plugin->isSitePlugin()
);
}
$versionDao->insertVersion($pluginVersion, true);
}
}

}

return true;
Expand Down
1 change: 1 addition & 0 deletions dbscripts/xml/install.xml
Expand Up @@ -29,4 +29,5 @@

<code function="createData" />
<code function="createConfig" />
<code function="addPluginVersions"/>
</install>

0 comments on commit ddd3975

Please sign in to comment.