aboutsummaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorThomas Mueller <thomas.mueller@tmit.eu>2012-08-29 00:36:27 +0200
committerThomas Mueller <thomas.mueller@tmit.eu>2012-08-29 00:36:27 +0200
commitf301bfd8c9f6b9beda907888708b0d465dc87a83 (patch)
tree405fd7cb32978f2429aaf457170a56067808d07d /apps
parent6d0737de224f3e0a38e296fd8e08893694cf0f25 (diff)
downloadnextcloud-server-f301bfd8c9f6b9beda907888708b0d465dc87a83.tar.gz
nextcloud-server-f301bfd8c9f6b9beda907888708b0d465dc87a83.zip
apply coding style
Diffstat (limited to 'apps')
-rw-r--r--apps/files/ajax/autocomplete.php24
1 files changed, 12 insertions, 12 deletions
diff --git a/apps/files/ajax/autocomplete.php b/apps/files/ajax/autocomplete.php
index e504bb24bf8..fae38368a85 100644
--- a/apps/files/ajax/autocomplete.php
+++ b/apps/files/ajax/autocomplete.php
@@ -11,20 +11,20 @@ OCP\JSON::checkLoggedIn();
$query = $_GET['term'];
$dirOnly=(isset($_GET['dironly']))?($_GET['dironly']=='true'):false;
-if($query[0]!='/'){
+if($query[0]!='/') {
$query='/'.$query;
}
-if(substr($query,-1,1)=='/'){
+if(substr($query, -1, 1)=='/') {
$base=$query;
-}else{
+} else {
$base=dirname($query);
}
-$query=substr($query,strlen($base));
+$query=substr($query, strlen($base));
-if($base!='/'){
- $query=substr($query,1);
+if($base!='/') {
+ $query=substr($query, 1);
}
$queryLen=strlen($query);
$query=strtolower($query);
@@ -33,17 +33,17 @@ $query=strtolower($query);
$files=array();
-if(OC_Filesystem::file_exists($base) and OC_Filesystem::is_dir($base)){
+if(OC_Filesystem::file_exists($base) and OC_Filesystem::is_dir($base)) {
$dh = OC_Filesystem::opendir($base);
- if($dh){
- if(substr($base,-1,1)!='/'){
+ if($dh) {
+ if(substr($base, -1, 1)!='/') {
$base=$base.'/';
}
while (($file = readdir($dh)) !== false) {
- if ($file != "." && $file != ".."){
- if(substr(strtolower($file),0,$queryLen)==$query){
+ if ($file != "." && $file != "..") {
+ if(substr(strtolower($file), 0, $queryLen)==$query) {
$item=$base.$file;
- if((!$dirOnly or OC_Filesystem::is_dir($item))){
+ if((!$dirOnly or OC_Filesystem::is_dir($item))) {
$files[]=(object)array('id'=>$item,'label'=>$item,'name'=>$item);
}
}