summaryrefslogtreecommitdiffstats
path: root/apps/calendar/ajax/cache/rescan.php
diff options
context:
space:
mode:
Diffstat (limited to 'apps/calendar/ajax/cache/rescan.php')
-rw-r--r--apps/calendar/ajax/cache/rescan.php15
1 files changed, 15 insertions, 0 deletions
diff --git a/apps/calendar/ajax/cache/rescan.php b/apps/calendar/ajax/cache/rescan.php
new file mode 100644
index 00000000000..3417f1ae4b4
--- /dev/null
+++ b/apps/calendar/ajax/cache/rescan.php
@@ -0,0 +1,15 @@
+<?php
+/**
+ * Copyright (c) 2012 Georg Ehrke <georg@ownCloud.com>
+ * This file is licensed under the Affero General Public License version 3 or
+ * later.
+ * See the COPYING-README file.
+ */
+OCP\JSON::checkLoggedIn();
+OCP\JSON::checkAppEnabled('calendar');
+$calendars = OC_Calendar_Calendar::allCalendars(OCP\USER::getUser());
+foreach($calendars as $calendar){
+ OC_Calendar_Repeat::cleancalendar($calendar['id']);
+ OC_Calendar_Repeat::generatecalendar($calendar['id']);
+}
+OCP\JSON::success(); \ No newline at end of file