diff options
author | Lukas Reschke <lukas@statuscode.ch> | 2013-01-19 05:56:27 -0800 |
---|---|---|
committer | Lukas Reschke <lukas@statuscode.ch> | 2013-01-19 05:56:27 -0800 |
commit | 53b95cb8fd303e2daa392af23d338f7c9a85f6f4 (patch) | |
tree | fd460b3c77a1e01d52b3b2d7205dfccb5158289f | |
parent | ae244972cb8b1a6c8204236a75eaa0af70adaf6a (diff) | |
parent | f447e6469fb44b70cc03d91903183d0373b0332f (diff) | |
download | nextcloud-server-53b95cb8fd303e2daa392af23d338f7c9a85f6f4.tar.gz nextcloud-server-53b95cb8fd303e2daa392af23d338f7c9a85f6f4.zip |
Merge pull request #1230 from owncloud/remove-unused-autocomplete.php
Remove uneeded file
-rw-r--r-- | apps/files/ajax/autocomplete.php | 54 |
1 files changed, 0 insertions, 54 deletions
diff --git a/apps/files/ajax/autocomplete.php b/apps/files/ajax/autocomplete.php deleted file mode 100644 index b32ba7c3d5b..00000000000 --- a/apps/files/ajax/autocomplete.php +++ /dev/null @@ -1,54 +0,0 @@ -<?php -//provide auto completion of paths for use with jquer ui autocomplete - - -// Init owncloud - - -OCP\JSON::checkLoggedIn(); - -// Get data -$query = $_GET['term']; -$dirOnly=(isset($_GET['dironly']))?($_GET['dironly']=='true'):false; - -if($query[0]!='/') { - $query='/'.$query; -} - -if(substr($query, -1, 1)=='/') { - $base=$query; -} else { - $base=dirname($query); -} - -$query=substr($query, strlen($base)); - -if($base!='/') { - $query=substr($query, 1); -} -$queryLen=strlen($query); -$query=strtolower($query); - -// echo "$base - $query"; - -$files=array(); - -if(OC_Filesystem::file_exists($base) and OC_Filesystem::is_dir($base)) { - $dh = OC_Filesystem::opendir($base); - if($dh) { - if(substr($base, -1, 1)!='/') { - $base=$base.'/'; - } - while (($file = readdir($dh)) !== false) { - if ($file != "." && $file != "..") { - 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); - } - } - } - } - } -} -OCP\JSON::encodedPrint($files); |