phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] CVS: calendar/inc class.uicalendar.inc.php,1.66.2.13,


From: Mark A Peters <address@hidden>
Subject: [Phpgroupware-cvs] CVS: calendar/inc class.uicalendar.inc.php,1.66.2.13,1.66.2.14
Date: Tue, 07 May 2002 20:00:56 -0400

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

Modified Files:
      Tag: Version-0_9_14-branch
        class.uicalendar.inc.php 
Log Message:
This should complete GNU Bug #164 for the weekly view.  Also fixed a problem 
with the allowance of private entries that should not have been viewable.

Index: class.uicalendar.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/calendar/inc/class.uicalendar.inc.php,v
retrieving revision 1.66.2.13
retrieving revision 1.66.2.14
diff -C2 -r1.66.2.13 -r1.66.2.14
*** class.uicalendar.inc.php    7 May 2002 00:53:19 -0000       1.66.2.13
--- class.uicalendar.inc.php    8 May 2002 00:00:52 -0000       1.66.2.14
***************
*** 33,36 ****
--- 33,37 ----
                var $tz_offset;
                var $theme;
+               var $link_tpl;
  
                var $public_functions = array(
***************
*** 85,88 ****
--- 86,102 ----
                        $this->cat_id   = $this->bo->cat_id;
  
+                       $this->link_tpl = 
CreateObject('phpgwapi.Template',$this->template_dir);
+                       $this->link_tpl->set_unknowns('remove');
+                       $this->link_tpl->set_file(
+                          Array(
+                                  'link_picture'       => 'link_pict.tpl'
+                          )
+                       );
+                       
$this->link_tpl->set_block('link_picture','link_pict','link_pict');
+                       
$this->link_tpl->set_block('link_picture','pict','pict');
+                       
$this->link_tpl->set_block('link_picture','link_open','link_open');
+                       
$this->link_tpl->set_block('link_picture','link_close','link_close');
+                       
$this->link_tpl->set_block('link_picture','link_text','link_text');
+ 
                        if($this->bo->use_session)
                        {
***************
*** 1974,1990 ****
                        $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);
!                       $p->set_unknowns('remove');
!                       $p->set_file(
!                          Array(
!                                  'link_picture'       => 'link_pict.tpl'
!                          )
!                       );
!                       $p->set_block('link_picture','link_pict','link_pict');
!                       $p->set_block('link_picture','pict','pict');
!                       $p->set_block('link_picture','link_open','link_open');
!                       $p->set_block('link_picture','link_close','link_close');
!                       $p->set_block('link_picture','link_text','link_text');
  
                        $starttime = $this->bo->maketime($event['start']) - 
$this->tz_offset;
--- 1988,1992 ----
                        $str = '';
                        $is_private = 
$this->bo->is_private($event,$event['owner']);
!                       $editable = ((!$this->bo->printer_friendly) && 
(($is_private && $this->bo->check_perms(PHPGW_ACL_PRIVATE,$event['owner'])) || 
!$is_private));
  
                        $starttime = $this->bo->maketime($event['start']) - 
$this->tz_offset;
***************
*** 2036,2042 ****
                        {
                                $date = 
sprintf('%04d%02d%02d',$year,$month,$day);
!                               
$p->set_var('link_link',$this->page('view','&cal_id='.$event['id'].'&date='.$date));
!                               $p->set_var('lang_view',lang('View this 
entry'));
!                               $p->parse('picture','link_open',True);
                        
                                if($event['priority'] == 3)
--- 2038,2044 ----
                        {
                                $date = 
sprintf('%04d%02d%02d',$year,$month,$day);
!                               
$this->link_tpl->set_var('link_link',$this->page('view','&cal_id='.$event['id'].'&date='.$date));
!                               $this->link_tpl->set_var('lang_view',lang('View 
this entry'));
!                               
$this->link_tpl->parse('picture','link_open',True);
                        
                                if($event['priority'] == 3)
***************
*** 2092,2096 ****
                                }
  
!                       $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++)
                                {
***************
*** 2101,2105 ****
                                                'description'   => $description
                                        );
!                                       
$this->output_template_array($p,'picture','pict',$var);
                                }
                        }
--- 2103,2107 ----
                                                'description'   => $description
                                        );
!                                       
$this->output_template_array($this->link_tpl,'picture','pict',$var);
                                }
                        }
***************
*** 2113,2125 ****
                                        'text' => $text
                                );
!                               
$this->output_template_array($p,'picture','link_text',$var);
                        }
  
                        if ($editable)
                        {
!                               $p->parse('picture','link_close',True);
                        }
!                       $str = $p->fp('out','link_pict');
!                       unset($p);
                        return $str;
                }
--- 2115,2129 ----
                                        'text' => $text
                                );
!                               
$this->output_template_array($this->link_tpl,'picture','link_text',$var);
                        }
  
                        if ($editable)
                        {
!                               
$this->link_tpl->parse('picture','link_close',True);
                        }
!                       $str = $this->link_tpl->fp('out','link_pict');
!                       $this->link_tpl->set_var('picture','');                 
!                       $this->link_tpl->set_var('out','');
! //                    unset($p);
                        return $str;
                }
***************
*** 2291,2295 ****
  
                        $temp_owner = $this->bo->owner;
!                       $this->bo->owner = $owner;
  
                        $str = '';
--- 2295,2299 ----
  
                        $temp_owner = $this->bo->owner;
! //                    $this->bo->owner = $owner;
  
                        $str = '';
***************
*** 2514,2517 ****
--- 2518,2522 ----
                        {
                                $this->bo->so->owner = $owners_array[$i];
+                               $this->bo->so->open_box($owners_array[$i]);
                                $this->bo->store_to_cache(
                                        Array(
***************
*** 3190,3194 ****
  
                                $this->bo->cached_events = Array();
!                               $this->bo->owner = $part;
                                $this->bo->so->owner = $part;
                                $this->bo->so->open_box($part);
--- 3195,3199 ----
  
                                $this->bo->cached_events = Array();
! //                            $this->bo->owner = $part;
                                $this->bo->so->owner = $part;
                                $this->bo->so->open_box($part);




reply via email to

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