From ffe0f08d7cc27f1f8ce90a399df66802a219a5b2 Mon Sep 17 00:00:00 2001 From: skeeter Date: Sat, 24 Mar 2001 05:06:45 +0000 Subject: [PATCH] Added the ability to set a category to the event. This is NOT fully functional, but it falls in line with libmcal. --- calendar/edit_entry.php | 13 ++++++++++++- calendar/edit_entry_handler.php | 2 +- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/calendar/edit_entry.php b/calendar/edit_entry.php index 9673a07f59..7e86dc35f3 100755 --- a/calendar/edit_entry.php +++ b/calendar/edit_entry.php @@ -271,7 +271,6 @@ while ($user = each($users)) { $userid = intval($user[0]); - echo ''."\n"; if($userid != $owner && $phpgw->accounts->exists($userid) == True) { $str .= ' '."\n"; @@ -300,6 +299,18 @@ $str .= '>'; display_item($phpgw->common->grab_owner_name($owner).' '.lang('Participates'),$str); +// Categories + $c = CreateObject('phpgwapi.categories',Array($owner,'calendar')); + if($c->total('calendar') > 0) + { + $str = "\n".' '; + display_item(lang('Categories'),$str); + } + unset($c); + // Repeat Type $p->set_var('hr_text','
'); $p->parse('output','hr',True); diff --git a/calendar/edit_entry_handler.php b/calendar/edit_entry_handler.php index 30b467247c..ff80651bc9 100755 --- a/calendar/edit_entry_handler.php +++ b/calendar/edit_entry_handler.php @@ -109,7 +109,7 @@ $cal_stream = $phpgw->calendar->open('INBOX',intval($owner),''); $phpgw->calendar->event_init($cal_stream); - $phpgw->calendar->event_set_category($cal_stream,''); + $phpgw->calendar->event_set_category($cal_stream,$category); $phpgw->calendar->event_set_title($cal_stream,$title); $phpgw->calendar->event_set_description($cal_stream,$description); $phpgw->calendar->event_set_start($cal_stream,$start[year],$start[month],$start[mday],$start[hour],$start[min],0);