]> git.mjollnir.org Git - moodle.git/commitdiff
MDL-20196 improved plugin_supports() for all plugin types
authorskodak <skodak>
Tue, 1 Sep 2009 08:46:16 +0000 (08:46 +0000)
committerskodak <skodak>
Tue, 1 Sep 2009 08:46:16 +0000 (08:46 +0000)
lib/moodlelib.php

index ab950980118319bd7c6d6db2819e87aa513d16c6..abede6ec968e7f96d592f68d87888f757d102ae6 100644 (file)
@@ -6988,6 +6988,10 @@ function plugin_supports($type, $name, $feature, $default=null) {
         $function = $name.'_supports';
 
     } else {
+       if ($feature == FEATURE_MOD_SUBPLUGINS) {
+               //sorry only modules
+               return false;
+       }
            if (!$dir = get_plugin_directory($type, $name)) {
                throw new coding_exception("Unsupported plugin type or name ($type/$name)");
            }