]> git.mjollnir.org Git - moodle.git/commitdiff
Fixed bug in upgrade_plugins(). Capabilities were not being loaded correctly.
authorvyshane <vyshane>
Mon, 14 Aug 2006 08:59:01 +0000 (08:59 +0000)
committervyshane <vyshane>
Mon, 14 Aug 2006 08:59:01 +0000 (08:59 +0000)
lib/adminlib.php

index 75d449d752410c1e3ddec337f8a29e4c54499b3d..6556bd63418453864aaacf420491b3432446bae9 100644 (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');