From: Georg Ehrke Date: Sun, 25 Mar 2012 12:02:02 +0000 (+0200) Subject: fix merge conflicts X-Git-Tag: v4.0.0beta~244^2~53 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=19c101a660e311437bd471f0c87f0a9413351f7f;p=nextcloud-server.git fix merge conflicts --- 19c101a660e311437bd471f0c87f0a9413351f7f diff --cc apps/calendar/ajax/events.php index 887cf8b2072,c62f93c540e..196b2c3394f --- a/apps/calendar/ajax/events.php +++ b/apps/calendar/ajax/events.php @@@ -7,7 -7,24 +7,7 @@@ */ require_once ('../../../lib/base.php'); - require_once('../../../3rdparty/when/When.php'); + require_once('when/When.php'); -$l = new OC_L10N('calendar'); -$unnamed = $l->t('unnamed'); -function create_return_event($event, $vevent){ - $return_event = array(); - global $unnamed; - $return_event['id'] = (int)$event['id']; - $return_event['title'] = htmlspecialchars(($event['summary']!=NULL || $event['summary'] != '')?$event['summary']: $unnamed); - $return_event['description'] = isset($vevent->DESCRIPTION)?htmlspecialchars($vevent->DESCRIPTION->value):''; - $last_modified = $vevent->__get('LAST-MODIFIED'); - if ($last_modified){ - $lastmodified = $last_modified->getDateTime()->format('U'); - }else{ - $lastmodified = 0; - } - $return_event['lastmodified'] = (int)$lastmodified; - return $return_event; -} OC_JSON::checkLoggedIn(); OC_JSON::checkAppEnabled('calendar'); diff --cc apps/calendar/lib/app.php index 516c04f038a,6e92cf67c5c..f50c65ab4f7 --- a/apps/calendar/lib/app.php +++ b/apps/calendar/lib/app.php @@@ -114,19 -114,4 +114,19 @@@ class OC_Calendar_App public static function getWeekofMonth(){ return OC_Calendar_Object::getWeekofMonth(self::$l10n); } + + public static function prepareForOutput($event, $vevent){ + $return_event = array(); + $return_event['id'] = (int)$event['id']; - $return_event['title'] = htmlspecialchars($event['summary']); ++ $return_event['title'] = htmlspecialchars(($event['summary']!=NULL || $event['summary'] != '')?$event['summary']: self::$l10n->t('unnamed')); + $return_event['description'] = isset($vevent->DESCRIPTION)?htmlspecialchars($vevent->DESCRIPTION->value):''; + $last_modified = $vevent->__get('LAST-MODIFIED'); + if ($last_modified){ + $lastmodified = $last_modified->getDateTime()->format('U'); + }else{ + $lastmodified = 0; + } + $return_event['lastmodified'] = (int)$lastmodified; + return $return_event; + } }