summaryrefslogtreecommitdiffstats
path: root/lib/public/backgroundjob.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-05-03 16:42:48 +0200
committerRobin Appelman <icewind@owncloud.com>2013-05-03 16:42:48 +0200
commitb7585050b565ac8f42c3afa625037adaf1a8d92c (patch)
tree0fb36a867b93969705715206147dee6b5efe60dd /lib/public/backgroundjob.php
parentb31dc10c3c4b73b08c926751effbade601c7cab8 (diff)
downloadnextcloud-server-b7585050b565ac8f42c3afa625037adaf1a8d92c.tar.gz
nextcloud-server-b7585050b565ac8f42c3afa625037adaf1a8d92c.zip
Move legacy backgroundjob classes to a place where they can be autoloaded
Diffstat (limited to 'lib/public/backgroundjob.php')
-rw-r--r--lib/public/backgroundjob.php24
1 files changed, 3 insertions, 21 deletions
diff --git a/lib/public/backgroundjob.php b/lib/public/backgroundjob.php
index aa6c59067e0..cc076a3a845 100644
--- a/lib/public/backgroundjob.php
+++ b/lib/public/backgroundjob.php
@@ -21,7 +21,7 @@
*/
/**
- * Public interface of ownCloud forbackground jobs.
+ * Public interface of ownCloud for background jobs.
*/
// use OCP namespace for all classes that are considered public.
@@ -83,7 +83,7 @@ class BackgroundJob {
* @return true
*/
public static function addRegularTask($klass, $method) {
- self::registerJob('RegularLegacyJob', array($klass, $method));
+ self::registerJob('OC\BackgroundJob\Legacy\RegularJob', array($klass, $method));
return true;
}
@@ -169,7 +169,7 @@ class BackgroundJob {
* @return int id of task
*/
public static function addQueuedTask($app, $class, $method, $parameters) {
- self::registerJob('QueuedLegacyJob', array('app' => $app, 'klass' => $class, 'method' => $method, 'parameters' => $parameters));
+ self::registerJob('OC\BackgroundJob\Legacy\QueuedJob', array('app' => $app, 'klass' => $class, 'method' => $method, 'parameters' => $parameters));
return true;
}
@@ -189,21 +189,3 @@ class BackgroundJob {
}
}
}
-
-/**
- * Wrappers to support old versions of the BackgroundJob api
- */
-class RegularLegacyJob extends \OC\BackgroundJob\Job {
- public function run($argument) {
- call_user_func($argument);
- }
-}
-
-class QueuedLegacyJob extends \OC\BackgroundJob\QueuedJob {
- public function run($argument) {
- $class = $argument['klass'];
- $method = $argument['method'];
- $parameters = $argument['parameters'];
- call_user_func(array($class, $method), $parameters);
- }
-}