fix to get hook_email working with both email and felamimail

This commit is contained in:
Ralf Becker 2002-11-24 10:34:28 +00:00
parent ba80c900a7
commit 9892d222c5
2 changed files with 20 additions and 18 deletions

View File

@ -2510,7 +2510,8 @@
$GLOBALS['phpgw']->preferences->save_repository(); $GLOBALS['phpgw']->preferences->save_repository();
} }
} }
if($GLOBALS['phpgw_info']['flags']['currentapp'] == 'home') if($GLOBALS['phpgw_info']['flags']['currentapp'] == 'home' ||
strstr($GLOBALS['phpgw_info']['flags']['currentapp'],'mail')) // email, felamimail, ...
{ {
$page_app = 'calendar'; $page_app = 'calendar';
} }
@ -3952,8 +3953,7 @@
$pix = $GLOBALS['phpgw']->common->image('calendar','pix'); $pix = $GLOBALS['phpgw']->common->image('calendar','pix');
$str = '<center>'.lang($GLOBALS['phpgw']->common->show_date($date['raw'],'l')) $str = '<center>'.lang($GLOBALS['phpgw']->common->show_date($date['raw'],'l'))
. ', '.lang($GLOBALS['phpgw']->common->show_date($date['raw'],'F')) . ', '.$this->bo->long_date($date).'<br>'
. ' '.$GLOBALS['phpgw']->common->show_date($date['raw'],'d, Y').'<br>'
. '<table width="85%" border="0" cellspacing="0" cellpadding="0" cols="'.((24 * $interval) + 1).'">' . '<table width="85%" border="0" cellspacing="0" cellpadding="0" cols="'.((24 * $interval) + 1).'">'
. '<tr><td height="1" colspan="'.((24 * $interval) + 1).'" bgcolor="black"><img src="'.$pix.'"></td></tr>' . '<tr><td height="1" colspan="'.((24 * $interval) + 1).'" bgcolor="black"><img src="'.$pix.'"></td></tr>'
. '<tr><td width="15%"><font color="'.$this->theme['bg_text'].'" face="'.$this->theme['font'].'" size="-2">'.lang('Participant').'</font></td>'; . '<tr><td width="15%"><font color="'.$this->theme['bg_text'].'" face="'.$this->theme['font'].'" size="-2">'.lang('Participant').'</font></td>';

View File

@ -16,7 +16,7 @@
global $calendar_id; global $calendar_id;
$d1 = strtolower(substr($phpgw_info['server']['app_inc'],0,3)); $d1 = strtolower(substr($GLOBALS['phpgw_info']['server']['app_inc'],0,3));
if($d1 == 'htt' || $d1 == 'ftp') if($d1 == 'htt' || $d1 == 'ftp')
{ {
echo 'Failed attempt to break in via an old Security Hole!<br>'."\n"; echo 'Failed attempt to break in via an old Security Hole!<br>'."\n";
@ -25,26 +25,28 @@
} }
unset($d1); unset($d1);
$GLOBALS['phpgw']->translation->add_app('calendar');
$cal = CreateObject('calendar.uicalendar'); $cal = CreateObject('calendar.uicalendar');
echo 'Event ID: '.$calendar_id."<br>\n"; //echo "Event ID: $calendar_id<br>\n";
$event = $cal->bo->read_entry($calendar_id); $event = $cal->bo->read_entry($calendar_id);
reset($event['participants']); echo $cal->timematrix(
while(list($particpants,$status) = each($event['participants'])) Array(
{ 'date' => $GLOBALS['phpgw']->datetime->localdates(mktime(0,0,0,$event['start']['month'],$event['start']['mday'],$event['start']['year']) - $phpgw->calendar->tz_offset),
$parts[] = $participants; 'starttime' => $cal->bo->splittime('000000',False),
} 'endtime' => 0,
@reset($parts); 'participants' => $event['participants'])
) .
$freetime = $cal->bo->datetime->localdates(mktime(0,0,0,$event['start']['month'],$event['start']['mday'],$event['start']['year']) - $phpgw->calendar->tz_offset); '</td></tr><tr><td>' .
echo $cal->timematrix($freetime,$cal->bo->splittime('000000',False),0,$parts);
echo '</td></tr><tr><td>'; $cal->view_event($event) .
echo $cal->view_event($event); '</td></tr><tr><td align="center">' .
echo '</td></tr><td align="center"><tr>'; $cal->get_response($calendar_id);
echo $cal->get_response($calendar_id); unset($cal); unset($event);
?> ?>