[VD,cmd:search] fix #2490 support custom search method

See the wiki - https://github.com/Studio-42/elFinder/wiki/Custom-search-function

Also closes #1037 .
This commit is contained in:
nao-pon
2018-05-02 17:49:14 +09:00
parent a4c4d93934
commit ebb89bffa7
9 changed files with 75 additions and 23 deletions
+2 -2
View File
@@ -1165,8 +1165,8 @@ class elFinderVolumeLocalFileSystem extends elFinderVolumeDriver {
* @author Naoki Sawada
**/
protected function doSearch($path, $q, $mimes) {
if ($this->encoding || ! class_exists('FilesystemIterator', false)) {
// non UTF-8 use elFinderVolumeDriver::doSearch()
if (!empty($this->doSearchCurrentQuery['matchMethod']) || $this->encoding || ! class_exists('FilesystemIterator', false)) {
// has custom match method or non UTF-8, use elFinderVolumeDriver::doSearch()
return parent::doSearch($path, $q, $mimes);
}