Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/nextcloud/server.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@gmx.de>2014-06-05 14:19:48 +0400
committerJoas Schilling <nickvergessen@gmx.de>2014-06-05 14:19:48 +0400
commit4b1896712901ee0c4e71a25c8e1dd3dc18d63c46 (patch)
tree864616177cbcf6d5b6c5f433e3135c8d25ff9e6b /lib/private/preferences.php
parent879237f32ac4af820fddd2d07ca342000f5723eb (diff)
Hack around oracle for CLOB fields
Diffstat (limited to 'lib/private/preferences.php')
-rw-r--r--lib/private/preferences.php10
1 files changed, 9 insertions, 1 deletions
diff --git a/lib/private/preferences.php b/lib/private/preferences.php
index f1de95a5e11..0dc5b26810a 100644
--- a/lib/private/preferences.php
+++ b/lib/private/preferences.php
@@ -254,7 +254,15 @@ class Preferences {
$query = 'SELECT `userid` '
. ' FROM `*PREFIX*preferences` '
- . ' WHERE `appid` = ? AND `configkey` = ? AND `configvalue` = ?';
+ . ' WHERE `appid` = ? AND `configkey` = ? AND ';
+
+ if (\OC_Config::getValue( 'dbtype', 'sqlite' ) === 'oci') {
+ //FIXME oracle hack: need to explicitly cast CLOB to CHAR for comparison
+ $query .= ' to_char(`configvalue`)= ?';
+ } else {
+ $query .= ' `configvalue` = ?';
+ }
+
$result = $this->conn->executeQuery($query, array($app, $key, $value));
while ($row = $result->fetch()) {