diff --git a/calendar/inc/class.calendar.inc.php b/calendar/inc/class.calendar.inc.php index 4d579db76e..5729e309f6 100755 --- a/calendar/inc/class.calendar.inc.php +++ b/calendar/inc/class.calendar.inc.php @@ -131,6 +131,26 @@ class calendar extends calendar_ return (!!($this->rights & $needed) == True); } + function get_long_status($status_short) + { + switch ($status_short) + { + case 'A': + $status = 'Accepted'; + break; + case 'R': + $status = 'Rejected'; + break; + case 'T': + $status = 'Tentative'; + break; + case 'U': + $status = 'No Response'; + break; + } + return $status; + } + function get_weekday_start($year,$month,$day) { global $phpgw_info; @@ -225,6 +245,9 @@ class calendar extends calendar_ { $str = $cal_info->$field; } + + $str .= ' ('.$this->get_long_status($this->users_status).')'; + return $str; } @@ -1465,22 +1488,9 @@ class calendar extends calendar_ { $str .= '
'; } - switch ($event->status[$i]) - { - case 'A': - $status = 'Accepted'; - break; - case 'R': - $status = 'Rejected'; - break; - case 'T': - $status = 'Tentative'; - break; - case 'U': - $status = 'No Response'; - break; - } + $status = $this->get_long_status($event->status[$i]); + $str .= $phpgw->common->grab_owner_name($event->participants[$i]).' ('; if($event->participants[$i] == $this->owner && $this->check_perms(PHPGW_ACL_EDIT) == True) diff --git a/calendar/inc/class.calendar__.inc.php b/calendar/inc/class.calendar__.inc.php index 16cf6f2fa8..4aa17131ed 100755 --- a/calendar/inc/class.calendar__.inc.php +++ b/calendar/inc/class.calendar__.inc.php @@ -38,20 +38,21 @@ if(extension_loaded('mcal') == False) define(M_ALLDAYS,127); } -define('MSG_DELETED',0); -define('MSG_MODIFIED',1); -define('MSG_ADDED',2); +define(MSG_DELETED,0); +define(MSG_MODIFIED,1); +define(MSG_ADDED,2); -define('REJECTED',0); -define('NO_RESPONSE',1); -define('TENTATIVE',2); -define('ACCEPTED',3); +define(REJECTED,0); +define(NO_RESPONSE,1); +define(TENTATIVE,2); +define(ACCEPTED,3); class calendar__ { var $event; var $stream; var $user; + var $users_status; var $modified; var $deleted; var $added; diff --git a/calendar/inc/class.calendar_sql.inc.php b/calendar/inc/class.calendar_sql.inc.php index cbcccae3e5..9d53778e24 100755 --- a/calendar/inc/class.calendar_sql.inc.php +++ b/calendar/inc/class.calendar_sql.inc.php @@ -345,6 +345,10 @@ class calendar_ extends calendar__ { while($this->stream->next_record()) { + if($this->stream->f('cal_login') == $this->user) + { + $this->users_status = $this->stream->f('cal_status'); + } $this->event->participants[] = $this->stream->f('cal_login'); $this->event->status[] = $this->stream->f('cal_status'); }