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.71.2.11,


From: Mark A Peters <address@hidden>
Subject: [Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php,1.71.2.11,1.71.2.12 class.bopreferences.inc.php,1.2,1.2.2.1 class.socalendar.inc.php,1.22.2.3,1.22.2.4 class.uicalendar.inc.php,1.66.2.21,1.66.2.22 class.uipreferences.inc.php,1.2.2.2,1.2.2.3
Date: Mon, 16 Sep 2002 22:24:46 -0400

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

Modified Files:
      Tag: Version-0_9_14-branch
        class.bocalendar.inc.php class.bopreferences.inc.php 
        class.socalendar.inc.php class.uicalendar.inc.php 
        class.uipreferences.inc.php 
Log Message:
GNU Patch #439.

Index: class.bocalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.bocalendar.inc.php,v
retrieving revision 1.71.2.11
retrieving revision 1.71.2.12
diff -C2 -r1.71.2.11 -r1.71.2.12
*** class.bocalendar.inc.php    25 Aug 2002 04:07:48 -0000      1.71.2.11
--- class.bocalendar.inc.php    17 Sep 2002 02:24:44 -0000      1.71.2.12
***************
*** 216,219 ****
--- 216,224 ----
                        }
  
+                       
if($GLOBALS['phpgw']->accounts->get_type($this->owner)=='g')
+                       {
+                               $this->filter = ' all ';
+                       }
+ 
                        $this->so = CreateObject('calendar.socalendar',
                                Array(
***************
*** 276,279 ****
--- 281,289 ----
                        }
  
+                       if(!isset($this->sortby) || $this->sortby == '')
+                       {
+                               $this->sortby = 'category';
+                       }
+ 
                        if(isset($num_months) && $num_months!='')
                        {
***************
*** 440,444 ****
                function read_entry($id)
                {
!                       if($this->check_perms(PHPGW_ACL_READ))
                        {
                                $event = $this->so->read_entry($id);
--- 450,454 ----
                function read_entry($id)
                {
!                       if($this->check_perms(PHPGW_ACL_READ,$id))
                        {
                                $event = $this->so->read_entry($id);
***************
*** 455,460 ****
                function delete_single($param)
                {
!                       
!                       if($this->check_perms(PHPGW_ACL_DELETE))
                        {
                                $temp_event = $this->get_cached_event();
--- 465,469 ----
                function delete_single($param)
                {
!                       
if($this->check_perms(PHPGW_ACL_DELETE,intval($param['id'])))
                        {
                                $temp_event = $this->get_cached_event();
***************
*** 482,486 ****
                function delete_entry($id)
                {
!                       if($this->check_perms(PHPGW_ACL_DELETE))
                        {
                                $temp_event = $this->read_entry($id);
--- 491,495 ----
                function delete_entry($id)
                {
!                       if($this->check_perms(PHPGW_ACL_DELETE,$id))
                        {
                                $temp_event = $this->read_entry($id);
***************
*** 500,504 ****
                function reinstate($params='')
                {
!                       if($this->check_perms(PHPGW_ACL_EDIT) && 
isset($params['cal_id']) && isset($params['reinstate_index']))
                        {
                                $event = 
$this->so->read_entry($params['cal_id']);
--- 509,513 ----
                function reinstate($params='')
                {
!                       if($this->check_perms(PHPGW_ACL_EDIT,$params['cal_id']) 
&& isset($params['reinstate_index']))
                        {
                                $event = 
$this->so->read_entry($params['cal_id']);
***************
*** 589,600 ****
                                $send_to_ui = False;
                        }
  
!                       if($this->debug)
                        {
-                               echo '<!-- ID : '.$l_cal['id'].' -->'."\n";
-                       }
- 
-          if(isset($GLOBALS['HTTP_GET_VARS']['readsess']))
-          {
                                $event = $this->restore_from_appsession();
                                $event['title'] = stripslashes($event['title']);
--- 598,606 ----
                                $send_to_ui = False;
                        }
+                       
+                       print_debug('ID',$l_cal['id']);
  
!                       if(isset($GLOBALS['HTTP_GET_VARS']['readsess']))
                        {
                                $event = $this->restore_from_appsession();
                                $event['title'] = stripslashes($event['title']);
***************
*** 609,628 ****
                                                )
                                        );
!                               $GLOBALS['phpgw']->common->phpgw_exit(True);
                                }
                                $overlapping_events = False;
!          }
!          else
                        {
!                       if((!$l_cal['id'] && 
!$this->check_perms(PHPGW_ACL_ADD)) || ($l_cal['id'] && 
!$this->check_perms(PHPGW_ACL_EDIT)))
!                       {
!                          ExecMethod('calendar.uicalendar.index');
!                                       $GLOBALS['phpgw']->common->phpgw_exit();
!                       }
! 
!                               if($this->debug)
                                {
!                                       echo '<!-- Prior to fix_update_time() 
-->'."\n";
                                }
                                $this->fix_update_time($l_start);
                                $this->fix_update_time($l_end);
--- 615,631 ----
                                                )
                                        );
!                                       
$GLOBALS['phpgw']->common->phpgw_exit(True);
                                }
                                $overlapping_events = False;
!                       }
!                       else
                        {
!                               if((!$l_cal['id'] && 
!$this->check_perms(PHPGW_ACL_ADD)) || ($l_cal['id'] && 
!$this->check_perms(PHPGW_ACL_EDIT,$l_cal['id'])))
                                {
!                                       ExecMethod('calendar.uicalendar.index');
!                                       $GLOBALS['phpgw']->common->phpgw_exit();
                                }
+ 
+                               print_debug('Prior to fix_update_time()');
                                $this->fix_update_time($l_start);
                                $this->fix_update_time($l_end);
***************
*** 902,922 ****
                function can_user_edit($event)
                {
!                       $can_edit = False;
!               
!                       if($this->check_perms(PHPGW_ACL_EDIT) == True)
!                       {
!                               if($event['public'] == False || 
$event['public'] == 0)
!                               {
!                                       
if($this->check_perms(PHPGW_ACL_PRIVATE) == True)
!                                       {
!                                               $can_edit = True;
!                                       }
!                               }
!                               else
!                               {
!                                       $can_edit = True;
!                               }
!                       }
!                       return $can_edit;
                }
  
--- 905,909 ----
                function can_user_edit($event)
                {
!                       return $this->rb_check_perms(PHPGW_ACL_EDIT,$event);
                }
  
***************
*** 1181,1202 ****
                }
  
!               function check_perms($needed,$user=0)
                {
!                       if($user == 0)
                        {
!                               $allowed = !!($this->grants[$this->owner] & 
$needed);
!                               if($this->debug)
!                               {
!                                       echo '<!-- Grantor: '.$this->owner.' 
Rights: '.$this->grants[$this->owner].' Allowed: '.$allowed.'-->'."\n";
!                               }
!                               
!                               return $allowed;
                        }
                        else
                        {
!                               return !!($this->grants[intval($user)] & 
$needed);
                        }
                }
  
                function get_fullname($accountid)
                {
--- 1168,1217 ----
                }
  
! //            function check_perms($needed,$user=0)
! //            {
! //                    if($user == 0)
! //                    {
! //                            $allowed = !!($this->grants[$this->owner] & 
$needed);
! //                            if($this->debug)
! //                            {
! //                                    echo '<!-- Grantor: '.$this->owner.' 
Rights: '.$this->grants[$this->owner].' Allowed: '.$allowed.'-->'."\n";
! //                            }
! //                            return $allowed;
! //                    }
! //                    else
! //                    {
! //                            return !!($this->grants[intval($user)] & 
$needed);
! //                    }
! //            }
! 
!               function check_perms($needed,$event=0)
                {
!                       if (is_int($event) && $event == 0)
                        {
!                               $owner = $this->owner;
                        }
                        else
                        {
!                               if (!is_array($event))
!                               {
!                                       $event = $this->so->read_entry((int) 
$event);
!                               }
!                               if (!is_array($event))
!                               {
!                                       return False;
!                               }
!                               $owner = $event['owner'];
!                               $private = $event['public'] == False || 
$event['public'] == 0;
                        }
+                       $user = $GLOBALS['phpgw_info']['user']['account_id'];
+                       $grants = $this->grants[$owner];
+ 
+                       $access = $user == $owner || $grants & $needed && 
(!$private || $grants & PHPGW_ACL_PRIVATE);
+                       //echo "<p>rb_check_perms for user $user and needed_acl 
$needed: event=$event[title]: owner=$owner, privat=$private, grants=$grants ==> 
access=$access</p>\n";
+ 
+                       return $access;
                }
  
+ 
                function get_fullname($accountid)
                {
***************
*** 1287,1291 ****
                                return 'private';
                        }
!                       elseif(strlen($event[$field]) > 19 && 
!$this->printer_friendly)
                        {
                                return substr($event[$field], 0 , 19) . '...';
--- 1302,1307 ----
                                return 'private';
                        }
! //                    elseif(strlen($event[$field]) > 19 && 
!$this->printer_friendly)
!                       elseif(strlen($event[$field]) > 19 && 
$this->printer_friendly)
                        {
                                return substr($event[$field], 0 , 19) . '...';
***************
*** 2083,2091 ****
                                  )
                                {
!                                       if($this->debug)
!                                       {
!                                               echo '<!-- Msg Type = 
'.$msg_type.' -->'."\n";
!                                               echo '<!-- userid = '.$userid.' 
-->'."\n";
!                                       }
                                        if(!is_object($send))
                                        {
--- 2099,2104 ----
                                  )
                                {
!                                       print_debug('Msg Type',$msg_type);
!                                       print_debug('UserID',$userid);
                                        if(!is_object($send))
                                        {
***************
*** 2101,2109 ****
                                        $part_prefs = 
$preferences->create_email_preferences(intval($userid));
                                        $to = $part_prefs['email']['address'];
!                                       
!                                       if($this->debug)
!                                       {
!                                               echo '<!-- Email being sent to: 
'.$to.' -->'."\n";
!                                       }
  
                                        
$GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset'] = 
$part_prefs['common']['tz_offset'];
--- 2114,2119 ----
                                        $part_prefs = 
$preferences->create_email_preferences(intval($userid));
                                        $to = $part_prefs['email']['address'];
! 
!                                       print_debug('Email being to',$to);
  
                                        
$GLOBALS['phpgw_info']['user']['preferences']['common']['tz_offset'] = 
$part_prefs['common']['tz_offset'];
***************
*** 2180,2203 ****
                        $y_time = $t_time - 86400;
                        $tt_time = $t_time + 86399;
!                       if($this->debug)
!                       {
!                               echo '<!-- T_TIME : '.$t_time.' : 
'.$GLOBALS['phpgw']->common->show_date($t_time).' -->'."\n";
!                               echo '<!-- Y_TIME : '.$y_time.' : 
'.$GLOBALS['phpgw']->common->show_date($y_time).'-->'."\n";
!                               echo '<!-- TT_TIME : '.$tt_time.' : 
'.$GLOBALS['phpgw']->common->show_date($tt_time).'-->'."\n";
!                       }
                        while(list($key,$alarm) = each($event['alarm']))
                        {
                                if($alarm['enabled'])
                                {
!                                       if($this->debug)
!                                       {
!                                               echo '<!-- TIME : 
'.$alarm['time'].' : '.$GLOBALS['phpgw']->common->show_date($alarm['time']).' 
('.$event['id'].') -->'."\n";
!                                       }
                                        if($event['recur_type'] != 
MCAL_RECUR_NONE)   /* Recurring Event */
                                        {
!                                               if($this->debug)
!                                               {
!                                                       echo '<!-- Recurring 
Event -->'."\n";
!                                               }
                                                if($alarm['time'] > $y_time && 
$GLOBALS['phpgw']->common->show_date($alarm['time'],'Hi') < $starttime_hi && 
$alarm['time'] < $t_time)
                                                {
--- 2190,2204 ----
                        $y_time = $t_time - 86400;
                        $tt_time = $t_time + 86399;
!                       print_debug('T_TIME',$t_time.' : 
'.$GLOBALS['phpgw']->common->show_date($t_time));
!                       print_debug('Y_TIME',$y_time.' : 
'.$GLOBALS['phpgw']->common->show_date($y_time));
!                       print_debug('TT_TIME',$tt_time.' : 
'.$GLOBALS['phpgw']->common->show_date($tt_time));
                        while(list($key,$alarm) = each($event['alarm']))
                        {
                                if($alarm['enabled'])
                                {
!                                       print_debug('TIME',$alarm['time'].' : 
'.$GLOBALS['phpgw']->common->show_date($alarm['time']).' ('.$event['id'].')');
                                        if($event['recur_type'] != 
MCAL_RECUR_NONE)   /* Recurring Event */
                                        {
!                                               print_debug('Recurring Event');
                                                if($alarm['time'] > $y_time && 
$GLOBALS['phpgw']->common->show_date($alarm['time'],'Hi') < $starttime_hi && 
$alarm['time'] < $t_time)
                                                {
***************
*** 2211,2218 ****
                                }
                        }
!                       if($this->debug)
!                       {
!                               echo '<!-- Found: '.$found.' -->'."\n";
!                       }
                        return $found;
                }
--- 2212,2216 ----
                                }
                        }
!                       print_debug('Found',$found);
                        return $found;
                }
***************
*** 2225,2240 ****
                                
if(isset($new_event['participants'][$old_userid]))
                                {
!                                       if($this->debug)
!                                       {
!                                               echo '<!-- Modifying event for 
user '.$old_userid.' -->'."\n";
!                                       }
                                        $this->modified[intval($old_userid)] = 
$new_status;
                                }
                                else
                                {
!                                       if($this->debug)
!                                       {
!                                               echo '<!-- Deleting user 
'.$old_userid.' from the event -->'."\n";
!                                       }
                                        $this->deleted[intval($old_userid)] = 
$old_status;
                                }
--- 2223,2232 ----
                                
if(isset($new_event['participants'][$old_userid]))
                                {
!                                       print_debug('Modifying event for 
user',$old_userid);
                                        $this->modified[intval($old_userid)] = 
$new_status;
                                }
                                else
                                {
!                                       print_debug('Deleting user from the 
event',$old_userid);
                                        $this->deleted[intval($old_userid)] = 
$old_status;
                                }
***************
*** 2245,2252 ****
                                
if(!isset($old_event['participants'][$new_userid]))
                                {
!                                       if($this->debug)
!                                       {
!                                               echo '<!-- Adding event for 
user '.$new_userid.' -->'."\n";
!                                       }
                                        $this->added[$new_userid] = 'U';
                                        $new_event['participants'][$new_userid] 
= 'U';
--- 2237,2241 ----
                                
if(!isset($old_event['participants'][$new_userid]))
                                {
!                                       print_debug('Adding event for 
user',$new_userid);
                                        $this->added[$new_userid] = 'U';
                                        $new_event['participants'][$new_userid] 
= 'U';
***************
*** 2254,2259 ****
                        }
                
!             if(count($this->added) > 0 || count($this->modified) > 0 || 
count($this->deleted) > 0)
!          {
                                if(count($this->added) > 0)
                                {
--- 2243,2248 ----
                        }
                
!                       if(count($this->added) > 0 || count($this->modified) > 
0 || count($this->deleted) > 0)
!                       {
                                if(count($this->added) > 0)
                                {
***************
*** 2274,2277 ****
--- 2263,2267 ----
                {
                        $already_moved = Array();
+                       $has_category  = Array(); // remove only multiple 
occurences of a category per event/day
                        for($v=$firstday;$v<=$lastday;$v++)
                        {
***************
*** 2283,2290 ****
                                {
                                        $start = 
sprintf('%04d%02d%02d',$event['start']['year'],$event['start']['month'],$event['start']['mday']);
!                                       if($this->debug)
                                        {
!                                               echo "<p>Event:<br>"; 
print_r($event); echo "</p>";
!                                               echo '<!-- start='.$start.', 
v='.$v.' ';
                                        }
  
--- 2273,2283 ----
                                {
                                        $start = 
sprintf('%04d%02d%02d',$event['start']['year'],$event['start']['month'],$event['start']['mday']);
!                                       
print_debug('EVENT',print_r($event,False));
!                                       print_debug('start',$start);
!                                       print_debug('v',$v);
! 
!                                       if($start < $firstday)
                                        {
!                                               $start = $firstday; // event 
continues into current month/year
                                        }
  
***************
*** 2295,2302 ****
--- 2288,2300 ----
                                                if($g != 
count($this->cached_events[$v]))
                                                {
+                                                       if 
($has_category[$event['id']]['category'] != True)
+                                                       {
+                                                               continue; // we 
need at least one evidence for this category
+                                                       }
                                                        for($h=$g + 
1;$h<$c_daily;$h++)
                                                        {
                                                                
$this->cached_events[$v][$h - 1] = $this->cached_events[$v][$h];
                                                        }
+                                                       
$has_category[$event['id']]['category'] = True;
                                                        
unset($this->cached_events[$v][$h]);
                                                }
***************
*** 2319,2344 ****
                                                                
$this->cached_events[$firstday][] = $event;
                                                                
$already_moved[$event['id']] = 1;
!                                                               if($this->debug)
!                                                               {
!                                                                       echo 
'moved --> '."\n";
!                                                               }
                                                        }
                                                        else
                                                        {
                                                                
$already_moved[$event['id']] = 2;
!                                                               if($this->debug)
!                                                               {
!                                                                       echo 
'removed (not moved) -->'."\n";
!                                                               }
                                                        }
!                                       }
!                                               elseif($this->debug)
                                                {
!                                                       echo 'removed -->'."\n";
                                                }
                                        }
!                                       elseif($this->debug)
                                        {
!                                               echo 'ok -->'."\n";
                                        }
                                }
--- 2317,2336 ----
                                                                
$this->cached_events[$firstday][] = $event;
                                                                
$already_moved[$event['id']] = 1;
!                                                               
print_debug('Event moved');
                                                        }
                                                        else
                                                        {
                                                                
$already_moved[$event['id']] = 2;
!                                                               
print_debug('Event removed (not moved');
                                                        }
!                                               }
!                                               else
                                                {
!                                                       print_debug('Event 
removed');
                                                }
                                        }
!                                       else
                                        {
!                                               print_debug('Event OK');
                                        }
                                }
***************
*** 2353,2355 ****
                }
        }
! ?>
--- 2345,2347 ----
                }
        }
! ?>
\ No newline at end of file

Index: class.bopreferences.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.bopreferences.inc.php,v
retrieving revision 1.2
retrieving revision 1.2.2.1
diff -C2 -r1.2 -r1.2.2.1
*** class.bopreferences.inc.php 6 Nov 2001 01:49:16 -0000       1.2
--- class.bopreferences.inc.php 17 Sep 2002 02:24:44 -0000      1.2.2.1
***************
*** 41,44 ****
--- 41,45 ----
                                
$GLOBALS['phpgw']->preferences->add('calendar','defaultfilter',$GLOBALS['HTTP_POST_VARS']['prefs']['defaultfilter']);
                                
$GLOBALS['phpgw']->preferences->add('calendar','interval',intval($GLOBALS['HTTP_POST_VARS']['prefs']['interval']));
+                               
$GLOBALS['phpgw']->preferences->add('calendar','planner_intervals_per_day',intval($GLOBALS['HTTP_POST_VARS']['prefs']['planner_intervals_per_day']));
                                if 
($GLOBALS['HTTP_POST_VARS']['prefs']['mainscreen_showevents'] == True)
                                {
***************
*** 101,103 ****
                }
        }
- 
--- 102,103 ----

Index: class.socalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.socalendar.inc.php,v
retrieving revision 1.22.2.3
retrieving revision 1.22.2.4
diff -C2 -r1.22.2.3 -r1.22.2.4
*** class.socalendar.inc.php    23 Jun 2002 20:28:43 -0000      1.22.2.3
--- class.socalendar.inc.php    17 Sep 2002 02:24:44 -0000      1.22.2.4
***************
*** 137,141 ****
                function list_events_keyword($keywords)
                {
!                       $sql = 'AND (phpgw_cal_user.cal_login='.$this->owner.') 
';
  
                        $words = split(' ',$keywords);
--- 137,160 ----
                function list_events_keyword($keywords)
                {
! //                    $sql = 'AND (phpgw_cal_user.cal_login='.$this->owner.') 
';
!                       $o = $this->owner;
!                       $type = $GLOBALS['phpgw']->accounts->get_type($o);
! 
!                       if($type == 'g') 
!                       {
!                          $members = 
$GLOBALS['phpgw']->acl->get_ids_for_location($o, 1, 'phpgw_group');
!                       }
!                       else
!                       {
!                         $members[0] = $o;
!                       }
! 
!                       $sql = 'AND (phpgw_cal_user.cal_login='.$members[0];
! 
!                       for($i=1; $i<count($members); $i++)
!                       {
!                         $sql .= ' OR phpgw_cal_user.cal_login='.$members[$i];
!                       }
!                       $sql .= ') ';
  
                        $words = split(' ',$keywords);
***************
*** 214,219 ****
                        if($GLOBALS['phpgw_info']['server']['calendar_type'] == 
'sql')
                        {
                                $this->cal->stream->query('UPDATE phpgw_cal SET 
owner='.$new_owner.' WHERE owner='.$account_id,__LINE__,__FILE__);
-                               $this->cal->stream->query('UPDATE 
phpgw_cal_user SET cal_login='.$new_owner.' WHERE cal_login='.$account_id);
                        }
                }
--- 233,252 ----
                        if($GLOBALS['phpgw_info']['server']['calendar_type'] == 
'sql')
                        {
+                               $db2 = $this->cal->stream;
+                               $this->cal->stream->query('SELECT cal_id FROM 
phpgw_cal_user WHERE cal_login='.$account_id,__LINE__,__FILE__)
+                               while($this->cal->stream->next_record())
+                               {
+                                       $id = $this->cal->stream->f('cal_id');
+                                       $db2->query('SELECT count(*) FROM 
phpgw_cal_user WHERE cal_id='.$id.' AND 
cal_login='.$new_owner,__LINE__,__FILE__);
+                                       if($db2->f(0) == 0)
+                                       {
+                                               $db2->query('UPDATE 
phpgw_cal_user SET cal_login='.$new_owner.' WHERE cal_id='.$id.' AND 
cal_login='.$account_id,__LINE__,__FILE__);
+                                       }
+                                       else
+                                       {
+                                               $db2->query('DELETE FROM 
phpgw_cal_user WHERE cal_id='.$id.' AND 
cal_login='.$account_id,__LINE__,__FILE__);
+                                       }
+                               }
                                $this->cal->stream->query('UPDATE phpgw_cal SET 
owner='.$new_owner.' WHERE owner='.$account_id,__LINE__,__FILE__);
                        }
                }
***************
*** 351,353 ****
                /* End mcal equiv functions */
        }
! ?>
--- 384,386 ----
                /* End mcal equiv functions */
        }
! ?>
\ No newline at end of file

Index: class.uicalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.uicalendar.inc.php,v
retrieving revision 1.66.2.21
retrieving revision 1.66.2.22
diff -C2 -r1.66.2.21 -r1.66.2.22
*** class.uicalendar.inc.php    25 Aug 2002 04:07:48 -0000      1.66.2.21
--- class.uicalendar.inc.php    17 Sep 2002 02:24:44 -0000      1.66.2.22
***************
*** 33,36 ****
--- 33,52 ----
                var $link_tpl;
  
+               // planner related variables
+               var $planner_html;
+ 
+               var $planner_header;
+               var $planner_rows;
+ 
+               var $planner_group_members;
[...1585 lines suppressed...]
  
                                if($this->bo->cached_events[$date])
                                {
!                                       if($this->debug)
!                                       {
!                                               echo '<!-- Date : '.$date.' 
Appointments found : '.count($this->bo->cached_events[$date]).' -->'."\n";
!                                       }
                                        $appts = True;
                                }
--- 4050,4059 ----
                                $date = date('Ymd',$datetime);
  
!                               print_debug('set_week_array : Date ',$date);
  
                                if($this->bo->cached_events[$date])
                                {
!                                       print_debug('Date',$date);
!                                       print_debug('Appointments 
Found',count($this->bo->cached_events[$date]));
                                        $appts = True;
                                }

Index: class.uipreferences.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.uipreferences.inc.php,v
retrieving revision 1.2.2.2
retrieving revision 1.2.2.3
diff -C2 -r1.2.2.2 -r1.2.2.3
*** class.uipreferences.inc.php 28 Apr 2002 19:05:50 -0000      1.2.2.2
--- class.uipreferences.inc.php 17 Sep 2002 02:24:44 -0000      1.2.2.3
***************
*** 106,109 ****
--- 106,110 ----
                        }
                        $str = '<select name="prefs[defaultcalendar]">'
+                               . '<option 
value="planner"'.$selected['planner'].'>'.lang('Planner').'</option>'
                                . '<option 
value="year"'.$selected['year'].'>'.lang('Yearly').'</option>'
                                . '<option 
value="month"'.$selected['month'].'>'.lang('Monthly').'</option>'
***************
*** 147,150 ****
--- 148,165 ----
                        $this->display_item(lang('Display interval in Day 
View'),'<select name="prefs[interval]">'."\n".$str.'</select>'."\n");
  
+                       $var = Array(
+                               1       => '1',
+                               2       => '2',
+                               3       => '3',
+                               4       => '4',
+                       );
+ 
+                       $str = '';
+                       while(list($key,$value) = each($var))
+                       {
+                               $str .= '<option 
value="'.$key.'"'.(intval($this->bo->prefs['calendar']['planner_intervals_per_day'])==$key?'
 selected':'').'>'.$value.'</option>'."\n";
+                       }
+                       $this->display_item(lang('Number of Intervals per Day 
in Planner View'),'<select 
name="prefs[planner_intervals_per_day]">'."\n".$str.'</select>'."\n");
+ 
                        $this->display_item(lang('Send/receive updates via 
email'),'<input type="checkbox" name="prefs[send_updates]" 
value="True"'.(@$this->bo->prefs['calendar']['send_updates']?' 
checked':'').'>'."\n");
  
***************
*** 177,179 ****
                        $this->output_template_array('row','pref_list',$var);
                }
!       }
--- 192,194 ----
                        $this->output_template_array('row','pref_list',$var);
                }
!       }
\ No newline at end of file





reply via email to

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