Fixed bug in upgrade_plugins(). Capabilities were not being loaded correctly.

This commit is contained in:
vyshane
2006-08-14 08:59:01 +00:00
parent 795821c497
commit e6316185ab
+2 -2
View File
@@ -95,7 +95,7 @@ function upgrade_plugins($type, $dir, $return) {
if (modify_database($fullplug .'/db/'. $CFG->dbtype .'.sql')) {
// OK so far, now update the plugins record
set_config($pluginversion, $plugin->version);
if (!update_capabilities($dir)) {
if (!update_capabilities($dir.'/'.$plug)) {
error('Could not set up the capabilities for '.$module->name.'!');
}
notify(get_string('modulesuccess', '', $plugin->name), 'notifysuccess');
@@ -115,7 +115,7 @@ function upgrade_plugins($type, $dir, $return) {
$db->debug=false;
// OK so far, now update the plugins record
set_config($pluginversion, $plugin->version);
if (!update_capabilities($dir)) {
if (!update_capabilities($dir.'/'.$plug)) {
error('Could not update '.$plugin->name.' capabilities!');
}
notify(get_string('modulesuccess', '', $plugin->name), 'notifysuccess');