diff options
author | Jörn Friedrich Dreyer <jfd@butonic.de> | 2012-10-17 18:17:20 +0200 |
---|---|---|
committer | Jörn Friedrich Dreyer <jfd@butonic.de> | 2012-10-18 14:19:34 +0200 |
commit | a7d8519550db924a483b74408422ccccb266cb45 (patch) | |
tree | 2234837931d0d955d02681ad615713134ec3a5f8 /lib | |
parent | 519a0ae4abad95ffbaa58847c2068c8f861ea416 (diff) | |
download | nextcloud-server-a7d8519550db924a483b74408422ccccb266cb45.tar.gz nextcloud-server-a7d8519550db924a483b74408422ccccb266cb45.zip |
when using oracle use LOWER() to make searching files case insensitive
Diffstat (limited to 'lib')
-rw-r--r-- | lib/filecache.php | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/lib/filecache.php b/lib/filecache.php index a36cfef6759..9e9ef606a9a 100644 --- a/lib/filecache.php +++ b/lib/filecache.php @@ -217,10 +217,16 @@ class OC_FileCache{ } $rootLen=strlen($root); if(!$returnData) { - $query=OC_DB::prepare('SELECT `path` FROM `*PREFIX*fscache` WHERE `name` LIKE ? AND `user`=?'); + $select = '`path`'; }else{ - $query=OC_DB::prepare('SELECT * FROM `*PREFIX*fscache` WHERE `name` LIKE ? AND `user`=?'); + $select = '*'; } + if (OC_Config::getValue('dbtype') === 'oci8') { + $where = 'LOWER(`name`) LIKE LOWER(?) AND `user`=?'; + } else { + $where = '`name` LIKE ? AND `user`=?'; + } + $query=OC_DB::prepare('SELECT '.$select.' FROM `*PREFIX*fscache` WHERE '.$where); $result=$query->execute(array("%$search%",OC_User::getUser())); $names=array(); while($row=$result->fetchRow()) { |