[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: calendar/inc class.uicalendar.inc.php,1.66.2.5,1
From: |
Mark A Peters <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: calendar/inc class.uicalendar.inc.php,1.66.2.5,1.66.2.6 |
Date: |
Tue, 16 Apr 2002 12:52:30 -0400 |
Update of /cvsroot/phpgroupware/calendar/inc
In directory subversions:/tmp/cvs-serv2805/calendar/inc
Modified Files:
Tag: Version-0_9_14-branch
class.uicalendar.inc.php
Log Message:
This part of a major fix for the calendar.
Index: class.uicalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.uicalendar.inc.php,v
retrieving revision 1.66.2.5
retrieving revision 1.66.2.6
diff -C2 -r1.66.2.5 -r1.66.2.6
*** class.uicalendar.inc.php 7 Apr 2002 14:11:27 -0000 1.66.2.5
--- class.uicalendar.inc.php 16 Apr 2002 16:52:27 -0000 1.66.2.6
***************
*** 30,33 ****
--- 30,34 ----
var $cat_id;
+ var $datetime;
var $tz_offset;
var $theme;
***************
*** 68,72 ****
$this->bo = CreateObject('calendar.bocalendar',1);
! $this->tz_offset = $this->bo->datetime->tz_offset;
if($this->debug)
--- 69,74 ----
$this->bo = CreateObject('calendar.bocalendar',1);
! $this->datetime = $this->bo->datetime;
! $this->tz_offset = $this->datetime->tz_offset;
if($this->debug)
***************
*** 128,132 ****
$this->bo->read_holidays($params['year']);
! $date =
$this->bo->datetime->makegmttime(0,0,0,$params['month'],$params['day'],$params['year']);
$month_ago =
intval(date('Ymd',mktime(0,0,0,$params['month'] -
1,$params['day'],$params['year'])));
$month_ahead =
intval(date('Ymd',mktime(0,0,0,$params['month'] +
1,$params['day'],$params['year'])));
--- 130,134 ----
$this->bo->read_holidays($params['year']);
! $date =
$this->datetime->makegmttime(0,0,0,$params['month'],$params['day'],$params['year']);
$month_ago =
intval(date('Ymd',mktime(0,0,0,$params['month'] -
1,$params['day'],$params['year'])));
$month_ahead =
intval(date('Ymd',mktime(0,0,0,$params['month'] +
1,$params['day'],$params['year'])));
***************
*** 134,138 ****
$monthend =
intval(date('Ymd',mktime(0,0,0,$params['month'] + 1,0,$params['year'])));
! $weekstarttime =
$this->bo->datetime->get_weekday_start($params['year'],$params['month'],1);
$p =
CreateObject('phpgwapi.Template',$this->template_dir);
--- 136,146 ----
$monthend =
intval(date('Ymd',mktime(0,0,0,$params['month'] + 1,0,$params['year'])));
! $weekstarttime =
$this->datetime->get_weekday_start($params['year'],$params['month'],1);
!
! if($this->debug)
! {
! echo '<!-- mini_calendar:monthstart =
'.$monthstart.' -->'."\n";
! echo '<!-- mini_calendar:weekstarttime =
'.date('Ymd H:i:s',$weekstarttime).' -->'."\n";
! }
$p =
CreateObject('phpgwapi.Template',$this->template_dir);
***************
*** 199,213 ****
{
$var = Array(
! 'dayname' => '<b>' .
substr(lang($this->bo->datetime->days[$i]),0,2) . '</b>',
'day_image' => ''
);
$this->output_template_array($p,'daynames','mini_day',$var);
}
! $today = date('Ymd',time());
unset($date);
! for($i=$weekstarttime;date('Ymd',$i)<=$monthend;$i +=
(24 * 3600 * 7))
{
unset($var);
! $daily =
$this->set_week_array($i,$cellcolor,$weekly);
@reset($daily);
while(list($date,$day_params) = each($daily))
--- 207,221 ----
{
$var = Array(
! 'dayname' => '<b>' .
substr(lang($this->datetime->days[$i]),0,2) . '</b>',
'day_image' => ''
);
$this->output_template_array($p,'daynames','mini_day',$var);
}
! $today = date('Ymd',$this->datetime->gmtnow +
$this->tz_offset);
unset($date);
! for($i=$weekstarttime +
$this->tz_offset;date('Ymd',$i)<=$monthend;$i += (24 * 3600 * 7))
{
unset($var);
! $daily = $this->set_week_array($i -
$this->tz_offset,$cellcolor,$weekly);
@reset($daily);
while(list($date,$day_params) = each($daily))
***************
*** 373,378 ****
$this->bo->read_holidays();
! $next =
$this->bo->datetime->makegmttime(0,0,0,$this->bo->month,$this->bo->day +
7,$this->bo->year);
! $prev =
$this->bo->datetime->makegmttime(0,0,0,$this->bo->month,$this->bo->day -
7,$this->bo->year);
if (!$this->bo->printer_friendly ||
($this->bo->printer_friendly &&
@$this->bo->prefs['calendar']['display_minicals']))
--- 381,386 ----
$this->bo->read_holidays();
! $next =
$this->datetime->makegmttime(0,0,0,$this->bo->month,$this->bo->day +
7,$this->bo->year);
! $prev =
$this->datetime->makegmttime(0,0,0,$this->bo->month,$this->bo->day -
7,$this->bo->year);
if (!$this->bo->printer_friendly ||
($this->bo->printer_friendly &&
@$this->bo->prefs['calendar']['display_minicals']))
***************
*** 496,500 ****
}
! $now = $this->bo->datetime->makegmttime(0, 0, 0,
$this->bo->month, $this->bo->day, $this->bo->year);
$now['raw'] += $this->tz_offset;
$m = mktime(0,0,0,$this->bo->month,1,$this->bo->year);
--- 504,508 ----
}
! $now = $this->datetime->makegmttime(0, 0, 0,
$this->bo->month, $this->bo->day, $this->bo->year);
$now['raw'] += $this->tz_offset;
$m = mktime(0,0,0,$this->bo->month,1,$this->bo->year);
***************
*** 893,899 ****
$vfs->write($output_file, array
(RELATIVE_USER), $content);
// $vfs->write($output_file, array
(RELATIVE_USER_APP), $content);
! // echo 'DEBUG: Output Filename =
'.$output_file."<br>\n";
! // echo 'DEBUG: Fakebase =
'.$vfs->fakebase."<br>\n";
! // echo 'DEBUG: Path = '.$vfs->pwd()."<br>\n";
Header('Location: '.$this->index());
--- 901,910 ----
$vfs->write($output_file, array
(RELATIVE_USER), $content);
// $vfs->write($output_file, array
(RELATIVE_USER_APP), $content);
! if($this->debug)
! {
! echo '<!-- DEBUG: Output Filename =
'.$output_file.' -->'."\n";
! echo '<!-- DEBUG: Fakebase =
'.$vfs->fakebase.' -->'."\n";
! echo '<!-- DEBUG: Path =
'.$vfs->pwd().' -->'."\n";
! }
Header('Location: '.$this->index());
***************
*** 1145,1149 ****
}
! $now = $this->bo->datetime->makegmttime(0, 0, 0,
$this->bo->month, $this->bo->day, $this->bo->year);
$now['raw'] += $this->tz_offset;
$m = mktime(0,0,0,$this->bo->month,1,$this->bo->year);
--- 1156,1160 ----
}
! $now = $this->datetime->makegmttime(0, 0, 0,
$this->bo->month, $this->bo->day, $this->bo->year);
$now['raw'] += $this->tz_offset;
$m = mktime(0,0,0,$this->bo->month,1,$this->bo->year);
***************
*** 1203,1207 ****
}
! $freetime =
$this->bo->datetime->localdates(mktime(0,0,0,$event['start']['month'],$event['start']['mday'],$event['start']['year'])
- $this->tz_offset);
echo $this->timematrix(
Array(
--- 1214,1218 ----
}
! $freetime =
$this->datetime->localdates(mktime(0,0,0,$event['start']['month'],$event['start']['mday'],$event['start']['year'])
- $this->tz_offset);
echo $this->timematrix(
Array(
***************
*** 1263,1267 ****
$startdate =
mktime(0,0,0,$this->bo->month,1,$this->bo->year) - $this->tz_offset;
! $days =
$this->bo->datetime->days_in_month($this->bo->month,$this->bo->year);
$enddate =
mktime(23,59,59,$this->bo->month,$this->bo->days,$this->bo->year) -
$this->tz_offset;
--- 1274,1278 ----
$startdate =
mktime(0,0,0,$this->bo->month,1,$this->bo->year) - $this->tz_offset;
! $days =
$this->datetime->days_in_month($this->bo->month,$this->bo->year);
$enddate =
mktime(23,59,59,$this->bo->month,$this->bo->days,$this->bo->year) -
$this->tz_offset;
***************
*** 1303,1307 ****
if($this->debug)
{
! echo "For Date : $v : Count of items :
".count($daily)."<br>\n";
}
for($g=0;$g<count($daily);$g++)
--- 1314,1318 ----
if($this->debug)
{
! echo \'<!-- For Date : \'.$v.\' : Count
of items : \'.count($daily).\' -->\'."\n";
}
for($g=0;$g<count($daily);$g++)
***************
*** 1593,1597 ****
{
case 'free/busy':
! $freetime =
$this->bo->datetime->makegmttime(0,0,0,$this->bo->month,$this->bo->day,$this->bo->year);
echo $this->timematrix(
Array(
--- 1604,1608 ----
{
case 'free/busy':
! $freetime =
$this->datetime->makegmttime(0,0,0,$this->bo->month,$this->bo->day,$this->bo->year);
echo $this->timematrix(
Array(
***************
*** 1861,1866 ****
unset($thisdate);
$thisdate =
mktime(0,0,0,$this->bo->month,$this->bo->day,$this->bo->year) -
$this->tz_offset;
! // $sun =
$this->bo->datetime->get_weekday_start($this->bo->year,$this->bo->month,$this->bo->day)
- $this->tz_offset - 7200;
! $sun =
$this->bo->datetime->get_weekday_start($this->bo->year,$this->bo->month,$this->bo->day)
- $this->tz_offset;
$str = '';
--- 1872,1876 ----
unset($thisdate);
$thisdate =
mktime(0,0,0,$this->bo->month,$this->bo->day,$this->bo->year) -
$this->tz_offset;
! $sun =
$this->datetime->get_weekday_start($this->bo->year,$this->bo->month,$this->bo->day)
- $this->tz_offset;
$str = '';
***************
*** 1963,1967 ****
{
$str = '';
! $is_private =
$this->bo->is_private($event,$this->bo->owner);
$editable = ((!$this->bo->printer_friendly) &&
(($is_private && $this->bo->check_perms(PHPGW_ACL_PRIVATE)) || !$is_private));
$p =
CreateObject('phpgwapi.Template',$this->template_dir);
--- 1973,1977 ----
{
$str = '';
! $is_private =
$this->bo->is_private($event,$event['owner']);
$editable = ((!$this->bo->printer_friendly) &&
(($is_private && $this->bo->check_perms(PHPGW_ACL_PRIVATE)) || !$is_private));
$p =
CreateObject('phpgwapi.Template',$this->template_dir);
***************
*** 2113,2117 ****
function overlap($params)
{
-
if(!is_array($params))
{
--- 2123,2126 ----
***************
*** 2196,2200 ****
if($this->debug)
{
! echo "Inside participants() : $names<br>\n";
}
return $names;
--- 2205,2209 ----
if($this->debug)
{
! echo '<!-- Inside participants() : '.$names.'
-->'."\n";
}
return $names;
***************
*** 2232,2236 ****
function week_header($month,$year,$display_name = False)
{
! $this->weekstarttime =
$this->bo->datetime->get_weekday_start($year,$month,1);
$p =
CreateObject('phpgwapi.Template',$this->template_dir);
--- 2241,2245 ----
function week_header($month,$year,$display_name = False)
{
! $this->weekstarttime =
$this->datetime->get_weekday_start($year,$month,1);
$p =
CreateObject('phpgwapi.Template',$this->template_dir);
***************
*** 2267,2271 ****
for($i=0;$i<7;$i++)
{
!
$p->set_var('col_title',lang($this->bo->datetime->days[$i]));
$p->parse('column_header','column_title',True);
}
--- 2276,2280 ----
for($i=0;$i<7;$i++)
{
!
$p->set_var('col_title',lang($this->datetime->days[$i]));
$p->parse('column_header','column_title',True);
}
***************
*** 2304,2310 ****
$p->set_var('col_width','12');
}
! $today = date('Ymd',time());
! // $today = gmdate('Ymd');
! $daily =
$this->set_week_array($startdate,$cellcolor,$weekly);
@reset($daily);
while(list($date,$day_params) = each($daily))
--- 2313,2318 ----
$p->set_var('col_width','12');
}
! $today = date('Ymd',$this->datetime->gmtnow +
$this->tz_offset);
! $daily = $this->set_week_array($startdate -
$this->tz_offset,$cellcolor,$weekly);
@reset($daily);
while(list($date,$day_params) = each($daily))
***************
*** 2393,2396 ****
--- 2401,2409 ----
function display_month($month,$year,$showyear,$owner=0)
{
+ if($this->debug)
+ {
+ echo '<!-- datetime:gmtdate =
'.$this->datetime->gmtdate.' -->'."\n";
+ }
+
$this->bo->store_to_cache(
Array(
***************
*** 2404,2408 ****
$monthend = intval(date('Ymd',mktime(0,0,0,$month +
1,0,$year)));
! $start = $this->bo->datetime->get_weekday_start($year,
$month, 1);
$p =
CreateObject('phpgwapi.Template',$this->template_dir);
--- 2417,2427 ----
$monthend = intval(date('Ymd',mktime(0,0,0,$month +
1,0,$year)));
! $start = $this->datetime->get_weekday_start($year,
$month, 1);
!
! if($this->debug)
! {
! echo '<!-- display_month:monthstart =
'.$monthstart.' -->'."\n";
! echo '<!-- display_month:start = '.date('Ymd
H:i:s',$start).' -->'."\n";
! }
$p =
CreateObject('phpgwapi.Template',$this->template_dir);
***************
*** 2426,2430 ****
$cellcolor = $this->theme['row_on'];
! for ($i=intval($start);intval(date('Ymd',$i)) <=
$monthend;$i += 604800)
{
$cellcolor =
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($cellcolor);
--- 2445,2449 ----
$cellcolor = $this->theme['row_on'];
! for ($i=intval($start +
$this->tz_offset);intval(date('Ymd',$i)) <= $monthend;$i += 604800)
{
$cellcolor =
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($cellcolor);
***************
*** 2461,2465 ****
$p->set_block('week','event','event');
! $start = $this->bo->datetime->get_weekday_start($year,
$month, $day);
$cellcolor = $this->theme['row_off'];
--- 2480,2484 ----
$p->set_block('week','event','event');
! $start = $this->datetime->get_weekday_start($year,
$month, $day);
$cellcolor = $this->theme['row_off'];
***************
*** 2771,2775 ****
}
! echo '<!-- in print_day() -->'."\n";
$this->bo->store_to_cache(
--- 2790,2797 ----
}
! if($this->debug)
! {
! echo '<!-- in print_day() -->'."\n";
! }
$this->bo->store_to_cache(
***************
*** 2818,2822 ****
if($this->debug)
{
! echo "Interval set to :
".intval($this->bo->prefs['calendar']['interval'])."<br>\n";
}
--- 2840,2844 ----
if($this->debug)
{
! echo '<!-- Interval set to :
'.intval($this->bo->prefs['calendar']['interval']).' -->'."\n";
}
***************
*** 2834,2841 ****
$time = Array();
! $daily =
$this->set_week_array($this->bo->datetime->get_weekday_start($params['year'],$params['month'],$params['day']),$this->theme['row_on'],True);
if($this->debug)
{
! echo "Date to Eval : ".$date_to_eval."<br>\n";
}
if($daily[$date_to_eval]['appts'])
--- 2856,2863 ----
$time = Array();
! $daily =
$this->set_week_array($this->datetime->get_weekday_start($params['year'],$params['month'],$params['day']),$this->theme['row_on'],True);
if($this->debug)
{
! echo '<!-- Date to Eval : '.$date_to_eval.'
-->'."\n";
}
if($daily[$date_to_eval]['appts'])
***************
*** 2847,2855 ****
if($this->debug)
{
! echo "Date : ".$date_to_eval." Count :
".$c_events."<br>\n";
}
for($i=0;$i<$c_events;$i++)
{
- // $event = $events[$i];
if($events[$i]['recur_type'] ==
MCAL_RECUR_NONE)
{
--- 2869,2876 ----
if($this->debug)
{
! echo '<!-- Date : '.$date_to_eval.'
Count : '.$c_events.' -->'."\n";
}
for($i=0;$i<$c_events;$i++)
{
if($events[$i]['recur_type'] ==
MCAL_RECUR_NONE)
{
***************
*** 2875,2880 ****
if($this->debug)
{
! echo 'Start
Time Minutes : '.$events[$i]['start']['min']."<br>\n";
! echo 'Interval
: '.$interval_start."<br>\n";
}
}
--- 2896,2901 ----
if($this->debug)
{
! echo '<!--
Start Time Minutes : '.$events[$i]['start']['min'].' -->'."\n";
! echo '<!--
Interval : '.$interval_start.' -->'."\n";
}
}
***************
*** 2895,2899 ****
if($this->debug)
{
! echo 'IND before =
'.$ind."<br>\n";
}
if(($ind >=
date('H',$last_starttime)) && ($ind <= date('H',$last_endtime)))
--- 2916,2920 ----
if($this->debug)
{
! echo '<!-- IND before =
'.$ind.' -->'."\n";
}
if(($ind >=
date('H',$last_starttime)) && ($ind <= date('H',$last_endtime)))
***************
*** 2904,2908 ****
if($this->debug)
{
! echo 'IND after =
'.$ind."<br>\n";
}
}
--- 2925,2929 ----
if($this->debug)
{
! echo '<!-- IND after =
'.$ind.' -->'."\n";
}
}
***************
*** 2912,2917 ****
if($this->debug)
{
! echo 'IND = '.$ind."<br>\n";
! echo 'TIME =
'.$time[$ind][$interval_start]."<br>\n";
}
--- 2933,2938 ----
if($this->debug)
{
! echo '<!-- IND = '.$ind.'
-->'."\n";
! echo '<!-- TIME =
'.$time[$ind][$interval_start].' -->'."\n";
}
***************
*** 2939,2943 ****
if($this->debug)
{
! echo "Rowspan being set
to : ".$rowspan."<br>\n";
}
--- 2960,2964 ----
if($this->debug)
{
! echo '<!-- Rowspan
being set to : '.$rowspan.' -->'."\n";
}
***************
*** 2953,2957 ****
if($this->debug)
{
! echo 'Time :
'.$GLOBALS['phpgw']->common->show_date($this->bo->maketime($events[$i]['start'])
- $this->tz_offset).' -
'.$GLOBALS['phpgw']->common->show_date($this->bo->maketime($events[$i]['end'])
- $this->tz_offset).' : Start : '.$ind.' : Interval # :
'.$interval_start."<br>\n";
}
}
--- 2974,2978 ----
if($this->debug)
{
! echo '<!-- Time :
'.$GLOBALS['phpgw']->common->show_date($this->bo->maketime($events[$i]['start'])
- $this->tz_offset).' -
'.$GLOBALS['phpgw']->common->show_date($this->bo->maketime($events[$i]['end'])
- $this->tz_offset).' : Start : '.$ind.' : Interval # : '.$interval_start.'
-->'."\n";
}
}
***************
*** 3568,3572 ****
function set_week_array($startdate,$cellcolor,$weekly)
{
! for ($j=0,$datetime=$startdate -
$this->tz_offset;$j<7;$j++,$datetime += 86400)
{
$date = date('Ymd',$datetime);
--- 3589,3593 ----
function set_week_array($startdate,$cellcolor,$weekly)
{
! for ($j=0,$datetime=$startdate;$j<7;$j++,$datetime +=
86400)
{
$date = date('Ymd',$datetime);
***************
*** 3574,3578 ****
if($this->debug)
{
! echo "set_week_array : Date :
".$date."<br>\n";
}
--- 3595,3599 ----
if($this->debug)
{
! echo '<!-- set_week_array : Date :
'.$date.' -->'."\n";
}
***************
*** 3581,3585 ****
if($this->debug)
{
! echo "Date : ".$date."
Appointments found : ".count($this->bo->cached_events[$date])."<br>\n";
}
$appts = True;
--- 3602,3606 ----
if($this->debug)
{
! echo '<!-- Date : '.$date.'
Appointments found : '.count($this->bo->cached_events[$date]).' -->'."\n";
}
$appts = True;
***************
*** 3657,3661 ****
if($this->debug)
{
! $this->_debug_array($daily);
}
--- 3678,3682 ----
if($this->debug)
{
! _debug_array($daily);
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: calendar/inc class.uicalendar.inc.php,1.66.2.5,1.66.2.6,
Mark A Peters <address@hidden> <=