when using oracle use LOWER() to make searching files case insensitive
This commit is contained in:
parent
519a0ae4ab
commit
a7d8519550
|
@ -217,10 +217,16 @@ class OC_FileCache{
|
||||||
}
|
}
|
||||||
$rootLen=strlen($root);
|
$rootLen=strlen($root);
|
||||||
if(!$returnData) {
|
if(!$returnData) {
|
||||||
$query=OC_DB::prepare('SELECT `path` FROM `*PREFIX*fscache` WHERE `name` LIKE ? AND `user`=?');
|
$select = '`path`';
|
||||||
}else{
|
}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()));
|
$result=$query->execute(array("%$search%",OC_User::getUser()));
|
||||||
$names=array();
|
$names=array();
|
||||||
while($row=$result->fetchRow()) {
|
while($row=$result->fetchRow()) {
|
||||||
|
|
Loading…
Reference in New Issue