diff options
author | Thomas Mueller <thomas.mueller@tmit.eu> | 2012-08-29 00:50:12 +0200 |
---|---|---|
committer | Thomas Mueller <thomas.mueller@tmit.eu> | 2012-08-29 00:50:12 +0200 |
commit | fe49cbafc77f8a197dfe5c947360d9e52396d081 (patch) | |
tree | 4a2a1c027c809f0ae29d638231127a1003344959 /apps/files/ajax/scan.php | |
parent | f301bfd8c9f6b9beda907888708b0d465dc87a83 (diff) | |
download | nextcloud-server-fe49cbafc77f8a197dfe5c947360d9e52396d081.tar.gz nextcloud-server-fe49cbafc77f8a197dfe5c947360d9e52396d081.zip |
apply coding style
Diffstat (limited to 'apps/files/ajax/scan.php')
-rw-r--r-- | apps/files/ajax/scan.php | 27 |
1 files changed, 14 insertions, 13 deletions
diff --git a/apps/files/ajax/scan.php b/apps/files/ajax/scan.php index eef38858516..e38484b97dd 100644 --- a/apps/files/ajax/scan.php +++ b/apps/files/ajax/scan.php @@ -6,38 +6,39 @@ $force=isset($_GET['force']) and $_GET['force']=='true'; $dir=isset($_GET['dir'])?$_GET['dir']:''; $checkOnly=isset($_GET['checkonly']) and $_GET['checkonly']=='true'; -if(!$checkOnly){ +if(!$checkOnly) { $eventSource=new OC_EventSource(); } session_write_close(); //create the file cache if necesary -if($force or !OC_FileCache::inCache('')){ - if(!$checkOnly){ +if($force or !OC_FileCache::inCache('')) { + if(!$checkOnly) { OCP\DB::beginTransaction(); - if(OC_Cache::isFast()){ - OC_Cache::clear('fileid/'); //make sure the old fileid's don't mess things up + if(OC_Cache::isFast()) { + //make sure the old fileid's don't mess things up + OC_Cache::clear('fileid/'); } - OC_FileCache::scan($dir,$eventSource); + OC_FileCache::scan($dir, $eventSource); OC_FileCache::clean(); OCP\DB::commit(); - $eventSource->send('success',true); - }else{ + $eventSource->send('success', true); + } else { OCP\JSON::success(array('data'=>array('done'=>true))); exit; } -}else{ - if($checkOnly){ +} else { + if($checkOnly) { OCP\JSON::success(array('data'=>array('done'=>false))); exit; } - if(isset($eventSource)){ + if(isset($eventSource)) { $eventSource->send('success',false); - }else{ + } else { exit; } } -$eventSource->close();
\ No newline at end of file +$eventSource->close(); |