diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/repair.php | 21 | ||||
-rw-r--r-- | lib/private/updater.php | 6 |
2 files changed, 26 insertions, 1 deletions
diff --git a/lib/private/repair.php b/lib/private/repair.php new file mode 100644 index 00000000000..e9de3baa7ce --- /dev/null +++ b/lib/private/repair.php @@ -0,0 +1,21 @@ +<?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. + */ + +namespace OC; + +use OC\Hooks\BasicEmitter; + +class Repair extends BasicEmitter { + /** + * run a series of repair steps for common problems + * progress can be reported by emitting \OC\Repair::step events + */ + public function run() { + $this->emit('\OC\Repair', 'step', array('No repair steps configured at the moment')); + } +} diff --git a/lib/private/updater.php b/lib/private/updater.php index a1b07c5a242..764a0f14120 100644 --- a/lib/private/updater.php +++ b/lib/private/updater.php @@ -37,7 +37,7 @@ class Updater extends BasicEmitter { /** * Check if a new version is available - * @param string $updateUrl the url to check, i.e. 'http://apps.owncloud.com/updater.php' + * @param string $updaterUrl the url to check, i.e. 'http://apps.owncloud.com/updater.php' * @return array | bool */ public function check($updaterUrl) { @@ -116,6 +116,10 @@ class Updater extends BasicEmitter { \OC_App::checkAppsRequirements(); // load all apps to also upgrade enabled apps \OC_App::loadApps(); + + $repair = new Repair(); + $repair->run(); + \OC_Config::setValue('maintenance', false); $this->emit('\OC\Updater', 'maintenanceEnd'); } |