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/cache/status.php | |
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/cache/status.php')
-rw-r--r-- | apps/calendar/ajax/cache/status.php | 22 |
1 files changed, 22 insertions, 0 deletions
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 |