Clean code

This commit is contained in:
Thomas Müller 2015-10-09 13:46:59 +02:00
parent 38143d670b
commit bd21e5925c
1 changed files with 2 additions and 2 deletions

View File

@ -32,7 +32,6 @@
namespace OC;
use OC\Core\Command\Log\Manage;
use OC\Hooks\BasicEmitter;
use OC_App;
use OC_Installer;
@ -207,7 +206,7 @@ class Updater extends BasicEmitter {
try {
$this->doUpgrade($currentVersion, $installedVersion);
} catch (\Exception $exception) {
\OCP\Util::logException('update', $exception);
$this->log->logException($exception, ['app' => 'core']);
$this->emit('\OC\Updater', 'failure', array(get_class($exception) . ': ' .$exception->getMessage()));
$success = false;
}
@ -235,6 +234,7 @@ class Updater extends BasicEmitter {
private function getAllowedPreviousVersion() {
// this should really be a JSON file
require \OC::$SERVERROOT . '/version.php';
/** @var array $OC_VersionCanBeUpgradedFrom */
return implode('.', $OC_VersionCanBeUpgradedFrom);
}