mirror of
https://github.com/Studio-42/elFinder
synced 2026-06-08 12:37:09 +00:00
src build elFinder-2.1-3dfafb0
This commit is contained in:
@@ -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
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user