summaryrefslogtreecommitdiffstats
path: root/files/ajax
diff options
context:
space:
mode:
authorRobin Appelman <icewind1991@gmail.com>2011-11-10 16:40:09 +0100
committerRobin Appelman <icewind1991@gmail.com>2011-11-10 16:40:09 +0100
commit524e3686a0da79493a6048d8d92b7bbb0982ec08 (patch)
treedf3ff86248e797cc86ab2e2df0cc9061b4c5221e /files/ajax
parent5a6aba1e1114707942c613c2402eed3237b43a21 (diff)
downloadnextcloud-server-524e3686a0da79493a6048d8d92b7bbb0982ec08.tar.gz
nextcloud-server-524e3686a0da79493a6048d8d92b7bbb0982ec08.zip
tell the user when the files are being scanned
Diffstat (limited to 'files/ajax')
-rw-r--r--files/ajax/scan.php16
1 files changed, 16 insertions, 0 deletions
diff --git a/files/ajax/scan.php b/files/ajax/scan.php
new file mode 100644
index 00000000000..dec949a819b
--- /dev/null
+++ b/files/ajax/scan.php
@@ -0,0 +1,16 @@
+<?php
+
+require_once '../../lib/base.php';
+
+$force=isset($_GET['force']) and $_GET['force']=='true';
+$checkOnly=isset($_GET['checkonly']) and $_GET['checkonly']=='true';
+
+//create the file cache if necesary
+if($force or !OC_FileCache::inCache('')){
+ if(!$checkOnly){
+ OC_FileCache::scan('');
+ }
+ OC_JSON::success(array("data" => array( "done" => true)));
+}else{
+ OC_JSON::success(array("data" => array( "done" => false)));
+} \ No newline at end of file