diff options
author | Thomas Steur <thomas.steur@googlemail.com> | 2014-06-05 09:28:24 +0400 |
---|---|---|
committer | Thomas Steur <thomas.steur@googlemail.com> | 2014-06-05 09:28:24 +0400 |
commit | e65e378f898331ea7f15b053d4a2f29b4270e645 (patch) | |
tree | d14900a0655ba4da2adb8702b5d80a72e7c9d969 /core | |
parent | 756d1e0dc348a411a0b3fbe6ed07bf63f8793ea9 (diff) |
refs #5301 this should fix the scheduledreports tests
Diffstat (limited to 'core')
-rw-r--r-- | core/Plugin/Tasks.php | 12 |
1 files changed, 4 insertions, 8 deletions
diff --git a/core/Plugin/Tasks.php b/core/Plugin/Tasks.php index f689ce907a..4af344db14 100644 --- a/core/Plugin/Tasks.php +++ b/core/Plugin/Tasks.php @@ -58,7 +58,7 @@ class Tasks */ protected function hourly($methodName, $methodParameter = null, $priority = self::NORMAL_PRIORITY) { - return $this->custom($this, $methodName, $methodParameter, 'hourly', $priority); + return $this->custom(get_class($this), $methodName, $methodParameter, 'hourly', $priority); } /** @@ -69,7 +69,7 @@ class Tasks */ protected function daily($methodName, $methodParameter = null, $priority = self::NORMAL_PRIORITY) { - return $this->custom($this, $methodName, $methodParameter, 'daily', $priority); + return $this->custom(get_class($this), $methodName, $methodParameter, 'daily', $priority); } /** @@ -80,7 +80,7 @@ class Tasks */ protected function weekly($methodName, $methodParameter = null, $priority = self::NORMAL_PRIORITY) { - return $this->custom($this, $methodName, $methodParameter, 'weekly', $priority); + return $this->custom(get_class($this), $methodName, $methodParameter, 'weekly', $priority); } /** @@ -91,7 +91,7 @@ class Tasks */ protected function monthly($methodName, $methodParameter = null, $priority = self::NORMAL_PRIORITY) { - return $this->custom($this, $methodName, $methodParameter, 'monthly', $priority); + return $this->custom(get_class($this), $methodName, $methodParameter, 'monthly', $priority); } /** @@ -122,10 +122,6 @@ class Tasks throw new \Exception('$time should be an instance of ScheduledTime'); } - if (!is_string($objectOrClassName)) { - $objectOrClassName = get_class($objectOrClassName); - } - $this->scheduleTask(new ScheduledTask($objectOrClassName, $methodName, $methodParameter, $time, $priority)); return $time; |