summaryrefslogtreecommitdiffstats
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/base.php2
-rw-r--r--lib/private/legacy/updater.php19
-rw-r--r--lib/private/templatelayout.php2
-rw-r--r--lib/private/updater.php6
4 files changed, 7 insertions, 22 deletions
diff --git a/lib/base.php b/lib/base.php
index 0086531e523..5ba8d3829ca 100644
--- a/lib/base.php
+++ b/lib/base.php
@@ -573,7 +573,7 @@ class OC {
register_shutdown_function(array('OC_Helper', 'cleanTmp'));
if (OC_Config::getValue('installed', false) && !self::checkUpgrade(false)) {
- if (OC_Appconfig::getValue('core', 'backgroundjobs_mode', 'ajax') == 'ajax') {
+ if (\OC::$server->getAppConfig()->getValue('core', 'backgroundjobs_mode', 'ajax') == 'ajax') {
OC_Util::addScript('backgroundjobs');
}
}
diff --git a/lib/private/legacy/updater.php b/lib/private/legacy/updater.php
deleted file mode 100644
index 190748066c6..00000000000
--- a/lib/private/legacy/updater.php
+++ /dev/null
@@ -1,19 +0,0 @@
-<?php
-/**
- * Copyright (c) 2013 Robin Appelman <icewind@owncloud.com>
- * This file is licensed under the Affero General Public License version 3 or
- * later.
- * See the COPYING-README file.
- */
-
-/**
- * provides an interface to all search providers
- *
- * @deprecated use \OC\Updater instead
- */
-class OC_Updater {
- public static function check() {
- $updater = new \OC\Updater();
- return $updater->check('http://apps.owncloud.com/updater.php');
- }
-}
diff --git a/lib/private/templatelayout.php b/lib/private/templatelayout.php
index 558ddad4af2..f5f079c8b2a 100644
--- a/lib/private/templatelayout.php
+++ b/lib/private/templatelayout.php
@@ -46,7 +46,7 @@ class OC_TemplateLayout extends OC_Template {
if($this->config->getSystemValue('updatechecker', true) === true &&
OC_User::isAdminUser(OC_User::getUser())) {
$updater = new \OC\Updater();
- $data = $updater->check('http://apps.owncloud.com/updater.php');
+ $data = $updater->check();
if(isset($data['version']) && $data['version'] != '' and $data['version'] !== Array()) {
$this->assign('updateAvailable', true);
diff --git a/lib/private/updater.php b/lib/private/updater.php
index 3eb2cd4ec4c..38a281cd2f8 100644
--- a/lib/private/updater.php
+++ b/lib/private/updater.php
@@ -66,13 +66,17 @@ class Updater extends BasicEmitter {
* @param string $updaterUrl the url to check, i.e. 'http://apps.owncloud.com/updater.php'
* @return array|bool
*/
- public function check($updaterUrl) {
+ public function check($updaterUrl = null) {
// Look up the cache - it is invalidated all 30 minutes
if ((\OC_Appconfig::getValue('core', 'lastupdatedat') + 1800) > time()) {
return json_decode(\OC_Appconfig::getValue('core', 'lastupdateResult'), true);
}
+ if (is_null($updaterUrl)) {
+ $updaterUrl = 'https://apps.owncloud.com/updater.php';
+ }
+
\OC_Appconfig::setValue('core', 'lastupdatedat', time());
if (\OC_Appconfig::getValue('core', 'installedat', '') == '') {