Merge pull request #20170 from owncloud/remove-some-oc_config-calls
Replace some OC_Config calls with ILogger methods
This commit is contained in:
commit
c041176dc1
|
@ -43,9 +43,10 @@ if (OC::checkUpgrade(false)) {
|
||||||
\OC_User::setIncognitoMode(true);
|
\OC_User::setIncognitoMode(true);
|
||||||
|
|
||||||
$logger = \OC::$server->getLogger();
|
$logger = \OC::$server->getLogger();
|
||||||
|
$config = \OC::$server->getConfig();
|
||||||
$updater = new \OC\Updater(
|
$updater = new \OC\Updater(
|
||||||
\OC::$server->getHTTPHelper(),
|
\OC::$server->getHTTPHelper(),
|
||||||
\OC::$server->getConfig(),
|
$config,
|
||||||
$logger
|
$logger
|
||||||
);
|
);
|
||||||
$incompatibleApps = [];
|
$incompatibleApps = [];
|
||||||
|
@ -96,10 +97,10 @@ if (OC::checkUpgrade(false)) {
|
||||||
$updater->listen('\OC\Updater', 'thirdPartyAppDisabled', function ($app) use (&$disabledThirdPartyApps) {
|
$updater->listen('\OC\Updater', 'thirdPartyAppDisabled', function ($app) use (&$disabledThirdPartyApps) {
|
||||||
$disabledThirdPartyApps[]= $app;
|
$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->send('failure', $message);
|
||||||
$eventSource->close();
|
$eventSource->close();
|
||||||
OC_Config::setValue('maintenance', false);
|
$config->setSystemValue('maintenance', false);
|
||||||
});
|
});
|
||||||
$updater->listen('\OC\Updater', 'setDebugLogLevel', function ($logLevel, $logLevelName) use($eventSource, $l) {
|
$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 ]));
|
$eventSource->send('success', (string)$l->t('Set log level to debug - current level: "%s"', [ $logLevelName ]));
|
||||||
|
|
|
@ -38,7 +38,7 @@ class Status extends Base {
|
||||||
|
|
||||||
protected function execute(InputInterface $input, OutputInterface $output) {
|
protected function execute(InputInterface $input, OutputInterface $output) {
|
||||||
$values = array(
|
$values = array(
|
||||||
'installed' => (bool) \OC_Config::getValue('installed'),
|
'installed' => (bool) \OC::$server->getConfig()->getSystemValue('installed', false),
|
||||||
'version' => implode('.', \OC_Util::getVersion()),
|
'version' => implode('.', \OC_Util::getVersion()),
|
||||||
'versionstring' => \OC_Util::getVersionString(),
|
'versionstring' => \OC_Util::getVersionString(),
|
||||||
'edition' => \OC_Util::getEditionString(),
|
'edition' => \OC_Util::getEditionString(),
|
||||||
|
|
4
cron.php
4
cron.php
|
@ -60,9 +60,10 @@ try {
|
||||||
\OC::$server->setSession($session);
|
\OC::$server->setSession($session);
|
||||||
|
|
||||||
$logger = \OC::$server->getLogger();
|
$logger = \OC::$server->getLogger();
|
||||||
|
$config = \OC::$server->getConfig();
|
||||||
|
|
||||||
// Don't do anything if ownCloud has not been installed
|
// Don't do anything if ownCloud has not been installed
|
||||||
if (!OC_Config::getValue('installed', false)) {
|
if (!$config->getSystemValue('installed', false)) {
|
||||||
exit(0);
|
exit(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,7 +100,6 @@ try {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$config = OC::$server->getConfig();
|
|
||||||
$instanceId = $config->getSystemValue('instanceid');
|
$instanceId = $config->getSystemValue('instanceid');
|
||||||
$lockFileName = 'owncloud-server-' . $instanceId . '-cron.lock';
|
$lockFileName = 'owncloud-server-' . $instanceId . '-cron.lock';
|
||||||
$lockDirectory = $config->getSystemValue('cron.lockfile.location', sys_get_temp_dir());
|
$lockDirectory = $config->getSystemValue('cron.lockfile.location', sys_get_temp_dir());
|
||||||
|
|
Loading…
Reference in New Issue