[php:VolumeDropbox] includes items only under root path in search result

This commit is contained in:
nao-pon
2014-12-08 11:31:40 +09:00
parent 6a982232c2
commit ccf3eee4a0
+1 -1
View File
@@ -656,7 +656,7 @@ class elFinderVolumeDropbox extends elFinderVolumeDriver {
protected function doSearch($path, $q, $mimes) {
$result = array();
$sth = $this->DB->prepare('select dat from '.$this->DB_TableName.' WHERE path LIKE ? AND fname LIKE ?');
$sth->execute(array('%'.(($path === $this->root)? '' : strtolower($path)), '%'.strtolower($q).'%'));
$sth->execute(array('%'.(($path === '/')? '' : strtolower($path)), '%'.strtolower($q).'%'));
$res = $sth->fetchAll(PDO::FETCH_COLUMN);
if ($res) {
foreach($res as $raw) {