MDL-48156 task: Skip the scheduled task only for really disabled plugins
authorDavid Mudrák <david@moodle.com>
Mon, 10 Nov 2014 10:09:25 +0000 (11:09 +0100)
committerDavid Mudrák <david@moodle.com>
Mon, 10 Nov 2014 10:09:25 +0000 (11:09 +0100)
lib/classes/task/manager.php

index 17313e0..af6bccf 100644 (file)
@@ -501,7 +501,8 @@ class manager {
                 $plugininfo = $pluginmanager->get_plugin_info($task->get_component());
 
                 if ($plugininfo) {
-                    if (!$task->get_run_if_component_disabled() && !$plugininfo->is_enabled()) {
+                    if (($plugininfo->is_enabled() === false) && !$task->get_run_if_component_disabled()) {
+                        mtrace($task->get_name().' skipped - the component '.$task->get_component().' is disabled');
                         $lock->release();
                         continue;
                     }