diff options
author | Georg Ehrke <dev@georgswebsite.de> | 2012-02-25 16:54:27 +0100 |
---|---|---|
committer | Georg Ehrke <dev@georgswebsite.de> | 2012-02-25 16:54:27 +0100 |
commit | bfb67286c85806fdd4293b60936d5cdedee2e702 (patch) | |
tree | 7136c53adb6c7196c84b2b2295a781e697fa42a9 /apps/calendar/lib | |
parent | 9460c9e907f1dd80e4978e23911975bc775e7260 (diff) | |
parent | 3cf81cadd5535b0516d73fe3de8ee91f330b4a6f (diff) | |
download | nextcloud-server-bfb67286c85806fdd4293b60936d5cdedee2e702.tar.gz nextcloud-server-bfb67286c85806fdd4293b60936d5cdedee2e702.zip |
fix merge conflicts
Diffstat (limited to 'apps/calendar/lib')
-rw-r--r-- | apps/calendar/lib/app.php | 4 | ||||
-rw-r--r-- | apps/calendar/lib/calendar.php | 25 | ||||
-rw-r--r-- | apps/calendar/lib/object.php | 1 | ||||
-rw-r--r-- | apps/calendar/lib/search.php | 2 |
4 files changed, 17 insertions, 15 deletions
diff --git a/apps/calendar/lib/app.php b/apps/calendar/lib/app.php index 27129e77e35..516c04f038a 100644 --- a/apps/calendar/lib/app.php +++ b/apps/calendar/lib/app.php @@ -115,7 +115,8 @@ class OC_Calendar_App{ return OC_Calendar_Object::getWeekofMonth(self::$l10n); } - public static function prepareForOutput($event, $vevent, $return_event){ + public static function prepareForOutput($event, $vevent){ + $return_event = array(); $return_event['id'] = (int)$event['id']; $return_event['title'] = htmlspecialchars($event['summary']); $return_event['description'] = isset($vevent->DESCRIPTION)?htmlspecialchars($vevent->DESCRIPTION->value):''; @@ -127,6 +128,5 @@ class OC_Calendar_App{ } $return_event['lastmodified'] = (int)$lastmodified; return $return_event; - } } diff --git a/apps/calendar/lib/calendar.php b/apps/calendar/lib/calendar.php index 5e272991f20..277539af97d 100644 --- a/apps/calendar/lib/calendar.php +++ b/apps/calendar/lib/calendar.php @@ -96,7 +96,7 @@ class OC_Calendar_Calendar{ * @param string $components Default: "VEVENT,VTODO,VJOURNAL" * @param string $timezone Default: null * @param integer $order Default: 1 - * @param string $color Default: null + * @param string $color Default: null, format: '#RRGGBB(AA)' * @return insertid */ public static function addCalendar($userid,$name,$components='VEVENT,VTODO,VJOURNAL',$timezone=null,$order=0,$color=null){ @@ -122,7 +122,7 @@ class OC_Calendar_Calendar{ * @param string $components * @param string $timezone * @param integer $order - * @param string $color + * @param string $color format: '#RRGGBB(AA)' * @return insertid */ public static function addCalendarFromDAVData($principaluri,$uri,$name,$components,$timezone,$order,$color){ @@ -141,7 +141,7 @@ class OC_Calendar_Calendar{ * @param string $components Default: null * @param string $timezone Default: null * @param integer $order Default: null - * @param string $color Default: null + * @param string $color Default: null, format: '#RRGGBB(AA)' * @return boolean * * Values not null will be set @@ -230,22 +230,23 @@ class OC_Calendar_Calendar{ } public static function getCalendarColorOptions(){ return array( - 'ff0000', // "Red" - 'b3dc6c', // "Green" - 'ffff00', // "Yellow" - '808000', // "Olive" - 'ffa500', // "Orange" - 'ff7f50', // "Coral" - 'ee82ee', // "Violet" - '9fc6e7', // "light blue" + '#ff0000', // "Red" + '#b3dc6c', // "Green" + '#ffff00', // "Yellow" + '#808000', // "Olive" + '#ffa500', // "Orange" + '#ff7f50', // "Coral" + '#ee82ee', // "Violet" + '#9fc6e7', // "light blue" ); } public static function getEventSourceInfo($calendar){ return array( 'url' => 'ajax/events.php?calendar_id='.$calendar['id'], - 'backgroundColor' => '#'.$calendar['calendarcolor'], + 'backgroundColor' => $calendar['calendarcolor'], 'borderColor' => '#888', 'textColor' => 'black', + 'cache' => true, ); } } diff --git a/apps/calendar/lib/object.php b/apps/calendar/lib/object.php index a7ee5bd1081..5a3410ea5dc 100644 --- a/apps/calendar/lib/object.php +++ b/apps/calendar/lib/object.php @@ -194,6 +194,7 @@ class OC_Calendar_Object{ public static function deleteFromDAVData($cid,$uri){ $stmt = OC_DB::prepare( 'DELETE FROM *PREFIX*calendar_objects WHERE calendarid = ? AND uri=?' ); $stmt->execute(array($cid,$uri)); + OC_Calendar_Calendar::touchCalendar($cid); return true; } diff --git a/apps/calendar/lib/search.php b/apps/calendar/lib/search.php index 425c93c7338..0016751a66a 100644 --- a/apps/calendar/lib/search.php +++ b/apps/calendar/lib/search.php @@ -36,7 +36,7 @@ class OC_Search_Provider_Calendar extends OC_Search_Provider{ }else{ $info = $l->t('Date') . ': ' . $start_dt->format('d.m.y H:i') . ' - ' . $end_dt->format('d.m.y H:i'); } - $link = OC_Helper::linkTo('apps/calendar', 'index.php?showevent='.urlencode($object['id'])); + $link = OC_Helper::linkTo('calendar', 'index.php').'?showevent='.urlencode($object['id']); $results[]=new OC_Search_Result($object['summary'],$info, $link,$l->t('Cal.'));//$name,$text,$link,$type } } |