]> git.mjollnir.org Git - moodle.git/commitdiff
Module can define its version to 0 so it is not installed.
authormudrd8mz <mudrd8mz>
Tue, 12 May 2009 08:12:48 +0000 (08:12 +0000)
committermudrd8mz <mudrd8mz>
Tue, 12 May 2009 08:12:48 +0000 (08:12 +0000)
lib/upgradelib.php

index 457c478a3c765b5adb9cd3c5e1268b403588bd4d..60d1bb14dde8d2f06d2570491463874dbca100ac 100644 (file)
@@ -366,6 +366,11 @@ function upgrade_plugins_modules($startcallback, $endcallback) {
         require($fullmod .'/version.php');  // defines $module with version etc
 
         if (empty($module->version)) {
+            if (isset($module->version)) {
+                // Version is empty but is set - it means its value is 0 or ''. Let us skip such module.
+                // This is inteded for developers so they can work on the early stages of the module.
+                continue;
+            }
             throw new plugin_defective_exception($component, 'Missing version value in version.php');
         }