summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
Diffstat (limited to 'apps')
-rw-r--r--apps/user_ldap/ajax/getNewServerConfigPrefix.php7
1 files changed, 1 insertions, 6 deletions
diff --git a/apps/user_ldap/ajax/getNewServerConfigPrefix.php b/apps/user_ldap/ajax/getNewServerConfigPrefix.php
index 1a5f78cf214..17e78f87072 100644
--- a/apps/user_ldap/ajax/getNewServerConfigPrefix.php
+++ b/apps/user_ldap/ajax/getNewServerConfigPrefix.php
@@ -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));