diff options
author | Georg Ehrke <dev@georgswebsite.de> | 2012-06-11 22:16:26 +0200 |
---|---|---|
committer | Georg Ehrke <dev@georgswebsite.de> | 2012-06-11 22:16:26 +0200 |
commit | 3c9be43aa45d0d25b070289607bb78e38d7bc35c (patch) | |
tree | 1d5d81f78b21c60bc02a74d023b54e255a77c57e /apps/calendar/ajax | |
parent | 08a3a4f1859851496d7cd975d7bc2b3256a998b1 (diff) | |
download | nextcloud-server-3c9be43aa45d0d25b070289607bb78e38d7bc35c.tar.gz nextcloud-server-3c9be43aa45d0d25b070289607bb78e38d7bc35c.zip |
add some information about repeating events caching on personal settings page
Diffstat (limited to 'apps/calendar/ajax')
-rw-r--r-- | apps/calendar/ajax/cache/rescan.php | 8 | ||||
-rw-r--r-- | apps/calendar/ajax/cache/status.php | 22 |
2 files changed, 28 insertions, 2 deletions
diff --git a/apps/calendar/ajax/cache/rescan.php b/apps/calendar/ajax/cache/rescan.php index 1355179b957..3417f1ae4b4 100644 --- a/apps/calendar/ajax/cache/rescan.php +++ b/apps/calendar/ajax/cache/rescan.php @@ -7,5 +7,9 @@ */ OCP\JSON::checkLoggedIn(); OCP\JSON::checkAppEnabled('calendar'); -OC_Calendar_Repeat::cleancalendar(OCP\USER::getUser()); -OC_Calendar_Repeat::generatecalendar(OCP\USER::getUser());
\ No newline at end of file +$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 diff --git a/apps/calendar/ajax/cache/status.php b/apps/calendar/ajax/cache/status.php index e69de29bb2d..d2806d47895 100644 --- a/apps/calendar/ajax/cache/status.php +++ b/apps/calendar/ajax/cache/status.php @@ -0,0 +1,22 @@ +<?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()); +$allcached = true; +foreach($calendars as $calendar){ + if(!OC_Calendar_Repeat::is_calendar_cached($calendar['id'])){ + $allcached = false; + } +} +$l = new OC_L10N('calendar'); +if(!$allcached){ + OCP\JSON::error(array('message'=>'Not all calendars are completely cached', 'l10n'=>$l->t('Not all calendars are completely cached'))); +}else{ + OCP\JSON::success(array('message'=>'Everything seems to be completely cached', 'l10n'=>$l->t('Everything seems to be completely cached'))); +}
\ No newline at end of file |