phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] calendar inc/class.bocalendar.inc.php inc/class...


From: Sigurd Nes
Subject: [Phpgroupware-cvs] calendar inc/class.bocalendar.inc.php inc/class...
Date: Tue, 12 Dec 2006 15:19:11 +0000

CVSROOT:        /sources/phpgroupware
Module name:    calendar
Changes by:     Sigurd Nes <sigurdne>   06/12/12 15:19:11

Modified files:
        inc            : class.bocalendar.inc.php 
                         class.uicalendar.inc.php 
                         hook_sidebox_menu.inc.php 
        templates/base : header.inc.php 

Log message:
        Fixes

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/calendar/inc/class.bocalendar.inc.php?cvsroot=phpgroupware&r1=1.120&r2=1.121
http://cvs.savannah.gnu.org/viewcvs/calendar/inc/class.uicalendar.inc.php?cvsroot=phpgroupware&r1=1.144&r2=1.145
http://cvs.savannah.gnu.org/viewcvs/calendar/inc/hook_sidebox_menu.inc.php?cvsroot=phpgroupware&r1=1.5&r2=1.6
http://cvs.savannah.gnu.org/viewcvs/calendar/templates/base/header.inc.php?cvsroot=phpgroupware&r1=1.3&r2=1.4

Patches:
Index: inc/class.bocalendar.inc.php
===================================================================
RCS file: /sources/phpgroupware/calendar/inc/class.bocalendar.inc.php,v
retrieving revision 1.120
retrieving revision 1.121
diff -u -b -r1.120 -r1.121
--- inc/class.bocalendar.inc.php        11 Dec 2006 20:50:40 -0000      1.120
+++ inc/class.bocalendar.inc.php        12 Dec 2006 15:19:11 -0000      1.121
@@ -12,7 +12,7 @@
   *  option) any later version.                                              *
   \**************************************************************************/
 
