Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion apps/user_ldap/appinfo/install.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
$config = \OC::$server->getConfig();
$state = $config->getSystemValue('ldapIgnoreNamingRules', 'doSet');
if($state === 'doSet') {
OCP\Config::setSystemValue('ldapIgnoreNamingRules', false);
\OC::$server->getConfig()->setSystemValue('ldapIgnoreNamingRules', false);
}

$helper = new \OCA\User_LDAP\Helper($config);
Expand Down
2 changes: 1 addition & 1 deletion apps/user_ldap/lib/Configuration.php
Original file line number Diff line number Diff line change
Expand Up @@ -372,7 +372,7 @@ protected function getValue($varName) {
if(is_null($defaults)) {
$defaults = $this->getDefaults();
}
return \OCP\Config::getAppValue('user_ldap',
return \OC::$server->getConfig()->getAppValue('user_ldap',
$this->configPrefix.$varName,
$defaults[$varName]);
}
Expand Down
2 changes: 1 addition & 1 deletion apps/user_ldap/lib/Jobs/UpdateGroups.php
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ static public function updateGroups() {
*/
static private function getRefreshInterval() {
//defaults to every hour
return \OCP\Config::getAppValue('user_ldap', 'bgjRefreshInterval', 3600);
return \OC::$server->getConfig()->getAppValue('user_ldap', 'bgjRefreshInterval', 3600);
}

/**
Expand Down
1 change: 0 additions & 1 deletion lib/composer/composer/autoload_classmap.php
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@
'OCP\\Comments\\IllegalIDChangeException' => $baseDir . '/lib/public/Comments/IllegalIDChangeException.php',
'OCP\\Comments\\MessageTooLongException' => $baseDir . '/lib/public/Comments/MessageTooLongException.php',
'OCP\\Comments\\NotFoundException' => $baseDir . '/lib/public/Comments/NotFoundException.php',
'OCP\\Config' => $baseDir . '/lib/public/Config.php',
'OCP\\Console\\ConsoleEvent' => $baseDir . '/lib/public/Console/ConsoleEvent.php',
'OCP\\Constants' => $baseDir . '/lib/public/Constants.php',
'OCP\\Contacts' => $baseDir . '/lib/public/Contacts.php',
Expand Down
1 change: 0 additions & 1 deletion lib/composer/composer/autoload_static.php
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ class ComposerStaticInit53792487c5a8370acc0b06b1a864ff4c
'OCP\\Comments\\IllegalIDChangeException' => __DIR__ . '/../../..' . '/lib/public/Comments/IllegalIDChangeException.php',
'OCP\\Comments\\MessageTooLongException' => __DIR__ . '/../../..' . '/lib/public/Comments/MessageTooLongException.php',
'OCP\\Comments\\NotFoundException' => __DIR__ . '/../../..' . '/lib/public/Comments/NotFoundException.php',
'OCP\\Config' => __DIR__ . '/../../..' . '/lib/public/Config.php',
'OCP\\Console\\ConsoleEvent' => __DIR__ . '/../../..' . '/lib/public/Console/ConsoleEvent.php',
'OCP\\Constants' => __DIR__ . '/../../..' . '/lib/public/Constants.php',
'OCP\\Contacts' => __DIR__ . '/../../..' . '/lib/public/Contacts.php',
Expand Down
1 change: 0 additions & 1 deletion lib/private/App/CodeChecker/DeprecationCheck.php
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,6 @@ protected function getLocalClasses() {
return [
'OC_JSON' => '8.2.0',

'OCP\Config' => '8.0.0',
'OCP\Contacts' => '8.1.0',
'OCP\DB' => '8.1.0',
'OCP\IHelper' => '8.1.0',
Expand Down
1 change: 0 additions & 1 deletion lib/private/Files/Cache/Scanner.php
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,6 @@

use OC\Files\Filesystem;
use OC\Hooks\BasicEmitter;
use OCP\Config;
use OCP\Files\Cache\IScanner;
use OCP\Files\ForbiddenException;
use OCP\Lock\ILockingProvider;
Expand Down
8 changes: 4 additions & 4 deletions lib/private/Share/Share.php
Original file line number Diff line number Diff line change
Expand Up @@ -763,7 +763,7 @@ private static function validateExpireDate($expireDate, $shareTime, $itemType, $
// initialize max date with share time
$maxDate = new \DateTime();
$maxDate->setTimestamp($shareTime);
$maxDays = \OCP\Config::getAppValue('core', 'shareapi_expire_after_n_days', '7');
$maxDays = \OC::$server->getConfig()->getAppValue('core', 'shareapi_expire_after_n_days', '7');
$maxDate->add(new \DateInterval('P' . $maxDays . 'D'));
if ($date > $maxDate) {
$warning = 'Cannot set expiration date. Shares cannot expire later than ' . $maxDays . ' after they have been shared';
Expand Down Expand Up @@ -2152,23 +2152,23 @@ public static function shareWithGroupMembersOnly() {
* @return bool
*/
public static function isDefaultExpireDateEnabled() {
$defaultExpireDateEnabled = \OCP\Config::getAppValue('core', 'shareapi_default_expire_date', 'no');
$defaultExpireDateEnabled = \OC::$server->getConfig()->getAppValue('core', 'shareapi_default_expire_date', 'no');
return ($defaultExpireDateEnabled === "yes") ? true : false;
}

/**
* @return bool
*/
public static function enforceDefaultExpireDate() {
$enforceDefaultExpireDate = \OCP\Config::getAppValue('core', 'shareapi_enforce_expire_date', 'no');
$enforceDefaultExpireDate = \OC::$server->getConfig()->getAppValue('core', 'shareapi_enforce_expire_date', 'no');
return ($enforceDefaultExpireDate === "yes") ? true : false;
}

/**
* @return int
*/
public static function getExpireInterval() {
return (int)\OCP\Config::getAppValue('core', 'shareapi_expire_after_n_days', '7');
return (int)\OC::$server->getConfig()->getAppValue('core', 'shareapi_expire_after_n_days', '7');
}

/**
Expand Down
4 changes: 2 additions & 2 deletions lib/private/legacy/util.php
Original file line number Diff line number Diff line change
Expand Up @@ -341,10 +341,10 @@ public static function isSharingDisabledForUser(IConfig $config, IGroupManager $
* @suppress PhanDeprecatedFunction
*/
public static function isDefaultExpireDateEnforced() {
$isDefaultExpireDateEnabled = \OCP\Config::getAppValue('core', 'shareapi_default_expire_date', 'no');
$isDefaultExpireDateEnabled = \OC::$server->getConfig()->getAppValue('core', 'shareapi_default_expire_date', 'no');
$enforceDefaultExpireDate = false;
if ($isDefaultExpireDateEnabled === 'yes') {
$value = \OCP\Config::getAppValue('core', 'shareapi_enforce_expire_date', 'no');
$value = \OC::$server->getConfig()->getAppValue('core', 'shareapi_enforce_expire_date', 'no');
$enforceDefaultExpireDate = ($value === 'yes') ? true : false;
}

Expand Down
164 changes: 0 additions & 164 deletions lib/public/Config.php

This file was deleted.

38 changes: 0 additions & 38 deletions tests/lib/PublicNamespace/OCPConfigTest.php

This file was deleted.

4 changes: 2 additions & 2 deletions tests/lib/UtilTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -304,12 +304,12 @@ function testDefaultApps($defaultAppConfig, $expectedPath, $enabledApps) {

// need to set a user id to make sure enabled apps are read from cache
\OC_User::setUserId($this->getUniqueID());
\OCP\Config::setSystemValue('defaultapp', $defaultAppConfig);
\OC::$server->getConfig()->setSystemValue('defaultapp', $defaultAppConfig);
$this->assertEquals('http://localhost/' . $expectedPath, Dummy_OC_Util::getDefaultPageUrl());

// restore old state
\OC::$WEBROOT = $oldWebRoot;
\OCP\Config::setSystemValue('defaultapp', $oldDefaultApps);
\OC::$server->getConfig()->setSystemValue('defaultapp', $oldDefaultApps);
\OC_User::setUserId(null);
}

Expand Down