phpgroupware-cvs
[Top][All Lists]
Advanced

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

[Phpgroupware-cvs] phpgwapi/inc class.acl.inc.php


From: Dave Hall
Subject: [Phpgroupware-cvs] phpgwapi/inc class.acl.inc.php
Date: Tue, 29 Aug 2006 08:17:28 +0000

CVSROOT:        /cvsroot/phpgwapi
Module name:    phpgwapi
Changes by:     Dave Hall <skwashd>     06/08/29 08:17:28

Modified files:
        inc            : class.acl.inc.php 

Log message:
        E_NOTICES - undefined indicies

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/class.acl.inc.php?cvsroot=phpgwapi&r1=1.83&r2=1.84

Patches:
Index: class.acl.inc.php
===================================================================
RCS file: /cvsroot/phpgwapi/phpgwapi/inc/class.acl.inc.php,v
retrieving revision 1.83
retrieving revision 1.84
diff -u -b -r1.83 -r1.84
--- class.acl.inc.php   19 Aug 2006 11:57:48 -0000      1.83
+++ class.acl.inc.php   29 Aug 2006 08:17:28 -0000      1.84
@@ -6,7 +6,7 @@
        * @license http://www.gnu.org/licenses/lgpl.html GNU Lesser General 
Public License
        * @package phpgwapi
        * @subpackage accounts
-       * @version $Id: class.acl.inc.php,v 1.83 2006/08/19 11:57:48 skwashd 
Exp $
+       * @version $Id: class.acl.inc.php,v 1.84 2006/08/29 08:17:28 skwashd 
Exp $
        */
 
        /**
@@ -858,11 +858,14 @@
                */
                function get_grants_type($app='',$location='',$type = '')
                {
+                       $grants = array();
+                       
                        if (!$app)
                        {
                                $app = 
$GLOBALS['phpgw_info']['flags']['currentapp'];
                        }
 
+                       $at_location = '';
                        if ($location)
                        {
                                $location = $this->db->db_addslashes($location);
@@ -890,6 +893,7 @@
                                
$grants[$GLOBALS['phpgw_info']['user']['account_id']] = 31;
                                return $grants;
                        }
+
                        while ($this->db->next_record())
                        {
                                $grantor = $this->db->f('acl_grantor');
@@ -933,14 +937,18 @@
                                }
                                reset($accounts[$grantor]);
                        }
-                       if($type==0)
+
+                       if ( $type == 0 )
                        {
                        $grants[$GLOBALS['phpgw_info']['user']['account_id']] = 
31;
                        }
                        else
                        {
+                               if ( 
isset($grants[$GLOBALS['phpgw_info']['user']['account_id']]) )
+                               {
                                unset 
($grants[$GLOBALS['phpgw_info']['user']['account_id']]);
                        }
+                       }
 
                        return $grants;
                }




reply via email to

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