mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-28 17:48:56 +01:00
Various fixes... including the footer for weekly, and for handling daily events on/or about midnight.
This commit is contained in:
parent
34a0553649
commit
f67a1de2cd
@ -844,6 +844,8 @@ class calendar extends calendar_
|
|||||||
{
|
{
|
||||||
global $phpgw, $phpgw_info, $grants;
|
global $phpgw, $phpgw_info, $grants;
|
||||||
|
|
||||||
|
$startdate -= 7200;
|
||||||
|
|
||||||
if($owner == 0) { $owner= $phpgw_info['user']['account_id']; }
|
if($owner == 0) { $owner= $phpgw_info['user']['account_id']; }
|
||||||
|
|
||||||
$str = '';
|
$str = '';
|
||||||
@ -927,7 +929,7 @@ class calendar extends calendar_
|
|||||||
|
|
||||||
$p->parse('column_data','month_day',True);
|
$p->parse('column_data','month_day',True);
|
||||||
|
|
||||||
$rep_events = $this->get_sorted_by_date($date['raw'] - 7200,$owner);
|
$rep_events = $this->get_sorted_by_date($date['raw'],$owner);
|
||||||
|
|
||||||
if ($this->sorted_events_matching)
|
if ($this->sorted_events_matching)
|
||||||
{
|
{
|
||||||
|
@ -19,6 +19,11 @@
|
|||||||
$phpgw->common->phpgw_exit();
|
$phpgw->common->phpgw_exit();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if(floor($PHP_VERSION) == 4)
|
||||||
|
{
|
||||||
|
global $phpgw_info, $thisday, $thismonth, $thisyear;
|
||||||
|
}
|
||||||
|
|
||||||
$p = CreateObject('phpgwapi.Template',$phpgw->calendar->template_dir);
|
$p = CreateObject('phpgwapi.Template',$phpgw->calendar->template_dir);
|
||||||
|
|
||||||
$templates = Array(
|
$templates = Array(
|
||||||
@ -63,7 +68,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$var = Array(
|
$var = Array(
|
||||||
'action_url' => $phpgw->link('/'.$phpgw_info['flags']['currentapp'].'/month.php','owner='.$owner),
|
'action_url' => $phpgw->link('/calendar/month.php','owner='.$owner),
|
||||||
'form_name' => 'SelectMonth',
|
'form_name' => 'SelectMonth',
|
||||||
'label' => lang('Month'),
|
'label' => lang('Month'),
|
||||||
'form_label' => 'date',
|
'form_label' => 'date',
|
||||||
@ -78,28 +83,54 @@
|
|||||||
|
|
||||||
$str = '';
|
$str = '';
|
||||||
|
|
||||||
if ($phpgw->calendar->tempyear && $phpgw->calendar->tempmonth)
|
if ($phpgw->calendar->tempyear)
|
||||||
{
|
{
|
||||||
$m = $phpgw->calendar->tempmonth;
|
|
||||||
$y = $phpgw->calendar->tempyear;
|
$y = $phpgw->calendar->tempyear;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$m = date('m');
|
|
||||||
$y = date('Y');
|
$y = date('Y');
|
||||||
}
|
}
|
||||||
|
if ($phpgw->calendar->tempmonth)
|
||||||
if ($thisday)
|
|
||||||
{
|
{
|
||||||
$d = $thisday;
|
$m = $phpgw->calendar->tempmonth;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$d = date ('d');
|
$m = date('m');
|
||||||
}
|
}
|
||||||
|
if ($phpgw->calendar->tempday)
|
||||||
|
{
|
||||||
|
$d = $phpgw->calendar->tempday;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
$d = date('d');
|
||||||
|
}
|
||||||
|
|
||||||
|
// if ($phpgw->calendar->tempyear && $phpgw->calendar->tempmonth)
|
||||||
|
// {
|
||||||
|
// $m = $phpgw->calendar->tempmonth;
|
||||||
|
// $y = $phpgw->calendar->tempyear;
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// $m = date('m');
|
||||||
|
// $y = date('Y');
|
||||||
|
// }
|
||||||
|
//
|
||||||
|
// if ($thisday)
|
||||||
|
// {
|
||||||
|
// $d = $thisday;
|
||||||
|
// }
|
||||||
|
// else
|
||||||
|
// {
|
||||||
|
// $d = date ('d');
|
||||||
|
// }
|
||||||
|
unset($thisdate);
|
||||||
|
|
||||||
$thisdate = $phpgw->calendar->makegmttime(0,0,0,$m,$d,$y);
|
$thisdate = $phpgw->calendar->makegmttime(0,0,0,$m,$d,$y);
|
||||||
$sun = $phpgw->calendar->get_weekday_start($y,$m,$d) -
|
$sun = $phpgw->calendar->get_weekday_start($y,$m,$d) - $phpgw->calendar->tz_offset - 7200;
|
||||||
((60 * 60) * intval($phpgw_info['user']['preferences']['common']['tz_offset']));
|
|
||||||
|
|
||||||
$str = '';
|
$str = '';
|
||||||
|
|
||||||
@ -117,7 +148,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$var = Array(
|
$var = Array(
|
||||||
'action_url' => $phpgw->link('/'.$phpgw_info['flags']['currentapp'].'/week.php','owner='.$owner),
|
'action_url' => $phpgw->link('/calendar/week.php','owner='.$owner),
|
||||||
'form_name' => 'SelectWeek',
|
'form_name' => 'SelectWeek',
|
||||||
'label' => lang('Week'),
|
'label' => lang('Week'),
|
||||||
'form_label' => 'date',
|
'form_label' => 'date',
|
||||||
@ -150,7 +181,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
$var = Array(
|
$var = Array(
|
||||||
'action_url' => $phpgw->link('/'.$phpgw_info['flags']['currentapp'].'/year.php','owner='.$owner),
|
'action_url' => $phpgw->link('/calendar/year.php','owner='.$owner),
|
||||||
'form_name' => 'SelectYear',
|
'form_name' => 'SelectYear',
|
||||||
'label' => lang('Year'),
|
'label' => lang('Year'),
|
||||||
'form_label' => 'year',
|
'form_label' => 'year',
|
||||||
|
@ -71,6 +71,7 @@
|
|||||||
if(!isset($phpgw_info['user']['preferences']['calendar']['weekdaystarts']))
|
if(!isset($phpgw_info['user']['preferences']['calendar']['weekdaystarts']))
|
||||||
{
|
{
|
||||||
$phpgw_info['user']['preferences']['calendar']['weekdaystarts'] = 'Sunday';
|
$phpgw_info['user']['preferences']['calendar']['weekdaystarts'] = 'Sunday';
|
||||||
|
$phpgw->preferences->save_repository();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isset($date) && strlen($date) > 0)
|
if (isset($date) && strlen($date) > 0)
|
||||||
|
@ -32,27 +32,27 @@
|
|||||||
|
|
||||||
</td>
|
</td>
|
||||||
<td width="2%">
|
<td width="2%">
|
||||||
<a href="<?php echo $phpgw->link('/'.$phpgw_info['flags']['currentapp'].'/day.php','day='.$phpgw->calendar->today['day'].'&month='.$phpgw->calendar->today['month'].'&year='.$phpgw->calendar->today['year'].'&owner='.$owner); ?>">
|
<a href="<?php echo $phpgw->link('/calendar/day.php','day='.$phpgw->calendar->today['day'].'&month='.$phpgw->calendar->today['month'].'&year='.$phpgw->calendar->today['year'].'&owner='.$owner); ?>">
|
||||||
<img src="<?php echo $phpgw_info['server']['app_images']; ?>/today.gif" alt="<?php echo lang('Today'); ?>" border="0">
|
<img src="<?php echo $phpgw_info['server']['app_images']; ?>/today.gif" alt="<?php echo lang('Today'); ?>" border="0">
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td width="2%" align="left">
|
<td width="2%" align="left">
|
||||||
<a href="<?php echo $phpgw->link('/'.$phpgw_info['flags']['currentapp'].'/week.php','day='.$phpgw->calendar->today['day'].'&month='.$phpgw->calendar->today['month'].'&year='.$phpgw->calendar->today['year'].'&owner='.$owner); ?>">
|
<a href="<?php echo $phpgw->link('/calendar/week.php','day='.$phpgw->calendar->today['day'].'&month='.$phpgw->calendar->today['month'].'&year='.$phpgw->calendar->today['year'].'&owner='.$owner); ?>">
|
||||||
<img src="<?php echo $phpgw_info['server']['app_images']; ?>/week.gif" alt="<?php echo lang('This week'); ?>" border="0">
|
<img src="<?php echo $phpgw_info['server']['app_images']; ?>/week.gif" alt="<?php echo lang('This week'); ?>" border="0">
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td width="2%" align="left">
|
<td width="2%" align="left">
|
||||||
<a href="<?php echo $phpgw->link('/'.$phpgw_info['flags']['currentapp'].'/month.php','day='.$phpgw->calendar->today['day'].'&month='.$phpgw->calendar->today['month'].'&year='.$phpgw->calendar->today['year'].'&owner='.$owner); ?>">
|
<a href="<?php echo $phpgw->link('/calendar/month.php','day='.$phpgw->calendar->today['day'].'&month='.$phpgw->calendar->today['month'].'&year='.$phpgw->calendar->today['year'].'&owner='.$owner); ?>">
|
||||||
<img src="<?php echo $phpgw_info['server']['app_images']; ?>/month.gif" alt="<?php echo lang('This month'); ?>" border="0">
|
<img src="<?php echo $phpgw_info['server']['app_images']; ?>/month.gif" alt="<?php echo lang('This month'); ?>" border="0">
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td width="2%" align="left">
|
<td width="2%" align="left">
|
||||||
<a href="<?php echo $phpgw->link('/'.$phpgw_info['flags']['currentapp'].'/year.php','day='.$phpgw->calendar->today['day'].'&month='.$phpgw->calendar->today['month'].'&year='.$phpgw->calendar->today['year'].'&owner='.$owner); ?>">
|
<a href="<?php echo $phpgw->link('/calendar/year.php','day='.$phpgw->calendar->today['day'].'&month='.$phpgw->calendar->today['month'].'&year='.$phpgw->calendar->today['year'].'&owner='.$owner); ?>">
|
||||||
<img src="<?php echo $phpgw_info['server']['app_images']; ?>/year.gif" alt="<?php echo lang('This year'); ?>" border="0">
|
<img src="<?php echo $phpgw_info['server']['app_images']; ?>/year.gif" alt="<?php echo lang('This year'); ?>" border="0">
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
<td width="2%" align="left">
|
<td width="2%" align="left">
|
||||||
<a href="<?php echo $phpgw->link('/'.$phpgw_info['flags']['currentapp'].'/matrixselect.php','day='.$phpgw->calendar->today['day'].'&month='.$phpgw->calendar->today['month'].'&year='.$phpgw->calendar->today['year'].'&owner='.$owner); ?>">
|
<a href="<?php echo $phpgw->link('/calendar/matrixselect.php','day='.$phpgw->calendar->today['day'].'&month='.$phpgw->calendar->today['month'].'&year='.$phpgw->calendar->today['year'].'&owner='.$owner); ?>">
|
||||||
<img src="<?php echo $phpgw_info['server']['app_images']; ?>/view.gif" alt="<?php echo lang('Daily Matrix View'); ?>" border="0">
|
<img src="<?php echo $phpgw_info['server']['app_images']; ?>/view.gif" alt="<?php echo lang('Daily Matrix View'); ?>" border="0">
|
||||||
</a>
|
</a>
|
||||||
</td>
|
</td>
|
||||||
|
Loading…
Reference in New Issue
Block a user