Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Nextcloud
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container Registry
Model registry
Monitor
Service Desk
Analyze
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
TeDomum
Nextcloud
Commits
21832bc8
Commit
21832bc8
authored
11 years ago
by
Jörn Friedrich Dreyer
Browse files
Options
Downloads
Patches
Plain Diff
user workarount to compare CLOB column with CHAR value
parent
0f794b68
No related branches found
Branches containing commit
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
apps/user_ldap/lib/helper.php
+11
-4
11 additions, 4 deletions
apps/user_ldap/lib/helper.php
with
11 additions
and
4 deletions
apps/user_ldap/lib/helper.php
+
11
−
4
View file @
21832bc8
...
@@ -48,18 +48,25 @@ class Helper {
...
@@ -48,18 +48,25 @@ class Helper {
static
public
function
getServerConfigurationPrefixes
(
$activeConfigurations
=
false
)
{
static
public
function
getServerConfigurationPrefixes
(
$activeConfigurations
=
false
)
{
$referenceConfigkey
=
'ldap_configuration_active'
;
$referenceConfigkey
=
'ldap_configuration_active'
;
$
query
=
'
$
sql
=
'
SELECT DISTINCT `configkey`
SELECT DISTINCT `configkey`
FROM `*PREFIX*appconfig`
FROM `*PREFIX*appconfig`
WHERE `appid` = \'user_ldap\'
WHERE `appid` = \'user_ldap\'
AND `configkey` LIKE ?
AND `configkey` LIKE ?
'
;
'
;
if
(
$activeConfigurations
)
{
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
();
$prefixes
=
array
();
foreach
(
$serverConfigs
as
$serverConfig
)
{
foreach
(
$serverConfigs
as
$serverConfig
)
{
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment