phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php,1.79,1.80


From: Mark A Peters <address@hidden>
Subject: [Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php,1.79,1.80 class.uicalendar.inc.php,1.82,1.83 class.socalendar_sql.inc.php,1.29,1.30 class.html.inc.php,1.1,1.2
Date: Sun, 25 Aug 2002 00:07:23 -0400

Update of /cvsroot/phpgroupware/calendar/inc
In directory subversions:/tmp/cvs-serv26818/inc

Modified Files:
        class.bocalendar.inc.php class.uicalendar.inc.php 
        class.socalendar_sql.inc.php class.html.inc.php 
Log Message:
Updating some of the files to include Ralf Beckers fixes.  Still Need to talk 
with him in regards to a few he has submited.

Index: class.bocalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.bocalendar.inc.php,v
retrieving revision 1.79
retrieving revision 1.80
diff -C2 -r1.79 -r1.80
*** class.bocalendar.inc.php    17 Aug 2002 14:46:01 -0000      1.79
--- class.bocalendar.inc.php    25 Aug 2002 04:07:21 -0000      1.80
***************
*** 118,130 ****
                var $deleted;
                var $added;
- 
                var $is_group = False;
- 
                var $soap = False;
-               
                var $use_session = False;
- 
                var $today;
  
                function bocalendar($session=0)
                {
--- 118,129 ----
                var $deleted;
                var $added;
                var $is_group = False;
                var $soap = False;
                var $use_session = False;
                var $today;
  
+               var $sortby;
+               var $num_months;
+ 
                function bocalendar($session=0)
                {
***************
*** 193,196 ****
--- 192,196 ----
  
                        $this->filter = 
get_var('filter',Array('HTTP_POST_VARS','DEFAULT'),' 
'.$this->prefs['calendar']['defaultfilter'].' ');
+                       $this->sortby = 
get_var('sortby',Array('HTTP_POST_VARS'));
                        $this->cat_id = 
get_var('cat_id',Array('HTTP_POST_VARS'));
  
***************
*** 209,212 ****
--- 209,213 ----
                        $month = 
get_var('month',Array('HTTP_GET_VARS','HTTP_POST_VARS'));
                        $day = 
get_var('day',Array('HTTP_GET_VARS','HTTP_POST_VARS'));
+                       $num_months = 
get_var('num_months',Array('HTTP_GET_VARS','HTTP_POST_VARS'));
                        
                        if(isset($date) && $date!='')
***************
*** 222,226 ****
                                        $this->year = $year;
                                }
!                               elseif($this->year == 0)
                                {
                                        $this->year = 
date('Y',$GLOBALS['phpgw']->datetime->users_localtime);
--- 223,227 ----
                                        $this->year = $year;
                                }
!                               else    // if($this->year == 0)
                                {
                                        $this->year = 
date('Y',$GLOBALS['phpgw']->datetime->users_localtime);
***************
*** 230,234 ****
                                        $this->month = $month;
                                }
!                               elseif($this->month == 0)
                                {
                                        $this->month = 
date('m',$GLOBALS['phpgw']->datetime->users_localtime);
--- 231,235 ----
                                        $this->month = $month;
                                }
!                               else    // if($this->month == 0)
                                {
                                        $this->month = 
date('m',$GLOBALS['phpgw']->datetime->users_localtime);
***************
*** 238,242 ****
                                        $this->day = $day;
                                }
!                               elseif($this->day == 0)
                                {
                                        $this->day = 
date('d',$GLOBALS['phpgw']->datetime->users_localtime);
--- 239,243 ----
                                        $this->day = $day;
                                }
!                               else    // if($this->day == 0)
                                {
                                        $this->day = 
date('d',$GLOBALS['phpgw']->datetime->users_localtime);
***************
*** 244,247 ****
--- 245,258 ----
                        }
  
+                       if(isset($num_months) && $num_months!='')
+                       {
+                               $this->num_months = $num_months;
+                       }
+                       elseif($this->num_months == 0)
+                       {
+                               $this->num_months = 1;
+                       }
+ 
+ 
                        $this->today = 
date('Ymd',$GLOBALS['phpgw']->datetime->users_localtime);
  
***************
*** 356,363 ****
                        if ($this->use_session)
                        {
!                               if($this->debug)
!                               {
!                                       echo '<!-- 
'."\n".'Save:'."\n"._debug_array($data,False)."\n".' -->'."\n";
!                               }
                                
$GLOBALS['phpgw']->session->appsession('session_data','calendar',$data);
                        }
--- 367,371 ----
                        if ($this->use_session)
                        {
!                               print_debug('Save',_debug_array($data,False));
                                
$GLOBALS['phpgw']->session->appsession('session_data','calendar',$data);
                        }
***************
*** 367,381 ****
                {
                        $data = 
$GLOBALS['phpgw']->session->appsession('session_data','calendar');
!                       if($this->debug)
!                       {
!                               echo '<!-- 
'."\n".'Read:'."\n"._debug_array($data,False)."\n".' -->'."\n";
!                       }
  
                        $this->filter = $data['filter'];
                        $this->cat_id = $data['cat_id'];
                        $this->owner  = intval($data['owner']);
                        $this->year   = intval($data['year']);
                        $this->month  = intval($data['month']);
                        $this->day    = intval($data['day']);
                }
  
--- 375,388 ----
                {
                        $data = 
$GLOBALS['phpgw']->session->appsession('session_data','calendar');
!                       print_debug('Read',_debug_array($data,False));
  
                        $this->filter = $data['filter'];
                        $this->cat_id = $data['cat_id'];
+                       $this->sortby = $data['sortby'];
                        $this->owner  = intval($data['owner']);
                        $this->year   = intval($data['year']);
                        $this->month  = intval($data['month']);
                        $this->day    = intval($data['day']);
+                       $this->num_months = intval($data['num_months']);
                }
  
***************
*** 401,423 ****
                        {
                                $temp_event = $this->get_cached_event();
!                          $event = $this->read_entry(intval($param['id']));
!                          if($this->owner == $event['owner'])
!                          {
!                               $exception_time = 
mktime($event['start']['hour'],$event['start']['min'],0,$param['month'],$param['day'],$param['year'])
 - $GLOBALS['phpgw']->datetime->tz_offset;
!                               $event['recur_exception'][] = 
intval($exception_time);
!                               $this->so->cal->event = $event;
!                               if($this->debug)
!                               {
!                                       echo '<!-- exception time = 
'.$event['recur_exception'][count($event['recur_exception']) -1].' -->'."\n";
!                                       echo '<!-- count event exceptions = 
'.count($event['recur_exception']).' -->'."\n";
!                                  }
!                               $this->so->add_entry($event);
!                               $cd = 16;
!                       }
!                       else
!                       {
!                          $cd = 60;
!                       }
                        }
                        $this->so->cal->event = $temp_event;
                        unset($temp_event);
--- 408,427 ----
                        {
                                $temp_event = $this->get_cached_event();
!                               $event = 
$this->read_entry(intval($param['id']));
! //                            if($this->owner == $event['owner'])
! //                            {
!                               $exception_time = 
mktime($event['start']['hour'],$event['start']['min'],0,$param['month'],$param['day'],$param['year'])
 - $GLOBALS['phpgw']->datetime->tz_offset;
!                               $event['recur_exception'][] = 
intval($exception_time);
!                               $this->so->cal->event = $event;
!                               print_debug('exception 
time',$event['recur_exception'][count($event['recur_exception']) -1]);
!                               print_debug('count event 
exceptions',count($event['recur_exception']));
!                               $this->so->add_entry($event);
!                               $cd = 16;
!                       }
!                       else
!                       {
!                               $cd = 60;
                        }
+ //                    }
                        $this->so->cal->event = $temp_event;
                        unset($temp_event);
***************
*** 429,443 ****
                        if($this->check_perms(PHPGW_ACL_DELETE))
                        {
!                          $temp_event = $this->read_entry($id);
!                          if($this->owner == $temp_event['owner'])
!                          {
!                               $this->so->delete_entry($id);
!                               $cd = 16;
!                       }
!                       else
!                       {
!                          $cd = 60;
!                       }
                        }
                        return $cd;
                }
--- 433,447 ----
                        if($this->check_perms(PHPGW_ACL_DELETE))
                        {
!                               $temp_event = $this->read_entry($id);
! //                            if($this->owner == $temp_event['owner'])
! //                            {
!                               $this->so->delete_entry($id);
!                               $cd = 16;
                        }
+                       else
+                       {
+                               $cd = 60;
+                       }
+ //                    }
                        return $cd;
                }
***************
*** 449,485 ****
                                $event = 
$this->so->read_entry($params['cal_id']);
                                @reset($params['reinstate_index']);
!                               echo '<!-- Count of reinstate_index = 
'.count($params['reinstate_index']).' -->'."\n";
                                if(count($params['reinstate_index']) > 1)
                                {
                                        while(list($key,$value) = 
each($params['reinstate_index']))
                                        {
!                                               if($this->debug)
!                                               {
!                                                       echo '<!-- 
reinstate_index ['.$key.'] = '.intval($value).' -->'."\n";
!                                                       echo '<!-- exception 
time = '.$event['recur_exception'][intval($value)].' -->'."\n";
!                                               }
                                                
unset($event['recur_exception'][intval($value)]);
!                                               if($this->debug)
!                                               {
!                                                       echo '<!-- count event 
exceptions = '.count($event['recur_exception']).' -->'."\n";
!                                               }
!                                       }
                                }
                                else
                                {
!                               if($this->debug)
!                               {
!                                       echo '<!-- reinstate_index [0] = 
'.intval($params['reinstate_index'][0]).' -->'."\n";
!                                       echo '<!-- exception time = 
'.$event['recur_exception'][intval($params['reinstate_index'][0])].' -->'."\n";
!                                  }
                                        
unset($event['recur_exception'][intval($params['reinstate_index'][0])]);
!                               if($this->debug)
!                               {
!                                       echo '<!-- count event exceptions = 
'.count($event['recur_exception']).' -->'."\n";
!                               }
!                          }
!                       $this->so->cal->event = $event;
!                               $this->so->add_entry($event);
!                               return 42;
                        }
                        else
--- 453,477 ----
                                $event = 
$this->so->read_entry($params['cal_id']);
                                @reset($params['reinstate_index']);
!                               print_debug('Count of 
reinstate_index',count($params['reinstate_index']));
                                if(count($params['reinstate_index']) > 1)
                                {
                                        while(list($key,$value) = 
each($params['reinstate_index']))
                                        {
!                                               print_debug('reinstate_index 
['.$key.']',intval($value));
!                                               print_debug('exception 
time',$event['recur_exception'][intval($value)]);
                                                
unset($event['recur_exception'][intval($value)]);
!                                               print_debug('count event 
exceptions',count($event['recur_exception']));
!                                       }
                                }
                                else
                                {
!                                       
print_debug('reinstate_index[0]',intval($params['reinstate_index'][0]));
!                                       print_debug('exception 
time',$event['recur_exception'][intval($params['reinstate_index'][0])]);
                                        
unset($event['recur_exception'][intval($params['reinstate_index'][0])]);
!                                       print_debug('count event 
exceptions',count($event['recur_exception']));
!                               }
!                               $this->so->cal->event = $event;
!                               $this->so->add_entry($event);
!                               return 42;
                        }
                        else
***************
*** 655,666 ****
                                        for($i=0;$i<count($parts);$i++)
                                        {
                                                $acct_type = 
$GLOBALS['phpgw']->accounts->get_type(intval($parts[$i]));
                                                if($acct_type == 'u')
                                                {
!                                                       $part[$parts[$i]] = 1;
                                                }
                                                elseif($acct_type == 'g')
                                                {
!                                                       $part[$parts[$i]] = 1;
                                                        $groups[] = $parts[$i];
                                                        /* This pulls ALL users 
of a group and makes them as participants to the event */
--- 647,664 ----
                                        for($i=0;$i<count($parts);$i++)
                                        {
+                                               if (($accept_type = 
substr($parts[$i],-1,1)) == '0' || intval($accept_type) > 0)
+                                               {
+                                                       $accept_type = 'U';
+                                               }
                                                $acct_type = 
$GLOBALS['phpgw']->accounts->get_type(intval($parts[$i]));
                                                if($acct_type == 'u')
                                                {
! //                                                    $part[$parts[$i]] = 1;
!                                                       
$part[intval($parts[$i])] = $accept_type;
                                                }
                                                elseif($acct_type == 'g')
                                                {
! //                                                    $part[$parts[$i]] = 1;
!                                                       
$part[intval($parts[$i])] = $accept_type;
                                                        $groups[] = $parts[$i];
                                                        /* This pulls ALL users 
of a group and makes them as participants to the event */
***************
*** 675,679 ****
                                                        while($member = 
each($members))
                                                        {
!                                                               
$part[$member[1]['account_id']] = 1;
                                                        }
                                                }
--- 673,678 ----
                                                        while($member = 
each($members))
                                                        {
! //                                                            
$part[$member[1]['account_id']] = 1;
! +                                                             
$part[$member[1]['account_id']] = $accept_type;
                                                        }
                                                }
***************
*** 688,694 ****
                                {
                                        @reset($part);
!                                       while(list($key,$value) = each($part))
                                        {
!                                               
$this->so->add_attribute('participants','U',intval($key));
                                        }
                                }
--- 687,693 ----
                                {
                                        @reset($part);
!                                       while(list($key,$accept_type) = 
each($part))
                                        {
!                                               
$this->so->add_attribute('participants',$accept_type,intval($key));
                                        }
                                }

Index: class.uicalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.uicalendar.inc.php,v
retrieving revision 1.82
retrieving revision 1.83
diff -C2 -r1.82 -r1.83
*** class.uicalendar.inc.php    22 Aug 2002 03:07:54 -0000      1.82
--- class.uicalendar.inc.php    25 Aug 2002 04:07:21 -0000      1.83
***************
*** 223,232 ****
                                
$this->output_template_array($p,'daynames','mini_day',$var);
                        }
!                       $today = date('Ymd',$GLOBALS['phpgw']->datetime->gmtnow 
+ $GLOBALS['phpgw']->datetme->tz_offset);
                        unset($date);
!                       for($i=$weekstarttime + 
$GLOBALS['phpgw']->datetme->tz_offset;date('Ymd',$i)<=$monthend;$i += (24 * 
3600 * 7))
                        {
                                unset($var);
!                               $daily = $this->set_week_array($i - 
$GLOBALS['phpgw']->datetme->tz_offset,$cellcolor,$weekly);
                                @reset($daily);
                                while(list($date,$day_params) = each($daily))
--- 223,232 ----
                                
$this->output_template_array($p,'daynames','mini_day',$var);
                        }
!                       $today = 
date('Ymd',$GLOBALS['phpgw']->datetime->users_localtime);
                        unset($date);
!                       for($i=$weekstarttime + 
$GLOBALS['phpgw']->datetime->tz_offset;date('Ymd',$i)<=$monthend;$i += (24 * 
3600 * 7))
                        {
                                unset($var);
!                               $daily = $this->set_week_array($i - 
$GLOBALS['phpgw']->datetime->tz_offset,$cellcolor,$weekly);
                                @reset($daily);
                                while(list($date,$day_params) = each($daily))
***************
*** 516,520 ****
  
                        $now    = $GLOBALS['phpgw']->datetime->makegmttime(0, 
0, 0, $this->bo->month, $this->bo->day, $this->bo->year);
!                       $now['raw'] += $GLOBALS['phpgw']->datetme->tz_offset;
                        $m = mktime(0,0,0,$this->bo->month,1,$this->bo->year);
  
--- 516,520 ----
  
                        $now    = $GLOBALS['phpgw']->datetime->makegmttime(0, 
0, 0, $this->bo->month, $this->bo->day, $this->bo->year);
!                       $now['raw'] += $GLOBALS['phpgw']->datetime->tz_offset;
                        $m = mktime(0,0,0,$this->bo->month,1,$this->bo->year);
  
***************
*** 656,660 ****
                        $this->bo->cached_events = Array();
                        $this->bo->repeating_events[0] = $event;
!                       $datetime = 
mktime(0,0,0,$this->bo->month,$this->bo->day,$this->bo->year) - 
$GLOBALS['phpgw']->datetme->tz_offset;
                        $this->bo->check_repeating_events($datetime);
                        $check_date = 
$GLOBALS['phpgw']->common->show_date($datetime,'Ymd');
--- 656,660 ----
                        $this->bo->cached_events = Array();
                        $this->bo->repeating_events[0] = $event;
!                       $datetime = 
mktime(0,0,0,$this->bo->month,$this->bo->day,$this->bo->year) - 
$GLOBALS['phpgw']->datetime->tz_offset;
                        $this->bo->check_repeating_events($datetime);
                        $check_date = 
$GLOBALS['phpgw']->common->show_date($datetime,'Ymd');
***************
*** 833,837 ****
                                $cal_id = $GLOBALS['HTTP_GET_VARS']['cal_id'];
                                $event = 
$this->bo->read_entry(intval($GLOBALS['HTTP_GET_VARS']['cal_id']));
!                               
                                if(!$this->bo->can_user_edit($event))
                                {
--- 833,837 ----
                                $cal_id = $GLOBALS['HTTP_GET_VARS']['cal_id'];
                                $event = 
$this->bo->read_entry(intval($GLOBALS['HTTP_GET_VARS']['cal_id']));
! 
                                if(!$this->bo->can_user_edit($event))
                                {
***************
*** 1164,1168 ****
  
                        $now    = $GLOBALS['phpgw']->datetime->makegmttime(0, 
0, 0, $this->bo->month, $this->bo->day, $this->bo->year);
!                       $now['raw'] += $GLOBALS['phpgw']->datetme->tz_offset;
                        $m = mktime(0,0,0,$this->bo->month,1,$this->bo->year);
  
--- 1164,1168 ----
  
                        $now    = $GLOBALS['phpgw']->datetime->makegmttime(0, 
0, 0, $this->bo->month, $this->bo->day, $this->bo->year);
!                       $now['raw'] += $GLOBALS['phpgw']->datetime->tz_offset;
                        $m = mktime(0,0,0,$this->bo->month,1,$this->bo->year);
  
***************
*** 1221,1225 ****
                        }
  
!                       $freetime = 
$GLOBALS['phpgw']->datetime->localdates(mktime(0,0,0,$event['start']['month'],$event['start']['mday'],$event['start']['year'])
 - $GLOBALS['phpgw']->datetme->tz_offset);
                        echo $this->timematrix(
                                Array(
--- 1221,1225 ----
                        }
  
!                       $freetime = 
$GLOBALS['phpgw']->datetime->localdates(mktime(0,0,0,$event['start']['month'],$event['start']['mday'],$event['start']['year'])
 - $GLOBALS['phpgw']->datetime->tz_offset);
                        echo $this->timematrix(
                                Array(
***************
*** 1280,1286 ****
                        );
  
!                       $startdate = 
mktime(0,0,0,$this->bo->month,1,$this->bo->year) - 
$GLOBALS[\'phpgw\']->datetme->tz_offset;
                        $days = 
$GLOBALS[\'phpgw\']->datetime->days_in_month($this->bo->month,$this->bo->year);
!                       $enddate   = 
mktime(23,59,59,$this->bo->month,$this->bo->days,$this->bo->year) - 
$GLOBALS[\'phpgw\']->datetme->tz_offset;
  
                        $header[] = lang(\'Category\');
--- 1280,1286 ----
                        );
  
!                       $startdate = 
mktime(0,0,0,$this->bo->month,1,$this->bo->year) - 
$GLOBALS[\'phpgw\']->datetime->tz_offset;
                        $days = 
$GLOBALS[\'phpgw\']->datetime->days_in_month($this->bo->month,$this->bo->year);
!                       $enddate   = 
mktime(23,59,59,$this->bo->month,$this->bo->days,$this->bo->year) - 
$GLOBALS[\'phpgw\']->datetime->tz_offset;
  
                        $header[] = lang(\'Category\');
***************
*** 1446,1453 ****
                function matrixselect()
                {
!                       $datetime = 
mktime(0,0,0,$this->bo->month,$this->bo->day,$this->bo->year) - 
$GLOBALS['phpgw']->datetme->tz_offset;
  
                        $sb = CreateObject('phpgwapi.sbox');
!       
                        unset($GLOBALS['phpgw_info']['flags']['noheader']);
                        unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
--- 1446,1453 ----
                function matrixselect()
                {
!                       $datetime = 
mktime(0,0,0,$this->bo->month,$this->bo->day,$this->bo->year) - 
$GLOBALS['phpgw']->datetime->tz_offset;
  
                        $sb = CreateObject('phpgwapi.sbox');
! 
                        unset($GLOBALS['phpgw_info']['flags']['noheader']);
                        unset($GLOBALS['phpgw_info']['flags']['nonavbar']);
***************
*** 1480,1484 ****
                                )
                        );
!       
  // View type
                        $var[] = Array(
--- 1480,1484 ----
                                )
                        );
! 
  // View type
                        $var[] = Array(
***************
*** 1682,1686 ****
                                $event = $this->bo->read_entry($id);
                                
!                               $datetime = 
$this->bo->maketime($event['start']) - $GLOBALS['phpgw']->datetme->tz_offset;
                                
                                $ids[strval($event['id'])]++;
--- 1682,1686 ----
                                $event = $this->bo->read_entry($id);
                                
!                               $datetime = 
$this->bo->maketime($event['start']) - $GLOBALS['phpgw']->datetime->tz_offset;
                                
                                $ids[strval($event['id'])]++;
***************
*** 1719,1723 ****
                        
$p->set_block('search_form','search_list','search_list');
                        
$p->set_block('search_form','search_list_footer','search_list_footer');
!       
                        $var = Array(
                                'color'         => $this->theme['bg_text'],
--- 1719,1723 ----
                        
$p->set_block('search_form','search_list','search_list');
                        
$p->set_block('search_form','search_list_footer','search_list_footer');
! 
                        $var = Array(
                                'color'         => $this->theme['bg_text'],
***************
*** 1751,1760 ****
                {
                        $data = array(
!                               'filter'=> $this->bo->filter,
!                               'cat_id'=> $this->bo->cat_id,
!                               'owner' => $this->bo->owner,
!                               'year'  => $this->bo->year,
!                               'month' => $this->bo->month,
!                               'day'   => $this->bo->day
                        );
                        echo '<br>UI:';
--- 1751,1762 ----
                {
                        $data = array(
!                               'filter'     => $this->bo->filter,
!                               'cat_id'     => $this->bo->cat_id,
!                               'owner'      => $this->bo->owner,
!                               'year'       => $this->bo->year,
!                               'month'      => $this->bo->month,
!                               'day'        => $this->bo->day,
!                               'sortby'     => $this->bo->sortby,
!                               'num_months' => $this->bo->num_months
                        );
                        echo '<br>UI:';
***************
*** 1766,1775 ****
                {
                        $data = array(
!                               'filter'=> $this->bo->filter,
!                               'cat_id'=> $this->bo->cat_id,
!                               'owner' => $this->bo->owner,
!                               'year'  => $this->bo->year,
!                               'month' => $this->bo->month,
!                               'day'   => $this->bo->day
                        );
                        $this->bo->save_sessiondata($data);
--- 1768,1780 ----
                {
                        $data = array(
!                               'filter'     => $this->bo->filter,
!                               'cat_id'     => $this->bo->cat_id,
!                               'owner'      => $this->bo->owner,
!                               'year'       => $this->bo->year,
!                               'month'      => $this->bo->month,
!                               'day'        => $this->bo->day,
!                               'date'       => $this->bo->date,
!                               'sortby'     => $this->bo->sortby,
!                               'num_months' => $this->bo->num_months
                        );
                        $this->bo->save_sessiondata($data);
***************
*** 1778,1781 ****
--- 1783,1790 ----
                function output_template_array(&$p,$row,$list,$var)
                {
+                       if (!isset($var['hidden_vars']))
+                       {
+                               $var['hidden_vars'] = '';
+                       }
                        $p->set_var($var);
                        $p->parse($row,$list,True);
***************
*** 1876,1881 ****
  
                        unset($thisdate);
!                       $thisdate = 
mktime(0,0,0,$this->bo->month,$this->bo->day,$this->bo->year) - 
$GLOBALS['phpgw']->datetme->tz_offset;
!                       $sun = 
$GLOBALS['phpgw']->datetime->get_weekday_start($this->bo->year,$this->bo->month,$this->bo->day)
 - $GLOBALS['phpgw']->datetme->tz_offset;
  
                        $str = '';
--- 1885,1890 ----
  
                        unset($thisdate);
!                       $thisdate = 
mktime(0,0,0,$this->bo->month,$this->bo->day,$this->bo->year) - 
$GLOBALS['phpgw']->datetime->tz_offset;
!                       $sun = 
$GLOBALS['phpgw']->datetime->get_weekday_start($this->bo->year,$this->bo->month,$this->bo->day)
 - $GLOBALS['phpgw']->datetime->tz_offset;
  
                        $str = '';
***************
*** 1981,1989 ****
                        $editable = ((!$this->bo->printer_friendly) && 
(($is_private && $this->bo->check_perms(PHPGW_ACL_PRIVATE)) || !$is_private));
  
!                       $starttime = $this->bo->maketime($event['start']) - 
$GLOBALS['phpgw']->datetme->tz_offset;
!                       $endtime = $this->bo->maketime($event['end']) - 
$GLOBALS['phpgw']->datetme->tz_offset;
                        $rawdate = mktime(0,0,0,$month,$day,$year);
!                       $rawdate_offset = $rawdate - 
$GLOBALS['phpgw']->datetme->tz_offset;
!                       $nextday = mktime(0,0,0,$month,$day + 1,$year) - 
$GLOBALS['phpgw']->datetme->tz_offset;
                        if 
(intval($GLOBALS['phpgw']->common->show_date($starttime,'Hi')) && $starttime == 
$endtime)
                        {
--- 1990,1998 ----
                        $editable = ((!$this->bo->printer_friendly) && 
(($is_private && $this->bo->check_perms(PHPGW_ACL_PRIVATE)) || !$is_private));
  
!                       $starttime = $this->bo->maketime($event['start']) - 
$GLOBALS['phpgw']->datetime->tz_offset;
!                       $endtime = $this->bo->maketime($event['end']) - 
$GLOBALS['phpgw']->datetime->tz_offset;
                        $rawdate = mktime(0,0,0,$month,$day,$year);
!                       $rawdate_offset = $rawdate - 
$GLOBALS['phpgw']->datetime->tz_offset;
!                       $nextday = mktime(0,0,0,$month,$day + 1,$year) - 
$GLOBALS['phpgw']->datetime->tz_offset;
                        if 
(intval($GLOBALS['phpgw']->common->show_date($starttime,'Hi')) && $starttime == 
$endtime)
                        {
***************
*** 2007,2011 ****
                                if($endtime >= ($rawdate_offset + 86400))
                                {
!                                       $end_time = 
$GLOBALS['phpgw']->common->show_date(mktime(23,59,59,$month,$day,$year) - 
$GLOBALS['phpgw']->datetme->tz_offset,$this->bo->users_timeformat);
                                }
                                else
--- 2016,2020 ----
                                if($endtime >= ($rawdate_offset + 86400))
                                {
!                                       $end_time = 
$GLOBALS['phpgw']->common->show_date(mktime(23,59,59,$month,$day,$year) - 
$GLOBALS['phpgw']->datetime->tz_offset,$this->bo->users_timeformat);
                                }
                                else
***************
*** 2085,2089 ****
                                }
  
!                       $description = 
$this->bo->get_short_field($event,$is_private,'description');
                                for($i=0;$i<count($picture);$i++)
                                {
--- 2094,2098 ----
                                }
  
!                               $description = 
$this->bo->get_short_field($event,$is_private,'description');
                                for($i=0;$i<count($picture);$i++)
                                {
***************
*** 2135,2140 ****
                        $year = $event['start']['year'];
  
!                       $start = 
mktime($event['start']['hour'],$event['start']['min'],$event['start']['sec'],$month,$mday,$year)
 - $GLOBALS['phpgw']->datetme->tz_offset;
!                       $end = $this->bo->maketime($event['end']) - 
$GLOBALS['phpgw']->datetme->tz_offset;
  
                        $overlap = '';
--- 2144,2149 ----
                        $year = $event['start']['year'];
  
!                       $start = 
mktime($event['start']['hour'],$event['start']['min'],$event['start']['sec'],$month,$mday,$year)
 - $GLOBALS['phpgw']->datetime->tz_offset;
!                       $end = $this->bo->maketime($event['end']) - 
$GLOBALS['phpgw']->datetime->tz_offset;
  
                        $overlap = '';
***************
*** 2252,2256 ****
                        
$p->set_block('month_header','monthly_header','monthly_header');
                        
$p->set_block('month_header','column_title','column_title');
!               
                        $var = Array(
                                'bgcolor'       => $this->theme['th_bg'],
--- 2261,2265 ----
                        
$p->set_block('month_header','monthly_header','monthly_header');
                        
$p->set_block('month_header','column_title','column_title');
! 
                        $var = Array(
                                'bgcolor'       => $this->theme['th_bg'],
***************
*** 2287,2291 ****
                                }
                        }
!                       
                        $p->set_var('col_width',$col_width);
  
--- 2296,2300 ----
                                }
                        }
! 
                        $p->set_var('col_width',$col_width);
  
***************
*** 2309,2318 ****
  
                        $temp_owner = $this->bo->owner;
- //                    $this->bo->owner = $owner;
  
                        $str = '';
                        $p = 
CreateObject('phpgwapi.Template',$this->template_dir);
                        $p->set_unknowns('keep');
!               
                        $p->set_file(
                                Array (
--- 2318,2326 ----
  
                        $temp_owner = $this->bo->owner;
  
                        $str = '';
                        $p = 
CreateObject('phpgwapi.Template',$this->template_dir);
                        $p->set_unknowns('keep');
! 
                        $p->set_file(
                                Array (
***************
*** 2320,2324 ****
                                        'month_day'     => 'month_day.tpl'
                                )
!                       );
                        
$p->set_block('month_header','monthly_header','monthly_header');
                        
$p->set_block('month_header','month_column','month_column');
--- 2328,2332 ----
                                        'month_day'     => 'month_day.tpl'
                                )
!                       );
                        
$p->set_block('month_header','monthly_header','monthly_header');
                        
$p->set_block('month_header','month_column','month_column');
***************
*** 2336,2340 ****
                        }
                        $today = 
date('Ymd',$GLOBALS['phpgw']->datetime->users_localtime);
!                       $daily = $this->set_week_array($startdate - 
$GLOBALS['phpgw']->datetme->tz_offset,$cellcolor,$weekly);
                        @reset($daily);
                        while(list($date,$day_params) = each($daily))
--- 2344,2348 ----
                        }
                        $today = 
date('Ymd',$GLOBALS['phpgw']->datetime->users_localtime);
!                       $daily = $this->set_week_array($startdate - 
$GLOBALS['phpgw']->datetime->tz_offset,$cellcolor,$weekly);
                        @reset($daily);
                        while(list($date,$day_params) = each($daily))
***************
*** 2472,2476 ****
                        $cellcolor = $this->theme['row_on'];
  
!                       for ($i=intval($start + 
$GLOBALS['phpgw']->datetme->tz_offset);intval(date('Ymd',$i)) <= $monthend;$i 
+= 604800)
                        {
                                $cellcolor = 
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($cellcolor);
--- 2480,2484 ----
                        $cellcolor = $this->theme['row_on'];
  
!                       for ($i=intval($start + 
$GLOBALS['phpgw']->datetime->tz_offset);intval(date('Ymd',$i)) <= $monthend;$i 
+= 604800)
                        {
                                $cellcolor = 
$GLOBALS['phpgw']->nextmatchs->alternate_row_color($cellcolor);
***************
*** 2641,2650 ****
                        $var[] = Array(
                                'field' => lang('Start Date/Time'),
!                               'data'  => 
$GLOBALS['phpgw']->common->show_date($this->bo->maketime($event['start']) - 
$GLOBALS['phpgw']->datetme->tz_offset)
                        );
        
                        $var[] = Array(
                                'field' => lang('End Date/Time'),
!                               'data'  => 
$GLOBALS['phpgw']->common->show_date($this->bo->maketime($event['end']) - 
$GLOBALS['phpgw']->datetme->tz_offset)
                        );
  
--- 2649,2658 ----
                        $var[] = Array(
                                'field' => lang('Start Date/Time'),
!                               'data'  => 
$GLOBALS['phpgw']->common->show_date($this->bo->maketime($event['start']) - 
$GLOBALS['phpgw']->datetime->tz_offset)
                        );
        
                        $var[] = Array(
                                'field' => lang('End Date/Time'),
!                               'data'  => 
$GLOBALS['phpgw']->common->show_date($this->bo->maketime($event['end']) - 
$GLOBALS['phpgw']->datetime->tz_offset)
                        );
  
***************
*** 2661,2665 ****
                        $var[] = Array(
                                'field' => lang('Updated'),
!                               'data'  => 
$GLOBALS['phpgw']->common->show_date($this->bo->maketime($event['modtime']) - 
$GLOBALS['phpgw']->datetme->tz_offset)
                        );
  
--- 2669,2673 ----
                        $var[] = Array(
                                'field' => lang('Updated'),
!                               'data'  => 
$GLOBALS['phpgw']->common->show_date($this->bo->maketime($event['modtime']) - 
$GLOBALS['phpgw']->datetime->tz_offset)
                        );
  
***************
*** 2718,2722 ****
                                        if($recur_end != 0)
                                        {
!                                               $recur_end -= 
$GLOBALS['phpgw']->datetme->tz_offset;
                                                $str_extra .= lang('ends').': 
'.lang($GLOBALS['phpgw']->common->show_date($recur_end,'l')).', 
'.lang($GLOBALS['phpgw']->common->show_date($recur_end,'F')).' 
'.$GLOBALS['phpgw']->common->show_date($recur_end,'d, Y').' ';
                                        }
--- 2726,2730 ----
                                        if($recur_end != 0)
                                        {
!                                               $recur_end -= 
$GLOBALS['phpgw']->datetime->tz_offset;
                                                $str_extra .= lang('ends').': 
'.lang($GLOBALS['phpgw']->common->show_date($recur_end,'l')).', 
'.lang($GLOBALS['phpgw']->common->show_date($recur_end,'F')).' 
'.$GLOBALS['phpgw']->common->show_date($recur_end,'d, Y').' ';
                                        }
***************
*** 2879,2883 ****
                                {
                                        $rowspan_arr[$i][$j] = 0;
!                                       $time[$ind][$j] = '';
                                }
                        }
--- 2887,2891 ----
                                {
                                        $rowspan_arr[$i][$j] = 0;
!                                       $time[$ind][$j] = '';
                                }
                        }
***************
*** 2893,2897 ****
                        }
                        if($daily[$date_to_eval]['appts'])
!                       {
                                $starttime = 0;
                                $endtime = 0;
--- 2901,2905 ----
                        }
                        if($daily[$date_to_eval]['appts'])
!                       {
                                $starttime = 0;
                                $endtime = 0;
***************
*** 2982,2988 ****
                                                        $rowspan = 
intval(($endtime - $last_starttime) / (60 * 
intval($this->bo->prefs['calendar']['interval'])));
                                                }
!                                               
                                                $mins = (int)((($endtime - 
$starttime) / 60) % 60);
!                       
                                                if(($mins <> 0 && $mins <= 
intval(60 / intval($this->bo->prefs['calendar']['interval']))) || ($mins == 0 
&& date('i',$endtime) > intval($this->bo->prefs['calendar']['interval'])))
                                                {
--- 2990,2996 ----
                                                        $rowspan = 
intval(($endtime - $last_starttime) / (60 * 
intval($this->bo->prefs['calendar']['interval'])));
                                                }
! 
                                                $mins = (int)((($endtime - 
$starttime) / 60) % 60);
! 
                                                if(($mins <> 0 && $mins <= 
intval(60 / intval($this->bo->prefs['calendar']['interval']))) || ($mins == 0 
&& date('i',$endtime) > intval($this->bo->prefs['calendar']['interval'])))
                                                {
***************
*** 3005,3009 ****
                                        if($this->debug)
                                        {
!                                               echo '<!-- Time : 
'.$GLOBALS['phpgw']->common->show_date($this->bo->maketime($events[$i]['start'])
 - $GLOBALS['phpgw']->datetme->tz_offset).' - 
'.$GLOBALS['phpgw']->common->show_date($this->bo->maketime($events[$i]['end']) 
- $GLOBALS['phpgw']->datetme->tz_offset).' : Start : '.$ind.' : Interval # : 
'.$interval_start.' -->'."\n";
                                        }
                                }
--- 3013,3017 ----
                                        if($this->debug)
                                        {
!                                               echo '<!-- Time : 
'.$GLOBALS['phpgw']->common->show_date($this->bo->maketime($events[$i]['start'])
 - $GLOBALS['phpgw']->datetime->tz_offset).' - 
'.$GLOBALS['phpgw']->common->show_date($this->bo->maketime($events[$i]['end']) 
- $GLOBALS['phpgw']->datetime->tz_offset).' : Start : '.$ind.' : Interval # : 
'.$interval_start.' -->'."\n";
                                        }
                                }
***************
*** 3397,3401 ****
  
  // Date
!                       $start = $this->bo->maketime($event['start']) - 
$GLOBALS['phpgw']->datetme->tz_offset;
                        $var[] = Array(
                                'field' => lang('Start Date'),
--- 3405,3409 ----
  
  // Date
!                       $start = $this->bo->maketime($event['start']) - 
$GLOBALS['phpgw']->datetime->tz_offset;
                        $var[] = Array(
                                'field' => lang('Start Date'),
***************
*** 3419,3423 ****
  
  // End Date
!                       $end = $this->bo->maketime($event['end']) - 
$GLOBALS['phpgw']->datetme->tz_offset;
                        $var[] = Array(
                                'field' => lang('End Date'),
--- 3427,3431 ----
  
  // End Date
!                       $end = $this->bo->maketime($event['end']) - 
$GLOBALS['phpgw']->datetime->tz_offset;
                        $var[] = Array(
                                'field' => lang('End Date'),
***************
*** 3458,3462 ****
                                $users = Array();
                                
$this->build_part_list($users,$accounts,$this->bo->owner);
!     
                                $str = '';
                                @asort($users);
--- 3466,3470 ----
                                $users = Array();
                                
$this->build_part_list($users,$accounts,$this->bo->owner);
! 
                                $str = '';
                                @asort($users);
***************
*** 3530,3539 ****
                        {
                                $checked = ' checked';
!                               $recur_end = 
$this->bo->maketime($event['recur_enddate']) - 
$GLOBALS['phpgw']->datetme->tz_offset;
                        }
                        else
                        {
                                $checked = '';
!                               $recur_end = 
$this->bo->maketime($event['start']) + 86400 - 
$GLOBALS['phpgw']->datetme->tz_offset;
                        }
        
--- 3538,3547 ----
                        {
                                $checked = ' checked';
!                               $recur_end = 
$this->bo->maketime($event['recur_enddate']) - 
$GLOBALS['phpgw']->datetime->tz_offset;
                        }
                        else
                        {
                                $checked = '';
!                               $recur_end = 
$this->bo->maketime($event['start']) + 86400 - 
$GLOBALS['phpgw']->datetime->tz_offset;
                        }
        

Index: class.socalendar_sql.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.socalendar_sql.inc.php,v
retrieving revision 1.29
retrieving revision 1.30
diff -C2 -r1.29 -r1.30
*** class.socalendar_sql.inc.php        24 Jun 2002 23:24:24 -0000      1.29
--- class.socalendar_sql.inc.php        25 Aug 2002 04:07:21 -0000      1.30
***************
*** 496,500 ****
                while (list($key,$value) = @each($event['participants']))
                {
!                       if(intval($key) == intval($this->user))
                        {
                                $value = 'A';
--- 496,501 ----
                while (list($key,$value) = @each($event['participants']))
                {
! //                    if(intval($key) == intval($this->user))
!                       if(intval($key) == $event['owner'])
                        {
                                $value = 'A';

Index: class.html.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.html.inc.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** class.html.inc.php  10 Dec 2001 03:54:06 -0000      1.1
--- class.html.inc.php  25 Aug 2002 04:07:21 -0000      1.2
***************
*** 16,26 ****
  class html
  {
-       var $prefered_img_title;
- 
        function html()
        {
-               global $HTTP_USER_AGENT;
-                                                                               
                                                // should be Ok for all HTML 4 
compatible browsers
-               $this->prefered_img_title = 
stristr($HTTP_USER_AGENT,'konqueror') ? 'title' : 'alt';
        }
  
--- 16,21 ----
***************
*** 146,150 ****
                if ($title)
                {
!                       $html .= " $this->prefered_img_title=\"$title\"";
                }
                if ($opts)
--- 141,145 ----
                if ($title)
                {
!                       $html .= " alt=\"$title\" title=\"$title\"";
                }
                if ($opts)





reply via email to

[Prev in Thread] Current Thread [Next in Thread]