diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-10-17 11:42:10 +0200 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-10-20 14:44:42 +0200 |
commit | 6af0e76a03b59e82a30e80ea726b274e431a9b61 (patch) | |
tree | 07c949ee5673c5ccf32d8774b8efe2075ebef078 | |
parent | 8da6e4b9f09d6d7a03fb602c6d5fe73e87b96a87 (diff) | |
download | nextcloud-server-6af0e76a03b59e82a30e80ea726b274e431a9b61.tar.gz nextcloud-server-6af0e76a03b59e82a30e80ea726b274e431a9b61.zip |
remove legacy class OC_Updater
-rw-r--r-- | lib/private/legacy/updater.php | 19 | ||||
-rw-r--r-- | lib/private/templatelayout.php | 2 | ||||
-rw-r--r-- | lib/private/updater.php | 6 |
3 files changed, 6 insertions, 21 deletions
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 10abff6267a..62c897fa9ce 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', '') == '') { |