diff options
author | Robin Appelman <icewind1991@gmail.com> | 2011-06-02 02:31:04 +0200 |
---|---|---|
committer | Robin Appelman <icewind1991@gmail.com> | 2011-06-02 02:31:04 +0200 |
commit | 6c6871336d6570b02b030d521d18eb4d28f2a83f (patch) | |
tree | 293e61d3418533bbcf716f397c06c1690aa7af15 /files/ajax | |
parent | 09458aa639791703aca00d5bf062fb6505ba4126 (diff) | |
download | nextcloud-server-6c6871336d6570b02b030d521d18eb4d28f2a83f.tar.gz nextcloud-server-6c6871336d6570b02b030d521d18eb4d28f2a83f.zip |
make path autocompletion case insensitive
Diffstat (limited to 'files/ajax')
-rw-r--r-- | files/ajax/autocomplete.php | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/files/ajax/autocomplete.php b/files/ajax/autocomplete.php index d22f88474ce..af235379800 100644 --- a/files/ajax/autocomplete.php +++ b/files/ajax/autocomplete.php @@ -34,6 +34,7 @@ if($base!='/'){ $query=substr($query,1); } $queryLen=strlen($query); +$query=strtolower($query); // echo "$base - $query"; @@ -46,7 +47,7 @@ if(OC_FILESYSTEM::is_dir($base)){ } while (($file = readdir($dh)) !== false) { if ($file != "." && $file != ".."){ - if(substr($file,0,$queryLen)==$query){ + if(substr(strtolower($file),0,$queryLen)==$query){ $item=$base.$file; if((!$dirOnly or OC_FILESYSTEM::is_dir($item))){ $files[]=(object)array('id'=>$item,'label'=>$item,'name'=>$item); |