diff options
Diffstat (limited to 'apps/user_ldap')
-rw-r--r-- | apps/user_ldap/appinfo/update.php | 30 | ||||
-rw-r--r-- | apps/user_ldap/lib/access.php | 2 | ||||
-rw-r--r-- | apps/user_ldap/user_ldap.php | 2 |
3 files changed, 18 insertions, 16 deletions
diff --git a/apps/user_ldap/appinfo/update.php b/apps/user_ldap/appinfo/update.php index 5fad23de4f6..9bf0ca4ab53 100644 --- a/apps/user_ldap/appinfo/update.php +++ b/apps/user_ldap/appinfo/update.php @@ -1,13 +1,15 @@ <?php +$configInstance = \OC::$server->getConfig(); + //detect if we can switch on naming guidelines. We won't do it on conflicts. //it's a bit spaghetti, but hey. -$state = OCP\Config::getSystemValue('ldapIgnoreNamingRules', 'unset'); +$state = $configInstance->getSystemValue('ldapIgnoreNamingRules', 'unset'); if($state === 'unset') { - OCP\Config::setSystemValue('ldapIgnoreNamingRules', false); + $configInstance->setSystemValue('ldapIgnoreNamingRules', false); } -$installedVersion = OCP\Config::getAppValue('user_ldap', 'installed_version'); +$installedVersion = $configInstance->getAppValue('user_ldap', 'installed_version'); $enableRawMode = version_compare($installedVersion, '0.4.1', '<'); $configPrefixes = OCA\user_ldap\lib\Helper::getServerConfigurationPrefixes(true); @@ -15,31 +17,31 @@ $ldap = new OCA\user_ldap\lib\LDAP(); foreach($configPrefixes as $config) { $connection = new OCA\user_ldap\lib\Connection($ldap, $config); - $state = \OCP\Config::getAppValue( + $state = $configInstance->getAppValue( 'user_ldap', $config.'ldap_uuid_user_attribute', 'not existing'); if($state === 'non existing') { - $value = \OCP\Config::getAppValue( + $value = $configInstance->getAppValue( 'user_ldap', $config.'ldap_uuid_attribute', ''); - \OCP\Config::setAppValue( + $configInstance->setAppValue( 'user_ldap', $config.'ldap_uuid_user_attribute', $value); - \OCP\Config::setAppValue( + $configInstance->setAppValue( 'user_ldap', $config.'ldap_uuid_group_attribute', $value); } - $state = \OCP\Config::getAppValue( + $state = $configInstance->getAppValue( 'user_ldap', $config.'ldap_expert_uuid_user_attr', 'not existing'); if($state === 'non existing') { - $value = \OCP\Config::getAppValue( + $value = $configInstance->getAppValue( 'user_ldap', $config.'ldap_expert_uuid_attr', ''); - \OCP\Config::setAppValue( + $configInstance->setAppValue( 'user_ldap', $config.'ldap_expert_uuid_user_attr', $value); - \OCP\Config::setAppValue( + $configInstance->setAppValue( 'user_ldap', $config.'ldap_expert_uuid_group_attr', $value); } if($enableRawMode) { - \OCP\Config::setAppValue('user_ldap', $config.'ldap_user_filter_mode', 1); - \OCP\Config::setAppValue('user_ldap', $config.'ldap_login_filter_mode', 1); - \OCP\Config::setAppValue('user_ldap', $config.'ldap_group_filter_mode', 1); + $configInstance->setAppValue('user_ldap', $config.'ldap_user_filter_mode', 1); + $configInstance->setAppValue('user_ldap', $config.'ldap_login_filter_mode', 1); + $configInstance->setAppValue('user_ldap', $config.'ldap_group_filter_mode', 1); } } diff --git a/apps/user_ldap/lib/access.php b/apps/user_ldap/lib/access.php index 76747be70cf..22510302061 100644 --- a/apps/user_ldap/lib/access.php +++ b/apps/user_ldap/lib/access.php @@ -673,7 +673,7 @@ class Access extends LDAPUtility implements user\IUserTools { $table = $this->getMapTable($isUser); $sqlAdjustment = ''; - $dbType = \OCP\Config::getSystemValue('dbtype'); + $dbType = \OC::$server->getConfig()->getSystemValue('dbtype', null); if($dbType === 'mysql' || $dbType == 'oci') { $sqlAdjustment = 'FROM DUAL'; } diff --git a/apps/user_ldap/user_ldap.php b/apps/user_ldap/user_ldap.php index 52278082312..6c7db662ffb 100644 --- a/apps/user_ldap/user_ldap.php +++ b/apps/user_ldap/user_ldap.php @@ -199,7 +199,7 @@ class USER_LDAP extends BackendUtility implements \OCP\UserInterface { ) { $homedir = $path; } else { - $homedir = \OCP\Config::getSystemValue('datadirectory', + $homedir = \OC::$server->getConfig()->getSystemValue('datadirectory', \OC::$SERVERROOT.'/data' ) . '/' . $homedir[0]; } $this->access->connection->writeToCache($cacheKey, $homedir); |