diff options
author | Morris Jobke <hey@morrisjobke.de> | 2015-04-18 23:37:32 +0200 |
---|---|---|
committer | Morris Jobke <hey@morrisjobke.de> | 2015-04-18 23:37:32 +0200 |
commit | 60b8aa2a83fe100f410a6d80b09adaf882619301 (patch) | |
tree | e53a67e7a5bd12de3d27cacd3887be832165f2fe /lib/public/backgroundjob.php | |
parent | cdf82909b8225a885fbf92b78208fb1fe258853e (diff) | |
download | nextcloud-server-60b8aa2a83fe100f410a6d80b09adaf882619301.tar.gz nextcloud-server-60b8aa2a83fe100f410a6d80b09adaf882619301.zip |
Removed OC_BackgroundJob - reduce class overhead
* method code is now in the static public namespace (5 sloc)
Diffstat (limited to 'lib/public/backgroundjob.php')
-rw-r--r-- | lib/public/backgroundjob.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/public/backgroundjob.php b/lib/public/backgroundjob.php index 40fdd4b6e63..33ccf6545d0 100644 --- a/lib/public/backgroundjob.php +++ b/lib/public/backgroundjob.php @@ -60,7 +60,7 @@ class BackgroundJob { * @since 5.0.0 */ public static function getExecutionType() { - return \OC_BackgroundJob::getExecutionType(); + return \OC::$server->getConfig()->getAppValue('core', 'backgroundjobs_mode', 'ajax'); } /** @@ -74,7 +74,10 @@ class BackgroundJob { * @since 5.0.0 */ public static function setExecutionType($type) { - return \OC_BackgroundJob::setExecutionType($type); + if( !in_array( $type, array('none', 'ajax', 'webcron', 'cron'))) { + return false; + } + \OC::$server->getConfig()->setAppValue('core', 'backgroundjobs_mode', $type); } /** |