diff options
author | Thomas Müller <thomas.mueller@tmit.eu> | 2014-01-23 00:39:11 +0100 |
---|---|---|
committer | Thomas Müller <thomas.mueller@tmit.eu> | 2014-01-23 00:39:11 +0100 |
commit | f950ce82ae137977eeca5babe69d732ca55cbeaa (patch) | |
tree | 4c1b949c81b45ce081503343780eea91afd6b659 /apps/user_ldap/lib/helper.php | |
parent | 4ec6debe2b145b0df106c7e5a3f4ed0cf2885957 (diff) | |
parent | 4474421ada2a4b5642f1a081d6491d7858b3b9b0 (diff) | |
download | nextcloud-server-f950ce82ae137977eeca5babe69d732ca55cbeaa.tar.gz nextcloud-server-f950ce82ae137977eeca5babe69d732ca55cbeaa.zip |
Merge branch 'master' into mobile-style
Conflicts:
apps/files/js/files.js
apps/files_sharing/css/public.css
apps/files_sharing/js/public.js
apps/files_sharing/templates/public.php
Diffstat (limited to 'apps/user_ldap/lib/helper.php')
-rw-r--r-- | apps/user_ldap/lib/helper.php | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/apps/user_ldap/lib/helper.php b/apps/user_ldap/lib/helper.php index 09f646921e3..9727d847d27 100644 --- a/apps/user_ldap/lib/helper.php +++ b/apps/user_ldap/lib/helper.php @@ -48,18 +48,25 @@ class Helper { static public function getServerConfigurationPrefixes($activeConfigurations = false) { $referenceConfigkey = 'ldap_configuration_active'; - $query = ' + $sql = ' SELECT DISTINCT `configkey` FROM `*PREFIX*appconfig` WHERE `appid` = \'user_ldap\' AND `configkey` LIKE ? '; + if($activeConfigurations) { - $query .= ' AND `configvalue` = \'1\''; + if (\OC_Config::getValue( 'dbtype', 'sqlite' ) === 'oci') { + //FIXME oracle hack: need to explicitly cast CLOB to CHAR for comparison + $sql .= ' AND to_char(`configvalue`)=\'1\''; + } else { + $sql .= ' AND `configvalue` = \'1\''; + } } - $query = \OCP\DB::prepare($query); - $serverConfigs = $query->execute(array('%'.$referenceConfigkey))->fetchAll(); + $stmt = \OCP\DB::prepare($sql); + + $serverConfigs = $stmt->execute(array('%'.$referenceConfigkey))->fetchAll(); $prefixes = array(); foreach($serverConfigs as $serverConfig) { |