@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | ); |
106 | 106 | if ($location == 'admin') |
107 | 107 | { |
108 | - display_section(self::$appname,$file); |
|
108 | + display_section(self::$appname,$file); |
|
109 | 109 | } |
110 | 110 | else |
111 | 111 | { |
@@ -128,7 +128,7 @@ discard block |
||
128 | 128 | 'yes' => lang('Yes') |
129 | 129 | ); |
130 | 130 | |
131 | - $settings = array( |
|
131 | + $settings = array( |
|
132 | 132 | 'startfolder' => array( |
133 | 133 | 'type' => 'input', |
134 | 134 | 'name' => 'startfolder', |
@@ -123,7 +123,7 @@ |
||
123 | 123 | } |
124 | 124 | // Custom fields |
125 | 125 | if($content && strpos($content, '#') !== 0) |
126 | - { |
|
126 | + { |
|
127 | 127 | // Expand link-to custom fields |
128 | 128 | $this->cf_link_to_expand($file, $content, $info); |
129 | 129 |
@@ -1909,7 +1909,7 @@ |
||
1909 | 1909 | WHERE cal_id='.(int)$row['cal_id'].' AND cal_start='.(int)$row['cal_start'],__LINE__,__FILE__); |
1910 | 1910 | } |
1911 | 1911 | |
1912 | - $GLOBALS['egw_setup']->db->query('UPDATE egw_cal_repeats SET recur_interval=1 |
|
1912 | + $GLOBALS['egw_setup']->db->query('UPDATE egw_cal_repeats SET recur_interval=1 |
|
1913 | 1913 | WHERE recur_interval=0',__LINE__,__FILE__); |
1914 | 1914 | |
1915 | 1915 | return $GLOBALS['setup_info']['calendar']['currentver'] = '1.7.007'; |
@@ -483,15 +483,15 @@ discard block |
||
483 | 483 | { |
484 | 484 | $user = $this->resource_info($this->user); |
485 | 485 | $attributes['ATTENDEE'][] = 'mailto:' . $user['email']; |
486 | - $parameters['ATTENDEE'][] = array( |
|
487 | - 'CN' => $user['name'], |
|
488 | - 'ROLE' => 'REQ-PARTICIPANT', |
|
486 | + $parameters['ATTENDEE'][] = array( |
|
487 | + 'CN' => $user['name'], |
|
488 | + 'ROLE' => 'REQ-PARTICIPANT', |
|
489 | 489 | 'PARTSTAT' => 'NEEDS-ACTION', |
490 | 490 | 'CUTYPE' => 'INDIVIDUAL', |
491 | 491 | 'RSVP' => 'TRUE', |
492 | 492 | 'X-EGROUPWARE-UID' => (string)$this->user, |
493 | - ); |
|
494 | - $event['participants'][$this->user] = true; |
|
493 | + ); |
|
494 | + $event['participants'][$this->user] = true; |
|
495 | 495 | } |
496 | 496 | break; |
497 | 497 | case 'r': |
@@ -543,24 +543,24 @@ discard block |
||
543 | 543 | } |
544 | 544 | break; |
545 | 545 | |
546 | - case 'ORGANIZER': |
|
547 | - if (!$organizerURL) |
|
548 | - { |
|
549 | - $organizerCN = '"' . trim($GLOBALS['egw']->accounts->id2name($event['owner'],'account_firstname') |
|
550 | - . ' ' . $GLOBALS['egw']->accounts->id2name($event['owner'],'account_lastname')) . '"'; |
|
551 | - $organizerEMail = $GLOBALS['egw']->accounts->id2name($event['owner'],'account_email'); |
|
552 | - if ($version == '1.0') |
|
553 | - { |
|
554 | - $organizerURL = trim($organizerCN . (empty($organizerURL) ? '' : ' <' . $organizerURL .'>')); |
|
555 | - } |
|
556 | - else |
|
557 | - { |
|
558 | - $organizerURL = empty($organizerEMail) ? '' : 'mailto:' . $organizerEMail; |
|
559 | - } |
|
560 | - $organizerUID = $event['owner']; |
|
561 | - if (!isset($event['participants'][$event['owner']])) |
|
562 | - { |
|
563 | - $options = array( |
|
546 | + case 'ORGANIZER': |
|
547 | + if (!$organizerURL) |
|
548 | + { |
|
549 | + $organizerCN = '"' . trim($GLOBALS['egw']->accounts->id2name($event['owner'],'account_firstname') |
|
550 | + . ' ' . $GLOBALS['egw']->accounts->id2name($event['owner'],'account_lastname')) . '"'; |
|
551 | + $organizerEMail = $GLOBALS['egw']->accounts->id2name($event['owner'],'account_email'); |
|
552 | + if ($version == '1.0') |
|
553 | + { |
|
554 | + $organizerURL = trim($organizerCN . (empty($organizerURL) ? '' : ' <' . $organizerURL .'>')); |
|
555 | + } |
|
556 | + else |
|
557 | + { |
|
558 | + $organizerURL = empty($organizerEMail) ? '' : 'mailto:' . $organizerEMail; |
|
559 | + } |
|
560 | + $organizerUID = $event['owner']; |
|
561 | + if (!isset($event['participants'][$event['owner']])) |
|
562 | + { |
|
563 | + $options = array( |
|
564 | 564 | 'ROLE' => 'CHAIR', |
565 | 565 | 'PARTSTAT' => 'DELEGATED', |
566 | 566 | 'CUTYPE' => 'INDIVIDUAL', |
@@ -570,20 +570,20 @@ discard block |
||
570 | 570 | if (!empty($organizerEMail)) $options['EMAIL'] = $organizerEMail; |
571 | 571 | if (!empty($event['owner'])) $options['X-EGROUPWARE-UID'] = $event['owner']; |
572 | 572 | $attributes['ATTENDEE'][] = $organizerURL; |
573 | - $parameters['ATTENDEE'][] = $options; |
|
574 | - } |
|
575 | - } |
|
576 | - // do NOT use ORGANIZER for events without further participants or a different organizer |
|
577 | - if (count($event['participants']) > 1 || !isset($event['participants'][$event['owner']])) |
|
578 | - { |
|
579 | - $attributes['ORGANIZER'] = $organizerURL; |
|
580 | - $parameters['ORGANIZER']['CN'] = $organizerCN; |
|
581 | - if (!empty($organizerUID)) |
|
582 | - { |
|
583 | - $parameters['ORGANIZER']['X-EGROUPWARE-UID'] = $organizerUID; |
|
584 | - } |
|
585 | - } |
|
586 | - break; |
|
573 | + $parameters['ATTENDEE'][] = $options; |
|
574 | + } |
|
575 | + } |
|
576 | + // do NOT use ORGANIZER for events without further participants or a different organizer |
|
577 | + if (count($event['participants']) > 1 || !isset($event['participants'][$event['owner']])) |
|
578 | + { |
|
579 | + $attributes['ORGANIZER'] = $organizerURL; |
|
580 | + $parameters['ORGANIZER']['CN'] = $organizerCN; |
|
581 | + if (!empty($organizerUID)) |
|
582 | + { |
|
583 | + $parameters['ORGANIZER']['X-EGROUPWARE-UID'] = $organizerUID; |
|
584 | + } |
|
585 | + } |
|
586 | + break; |
|
587 | 587 | |
588 | 588 | case 'DTSTART': |
589 | 589 | if (empty($event['whole_day'])) |
@@ -992,12 +992,12 @@ discard block |
||
992 | 992 | foreach (is_array($value) && $parameters[$key]['VALUE']!='DATE' ? $value : array($value) as $valueID => $valueData) |
993 | 993 | { |
994 | 994 | $valueData = Api\Translation::convert($valueData,Api\Translation::charset(),$charset); |
995 | - $paramData = (array) Api\Translation::convert(is_array($value) ? |
|
996 | - $parameters[$key][$valueID] : $parameters[$key], |
|
997 | - Api\Translation::charset(),$charset); |
|
998 | - $valuesData = (array) Api\Translation::convert($values[$key], |
|
999 | - Api\Translation::charset(),$charset); |
|
1000 | - $content = $valueData . implode(';', $valuesData); |
|
995 | + $paramData = (array) Api\Translation::convert(is_array($value) ? |
|
996 | + $parameters[$key][$valueID] : $parameters[$key], |
|
997 | + Api\Translation::charset(),$charset); |
|
998 | + $valuesData = (array) Api\Translation::convert($values[$key], |
|
999 | + Api\Translation::charset(),$charset); |
|
1000 | + $content = $valueData . implode(';', $valuesData); |
|
1001 | 1001 | |
1002 | 1002 | if ($version == '1.0' && (preg_match('/[^\x20-\x7F]/', $content) || |
1003 | 1003 | ($paramData['CN'] && preg_match('/[^\x20-\x7F]/', $paramData['CN'])))) |
@@ -2233,7 +2233,7 @@ discard block |
||
2233 | 2233 | * @param string|resource $_vcalData |
2234 | 2234 | * @param string $principalURL ='' Used for CalDAV imports |
2235 | 2235 | * @param string $charset The encoding charset for $text. Defaults to |
2236 | - * utf-8 for new format, iso-8859-1 for old format. |
|
2236 | + * utf-8 for new format, iso-8859-1 for old format. |
|
2237 | 2237 | * @return Iterator|array|boolean Iterator if resource given or array of events on success, false on failure |
2238 | 2238 | */ |
2239 | 2239 | function icaltoegw($_vcalData, $principalURL='', $charset=null) |
@@ -2784,10 +2784,10 @@ discard block |
||
2784 | 2784 | // fall throught |
2785 | 2785 | case 'ATTENDEE': |
2786 | 2786 | if (isset($attributes['params']['PARTSTAT'])) |
2787 | - { |
|
2788 | - $attributes['params']['STATUS'] = $attributes['params']['PARTSTAT']; |
|
2789 | - } |
|
2790 | - if (isset($attributes['params']['STATUS'])) |
|
2787 | + { |
|
2788 | + $attributes['params']['STATUS'] = $attributes['params']['PARTSTAT']; |
|
2789 | + } |
|
2790 | + if (isset($attributes['params']['STATUS'])) |
|
2791 | 2791 | { |
2792 | 2792 | $status = $this->status_ical2egw[strtoupper($attributes['params']['STATUS'])]; |
2793 | 2793 | if (empty($status)) $status = 'X'; |
@@ -3178,7 +3178,7 @@ discard block |
||
3178 | 3178 | array2string($event)."\n",3,$this->logfile); |
3179 | 3179 | } |
3180 | 3180 | //Horde::logMessage("vevent2egw:\n" . print_r($event, true), |
3181 | - // __FILE__, __LINE__, PEAR_LOG_DEBUG); |
|
3181 | + // __FILE__, __LINE__, PEAR_LOG_DEBUG); |
|
3182 | 3182 | return $event; |
3183 | 3183 | } |
3184 | 3184 |
@@ -32,8 +32,8 @@ |
||
32 | 32 | protected static $conditions = array('exists'); |
33 | 33 | |
34 | 34 | /** |
35 | - * For figuring out if an entry has changed |
|
36 | - */ |
|
35 | + * For figuring out if an entry has changed |
|
36 | + */ |
|
37 | 37 | protected $tracking; |
38 | 38 | |
39 | 39 | /** |
@@ -177,7 +177,7 @@ |
||
177 | 177 | * @param int $cutoffdate =null |
178 | 178 | * @param array $not_uids =null uids NOT to return for meeting requests |
179 | 179 | * @return array |
180 | - */ |
|
180 | + */ |
|
181 | 181 | function GetMessageList($id, $cutoffdate=NULL, array $not_uids=null) |
182 | 182 | { |
183 | 183 | if (!isset($this->calendar)) $this->calendar = new calendar_boupdate(); |
@@ -387,11 +387,11 @@ |
||
387 | 387 | } |
388 | 388 | |
389 | 389 | /** |
390 | - * gets the icons displayed for a given event |
|
391 | - * |
|
392 | - * @param array $event |
|
393 | - * @return array of 'img' / 'title' pairs |
|
394 | - */ |
|
390 | + * gets the icons displayed for a given event |
|
391 | + * |
|
392 | + * @param array $event |
|
393 | + * @return array of 'img' / 'title' pairs |
|
394 | + */ |
|
395 | 395 | function event_icons($event) |
396 | 396 | { |
397 | 397 | $is_private = !$event['public'] && !$this->bo->check_perms(Acl::READ,$event); |
@@ -2415,14 +2415,14 @@ discard block |
||
2415 | 2415 | } |
2416 | 2416 | |
2417 | 2417 | /** |
2418 | - * Export events as vCalendar version 2.0 files (iCal) |
|
2419 | - * |
|
2420 | - * @param int|array $content numeric cal_id or submitted content from etempalte::exec |
|
2421 | - * @param boolean $return_error should an error-msg be returned or a regular page with it generated (default) |
|
2422 | - * @return string error-msg if $return_error |
|
2423 | - */ |
|
2424 | - function export($content=0,$return_error=false) |
|
2425 | - { |
|
2418 | + * Export events as vCalendar version 2.0 files (iCal) |
|
2419 | + * |
|
2420 | + * @param int|array $content numeric cal_id or submitted content from etempalte::exec |
|
2421 | + * @param boolean $return_error should an error-msg be returned or a regular page with it generated (default) |
|
2422 | + * @return string error-msg if $return_error |
|
2423 | + */ |
|
2424 | + function export($content=0,$return_error=false) |
|
2425 | + { |
|
2426 | 2426 | $boical = new calendar_ical(); |
2427 | 2427 | #error_log(__METHOD__.print_r($content,true)); |
2428 | 2428 | if (is_numeric($cal_id = $content ? $content : $_REQUEST['cal_id'])) |
@@ -2476,7 +2476,7 @@ discard block |
||
2476 | 2476 | $GLOBALS['egw_info']['flags']['app_header'] = lang('calendar') . ' - ' . lang('iCal Export'); |
2477 | 2477 | $etpl = new etemplate_new('calendar.export'); |
2478 | 2478 | $etpl->exec('calendar.calendar_uiforms.export',$content); |
2479 | - } |
|
2479 | + } |
|
2480 | 2480 | |
2481 | 2481 | /** |
2482 | 2482 | * Edit category ACL (admin only) |
@@ -2548,8 +2548,8 @@ discard block |
||
2548 | 2548 | } |
2549 | 2549 | |
2550 | 2550 | /** |
2551 | - * Set up the required fields to get the history tab |
|
2552 | - */ |
|
2551 | + * Set up the required fields to get the history tab |
|
2552 | + */ |
|
2553 | 2553 | public function setup_history(&$content, &$sel_options) |
2554 | 2554 | { |
2555 | 2555 | $status = 'history_status'; |
@@ -1490,13 +1490,13 @@ discard block |
||
1490 | 1490 | } |
1491 | 1491 | |
1492 | 1492 | /** |
1493 | - * Converts a participant into a (readable) user- or resource-name |
|
1494 | - * |
|
1495 | - * @param string|int $id id of user or resource |
|
1496 | - * @param string|boolean $use_type =false type-letter or false |
|
1497 | - * @param boolean $append_email =false append email (Name <email>) |
|
1498 | - * @return string with name |
|
1499 | - */ |
|
1493 | + * Converts a participant into a (readable) user- or resource-name |
|
1494 | + * |
|
1495 | + * @param string|int $id id of user or resource |
|
1496 | + * @param string|boolean $use_type =false type-letter or false |
|
1497 | + * @param boolean $append_email =false append email (Name <email>) |
|
1498 | + * @return string with name |
|
1499 | + */ |
|
1500 | 1500 | function participant_name($id,$use_type=false, $append_email=false) |
1501 | 1501 | { |
1502 | 1502 | static $id2lid = array(); |
@@ -1525,13 +1525,13 @@ discard block |
||
1525 | 1525 | } |
1526 | 1526 | |
1527 | 1527 | /** |
1528 | - * Converts participants array of an event into array of (readable) participant-names with status |
|
1529 | - * |
|
1530 | - * @param array $event event-data |
|
1531 | - * @param boolean $long_status =false should the long/verbose status or an icon be use |
|
1532 | - * @param boolean $show_group_invitation =false show group-invitations (status == 'G') or not (default) |
|
1533 | - * @return array with id / names with status pairs |
|
1534 | - */ |
|
1528 | + * Converts participants array of an event into array of (readable) participant-names with status |
|
1529 | + * |
|
1530 | + * @param array $event event-data |
|
1531 | + * @param boolean $long_status =false should the long/verbose status or an icon be use |
|
1532 | + * @param boolean $show_group_invitation =false show group-invitations (status == 'G') or not (default) |
|
1533 | + * @return array with id / names with status pairs |
|
1534 | + */ |
|
1535 | 1535 | function participants($event,$long_status=false,$show_group_invitation=false) |
1536 | 1536 | { |
1537 | 1537 | //error_log(__METHOD__.__LINE__.array2string($event['participants'])); |
@@ -1601,12 +1601,12 @@ discard block |
||
1601 | 1601 | } |
1602 | 1602 | |
1603 | 1603 | /** |
1604 | - * Converts category string of an event into array of (readable) category-names |
|
1605 | - * |
|
1606 | - * @param string $category cat-id (multiple id's commaseparated) |
|
1607 | - * @param int $color color of the category, if multiple cats, the color of the last one with color is returned |
|
1608 | - * @return array with id / names |
|
1609 | - */ |
|
1604 | + * Converts category string of an event into array of (readable) category-names |
|
1605 | + * |
|
1606 | + * @param string $category cat-id (multiple id's commaseparated) |
|
1607 | + * @param int $color color of the category, if multiple cats, the color of the last one with color is returned |
|
1608 | + * @return array with id / names |
|
1609 | + */ |
|
1610 | 1610 | function categories($category,&$color) |
1611 | 1611 | { |
1612 | 1612 | static $id2cat = array(); |