-       /* $Id: class.bocalendar.inc.php,v 1.120 2006/12/11 20:50:40 sigurdne 
Exp $ */
+       /* $Id: class.bocalendar.inc.php,v 1.121 2006/12/12 15:19:11 sigurdne 
Exp $ */
 
        class bocalendar
        {
@@ -172,13 +172,14 @@
 
                        if ( isset($_REQUEST['owner']) )
                        {
-                               $owner = (int) $_REQUEST['owner'];
+               //              $owner = (int) $_REQUEST['owner'];
+                               $owner = get_var('owner',array('GET','POST'));
                        }
                        else
                        {       
                                $owner = 
$this->contacts->is_contact($GLOBALS['phpgw_info']['user']['account_id']);
                        }
-
+//_debug_array($owner);
                        $referer = isset($_SERVER['HTTP_REFERER']) ? 
$_SERVER['HTTP_REFERER'] : '';
                        ereg('menuaction=([a-zA-Z.]+)', $referer, $regs);
                        $from = $regs[1];
@@ -189,8 +190,12 @@
                        {
                                // entering planner for the first time ==> 
saving owner in save_owner, setting owner to default
                                //
+       //                      $this->save_owner = $this->owner;
+       //                      $owner = 
'g_'.$this->prefs['calendar']['planner_start_with_group'];
+
+                               $owner = 'g_' . 
$this->prefs['calendar']['planner_start_with_group'];
+                               $this->owner = $owner;
                                $this->save_owner = $this->owner;
-                               $owner = 
'g_'.$this->prefs['calendar']['planner_start_with_group'];
                        }
                        else if ( isset($GLOBALS['phpgw_info']['menuaction'])
                                && $GLOBALS['phpgw_info']['menuaction'] != 
'calendar.uicalendar.planner'
@@ -1506,6 +1511,7 @@
 
                function get_long_status($status_short)
                {
+                       $status = '';
                        switch ($status_short)
                        {
                                case 'A':

Index: inc/class.uicalendar.inc.php
===================================================================
RCS file: /sources/phpgroupware/calendar/inc/class.uicalendar.inc.php,v
retrieving revision 1.144
retrieving revision 1.145
diff -u -b -r1.144 -r1.145
--- inc/class.uicalendar.inc.php        11 Dec 2006 20:47:58 -0000      1.144
+++ inc/class.uicalendar.inc.php        12 Dec 2006 15:19:11 -0000      1.145
@@ -12,7 +12,7 @@
   *  option) any later version.                                              *
   \**************************************************************************/
 
-       /* $Id: class.uicalendar.inc.php,v 1.144 2006/12/11 20:47:58 sigurdne 
Exp $ */
+       /* $Id: class.uicalendar.inc.php,v 1.145 2006/12/12 15:19:11 sigurdne 
Exp $ */
 
        class uicalendar
        {
@@ -1375,8 +1375,7 @@
                                }
                                else
                                {
-                                       $add_owner = array('owner' => 
$this->bo->save_owner);
-                                       _debug_array($add_owner);  echo 
"something wrong here? line:". __LINE__ . ' in ' . __FILE__ ;
+                                       $add_owner = array('owner' => 
(isset($this->bo->save_owner)&& 
$this->bo->save_owner?$this->bo->save_owner:$this->bo->contacts->is_contact($GLOBALS['phpgw_info']['user']['account_id'])));
                                }
                                
                                for ($d=1; $d<=$days; $d++)
@@ -1496,7 +1495,6 @@
 
                        // check how many lines are needed for this "row" 
(currently: user or category)
 
-                       $rows[$index.'_1']['._name'] = 
(isset($rows[$index.'_1']['._name'])?$rows[$index.'_1']['._name']:'');
                        $i = 0;
                        do {
                                ++$i;
@@ -1517,7 +1515,8 @@
                                        }
                                        $rows[$ka] = 0;
                                }
-                               $rows[$index.'_1']['._name'] .= ' nowrap'; // 
title must be one row
+                               $rows[$index.'_1']['._name'] = 
(isset($rows[$index.'_1']['._name']) && $rows[$index.'_1']['._name'] ? 
$rows[$index.'_1']['._name'] . ' nowrap': ' nowrap');
+//                             $rows[$index.'_1']['._name'] .= ' nowrap'; // 
title must be one row
 
                                $row = &$rows[$k];
                                $akt_cell = &$rows[$ka];
@@ -1732,7 +1731,6 @@
                                {
                                        $k  = $user_name.'_1';
                                        $ka = '.nr_'.$k;
-
                                        if (!isset($rows[$k]))
                                        {
                                                $rows[$k]['_name'] = $user_name;
@@ -2514,7 +2512,12 @@
                function link_to_entry($event,$month,$day,$year)
                {
                        $str = '';
-                       $is_private = !$event['public'] && 
!$this->bo->check_perms(PHPGW_ACL_READ,$event);
+                       $is_private = '';
+                       if(!$event['public']==1 || 
!$this->bo->check_perms(PHPGW_ACL_READ,$event))
+                       {
+                               $is_private = true;
+                       }
+               //      $is_private = !$event['public'] || 
!$this->bo->check_perms(PHPGW_ACL_READ,$event);
                        $editable = 
$this->bo->check_perms(PHPGW_ACL_READ,$event);
 
                        $starttime = $this->bo->maketime($event['start']) - 
$GLOBALS['phpgw']->datetime->tz_offset;
@@ -2556,7 +2559,7 @@
                                $time = '';
                        }
                        $text = '';
-                       if(!$is_private)
+                       if(!$is_private && isset($event['users_status']) && 
$event['users_status'])
                        {
                                $text .= 
$this->bo->display_status($event['users_status']);
                                $status_long = 
$this->bo->get_long_status($event['users_status']);
@@ -3231,7 +3234,7 @@
 
                function view_event($event,$alarms=False)
                {
-                       if((!$event['participants'][$this->bo->owner] && 
!$this->bo->check_perms(PHPGW_ACL_READ,$event)))
+                       if(((!isset($event['participants'][$this->bo->owner]) 
|| !$event['participants'][$this->bo->owner]) && 
!$this->bo->check_perms(PHPGW_ACL_READ,$event)))
                        {
                                return False;
                        }

Index: inc/hook_sidebox_menu.inc.php
===================================================================
RCS file: /sources/phpgroupware/calendar/inc/hook_sidebox_menu.inc.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -b -r1.5 -r1.6
--- inc/hook_sidebox_menu.inc.php       9 Sep 2006 10:38:51 -0000       1.5
+++ inc/hook_sidebox_menu.inc.php       12 Dec 2006 15:19:11 -0000      1.6
@@ -10,7 +10,7 @@
   *  option) any later version.                                              *
   \**************************************************************************/
 
-  /* $Id: hook_sidebox_menu.inc.php,v 1.5 2006/09/09 10:38:51 skwashd Exp $ */
+  /* $Id: hook_sidebox_menu.inc.php,v 1.6 2006/12/12 15:19:11 sigurdne Exp $ */
 {
 
  /*
@@ -73,7 +73,7 @@
                display_sidebox($appname,$menu_title,$file);
        }
 
-       if ($GLOBALS['phpgw_info']['user']['apps']['admin'])
+       if (isset($GLOBALS['phpgw_info']['user']['apps']['admin']) && 
$GLOBALS['phpgw_info']['user']['apps']['admin'])
        {
                $menu_title = lang('Administration');
                $file = Array(

Index: templates/base/header.inc.php
===================================================================
RCS file: /sources/phpgroupware/calendar/templates/base/header.inc.php,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -b -r1.3 -r1.4
--- templates/base/header.inc.php       11 Dec 2006 10:07:35 -0000      1.3
+++ templates/base/header.inc.php       12 Dec 2006 15:19:11 -0000      1.4
@@ -9,7 +9,7 @@
   *  option) any later version.                                              *
   \**************************************************************************/
 
-  /* $Id: header.inc.php,v 1.3 2006/12/11 10:07:35 sigurdne Exp $ */
+  /* $Id: header.inc.php,v 1.4 2006/12/12 15:19:11 sigurdne Exp $ */
 
        function add_col(&$tpl,$str)
        {
@@ -168,11 +168,13 @@
 
                
if((!isset($GLOBALS['phpgw_info']['server']['deny_user_grants_access']) || 
!$GLOBALS['phpgw_info']['server']['deny_user_grants_access']) && 
count($this->bo->grants) > 0)
                {
+                       $grantor = (isset($this->bo->is_group) && 
$this->bo->is_group ? 'g_'.$this->bo->owner : $this->bo->owner);
                        $form_options = '';
                        $drop_down = $this->bo->list_cals();
                        foreach($drop_down as $key => $grant)
                        {
-                               $form_options .= '    <option 
value="'.$grant['value'].'"'.($grant['grantor']==$this->bo->owner?' 
selected':'').'>'.$grant['name'].'</option>'."\n";
+
+                               $form_options .= '    <option 
value="'.$grant['value'].'"'.($grant['value']==$grantor?' 
selected':'').'>'.$grant['name'].'</option>'."\n";
                        }
                
                        $var = Array(




reply via email to

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