Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-10-30 11:51:16 +0300
committerMorris Jobke <hey@morrisjobke.de>2015-10-30 11:51:16 +0300
commitf46d531a4f4d97766ee5dcb5ea8345cfc941d197 (patch)
treed62d16f6f2c7405708b765fcf48b36a86a152076
parent0c1a8c953aba8968301f0871a607d5abcf7b3003 (diff)
Replace some OC_Config calls with ILogger methods
-rw-r--r--core/ajax/update.php7
-rw-r--r--core/command/status.php2
-rw-r--r--cron.php4
3 files changed, 7 insertions, 6 deletions
diff --git a/core/ajax/update.php b/core/ajax/update.php
index 54038a479fb..7da9b71b751 100644
--- a/core/ajax/update.php
+++ b/core/ajax/update.php
@@ -43,9 +43,10 @@ if (OC::checkUpgrade(false)) {
\OC_User::setIncognitoMode(true);
$logger = \OC::$server->getLogger();
+ $config = \OC::$server->getConfig();
$updater = new \OC\Updater(
\OC::$server->getHTTPHelper(),
- \OC::$server->getConfig(),
+ $config,
$logger
);
$incompatibleApps = [];
@@ -96,10 +97,10 @@ if (OC::checkUpgrade(false)) {
$updater->listen('\OC\Updater', 'thirdPartyAppDisabled', function ($app) use (&$disabledThirdPartyApps) {
$disabledThirdPartyApps[]= $app;
});
- $updater->listen('\OC\Updater', 'failure', function ($message) use ($eventSource) {
+ $updater->listen('\OC\Updater', 'failure', function ($message) use ($eventSource, $config) {
$eventSource->send('failure', $message);
$eventSource->close();
- OC_Config::setValue('maintenance', false);
+ $config->setSystemValue('maintenance', false);
});
$updater->listen('\OC\Updater', 'setDebugLogLevel', function ($logLevel, $logLevelName) use($eventSource, $l) {
$eventSource->send('success', (string)$l->t('Set log level to debug - current level: "%s"', [ $logLevelName ]));
diff --git a/core/command/status.php b/core/command/status.php
index a65e985a9ec..2eb58525d3e 100644
--- a/core/command/status.php
+++ b/core/command/status.php
@@ -38,7 +38,7 @@ class Status extends Base {
protected function execute(InputInterface $input, OutputInterface $output) {
$values = array(
- 'installed' => (bool) \OC_Config::getValue('installed'),
+ 'installed' => (bool) \OC::$server->getConfig()->getSystemValue('installed', false),
'version' => implode('.', \OC_Util::getVersion()),
'versionstring' => \OC_Util::getVersionString(),
'edition' => \OC_Util::getEditionString(),
diff --git a/cron.php b/cron.php
index 92716060184..3caa50a94a8 100644
--- a/cron.php
+++ b/cron.php
@@ -60,9 +60,10 @@ try {
\OC::$server->setSession($session);
$logger = \OC::$server->getLogger();
+ $config = \OC::$server->getConfig();
// Don't do anything if ownCloud has not been installed
- if (!OC_Config::getValue('installed', false)) {
+ if (!$config->getSystemValue('installed', false)) {
exit(0);
}
@@ -99,7 +100,6 @@ try {
}
}
- $config = OC::$server->getConfig();
$instanceId = $config->getSystemValue('instanceid');
$lockFileName = 'owncloud-server-' . $instanceId . '-cron.lock';
$lockDirectory = $config->getSystemValue('cron.lockfile.location', sys_get_temp_dir());