summaryrefslogtreecommitdiffstats
path: root/apps/updatenotification
diff options
context:
space:
mode:
Diffstat (limited to 'apps/updatenotification')
-rw-r--r--apps/updatenotification/appinfo/app.php7
-rw-r--r--apps/updatenotification/appinfo/application.php7
-rw-r--r--apps/updatenotification/lib/updatechecker.php8
-rw-r--r--apps/updatenotification/tests/UpdateCheckerTest.php2
4 files changed, 11 insertions, 13 deletions
diff --git a/apps/updatenotification/appinfo/app.php b/apps/updatenotification/appinfo/app.php
index f257cba6974..a88861c0942 100644
--- a/apps/updatenotification/appinfo/app.php
+++ b/apps/updatenotification/appinfo/app.php
@@ -20,10 +20,9 @@
*/
if(\OC::$server->getConfig()->getSystemValue('updatechecker', true) === true) {
- $updater = new \OC\Updater(
- \OC::$server->getHTTPHelper(),
- \OC::$server->getConfig(),
- \OC::$server->getIntegrityCodeChecker()
+ $updater = new \OC\Updater\VersionCheck(
+ \OC::$server->getHTTPClientService(),
+ \OC::$server->getConfig()
);
$updateChecker = new \OCA\UpdateNotification\UpdateChecker(
$updater
diff --git a/apps/updatenotification/appinfo/application.php b/apps/updatenotification/appinfo/application.php
index 24c0a11af69..08ff4abf766 100644
--- a/apps/updatenotification/appinfo/application.php
+++ b/apps/updatenotification/appinfo/application.php
@@ -34,10 +34,9 @@ class Application extends App {
$container = $this->getContainer();
$container->registerService('AdminController', function(IAppContainer $c) {
- $updater = new \OC\Updater(
- \OC::$server->getHTTPHelper(),
- \OC::$server->getConfig(),
- \OC::$server->getIntegrityCodeChecker()
+ $updater = new \OC\Updater\VersionCheck(
+ \OC::$server->getHTTPClientService(),
+ \OC::$server->getConfig()
);
return new AdminController(
$c->query('AppName'),
diff --git a/apps/updatenotification/lib/updatechecker.php b/apps/updatenotification/lib/updatechecker.php
index 965e21617e7..bf653c23b8f 100644
--- a/apps/updatenotification/lib/updatechecker.php
+++ b/apps/updatenotification/lib/updatechecker.php
@@ -21,16 +21,16 @@
namespace OCA\UpdateNotification;
-use OC\Updater;
+use OC\Updater\VersionCheck;
class UpdateChecker {
- /** @var Updater */
+ /** @var VersionCheck */
private $updater;
/**
- * @param Updater $updater
+ * @param VersionCheck $updater
*/
- public function __construct(Updater $updater) {
+ public function __construct(VersionCheck $updater) {
$this->updater = $updater;
}
diff --git a/apps/updatenotification/tests/UpdateCheckerTest.php b/apps/updatenotification/tests/UpdateCheckerTest.php
index 9591758c4c9..5865284a48e 100644
--- a/apps/updatenotification/tests/UpdateCheckerTest.php
+++ b/apps/updatenotification/tests/UpdateCheckerTest.php
@@ -34,7 +34,7 @@ class UpdateCheckerTest extends TestCase {
public function setUp() {
parent::setUp();
- $this->updater = $this->getMockBuilder('\OC\Updater')
+ $this->updater = $this->getMockBuilder('\OC\Updater\VersionCheck')
->disableOriginalConstructor()->getMock();
$this->updateChecker = new UpdateChecker($this->updater);
}