Index: branches/5.3.x/core/kernel/utility/unit_config.php =================================================================== diff -u -N -r15919 -r15945 --- branches/5.3.x/core/kernel/utility/unit_config.php (.../unit_config.php) (revision 15919) +++ branches/5.3.x/core/kernel/utility/unit_config.php (.../unit_config.php) (revision 15945) @@ -1141,10 +1141,32 @@ foreach ($scheduled_tasks as $short_name => $scheduled_task_info) { $event_status = array_key_exists('Status', $scheduled_task_info) ? $scheduled_task_info['Status'] : STATUS_ACTIVE; - $this->Application->delayUnitProcessing('registerScheduledTask', Array ($short_name, $this->_prefix . ':' . $scheduled_task_info['EventName'], $scheduled_task_info['RunSchedule'], $event_status)); + $this->Application->delayUnitProcessing('registerScheduledTask', Array ($short_name, $this->_prefix . ':' . $scheduled_task_info['EventName'], $scheduled_task_info['RunSchedule'], $this->getModule(), $event_status)); } } + /** + * Detects module by unit location. + * + * @return string + */ + public function getModule() + { + $module_path = $this->getModuleFolder() . '/'; + + foreach ( $this->Application->ModuleInfo as $module_name => $module_data ) { + if ( $module_name == 'In-Portal' ) { + continue; + } + + if ( $module_data['Path'] == $module_path ) { + return $module_name; + } + } + + return ''; + } + protected function _parseHooks() { $hooks = $this->getHooks();