LDAP: use consolidated method for determining config prefix

This commit is contained in:
Arthur Schiwon 2013-01-30 02:31:14 +01:00
parent a8ac4bdf79
commit 9f7d780276
1 changed files with 1 additions and 6 deletions

View File

@ -26,12 +26,7 @@ OCP\JSON::checkAdminUser();
OCP\JSON::checkAppEnabled('user_ldap');
OCP\JSON::callCheck();
$query = \OCP\DB::prepare('
SELECT DISTINCT `configkey`
FROM `*PREFIX*appconfig`
WHERE `configkey` LIKE ?
');
$serverConnections = $query->execute(array('%ldap_login_filter'))->fetchAll();
$serverConnections = \OCA\user_ldap\lib\Helper::getServerConfigurationPrefixes();
sort($serverConnections);
$lk = array_pop($serverConnections);
$ln = intval(str_replace('s', '', $lk));