src build elFinder-2.1-3dfafb0

This commit is contained in:
nao-pon
2018-06-06 21:05:04 +09:00
parent 7104edc30a
commit b1fce9973f
5 changed files with 20 additions and 7 deletions
+14 -1
View File
@@ -4612,7 +4612,7 @@ abstract class elFinderVolumeDriver {
**/
protected function doSearch($path, $q, $mimes) {
$result = array();
$matchMethod = empty($this->doSearchCurrentQuery['matchMethod'])? 'stripos' : $this->doSearchCurrentQuery['matchMethod'];
$matchMethod = empty($this->doSearchCurrentQuery['matchMethod'])? 'searchMatchName' : $this->doSearchCurrentQuery['matchMethod'];
$timeout = $this->options['searchTimeout']? $this->searchStart + $this->options['searchTimeout'] : 0;
if ($timeout && $timeout < time()) {
$this->setError(elFinder::ERROR_SEARCH_TIMEOUT, $this->path($this->encode($path)));
@@ -6007,6 +6007,19 @@ abstract class elFinderVolumeDriver {
return stripos($haystack , $needle , $offset);
}
/**
* Default serach match method (name match)
*
* @param String $name Item name
* @param String $query Query word
* @param String $path Item path
*
* @return @return bool
*/
protected function searchMatchName($name , $query , $path) {
return (bool)$this->stripos($name , $query);
}
/**
* Get server side available archivers
*