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: Mon, 18 Dec 2006 01:06:03 +0000

CVSROOT:        /sources/phpgwapi
Module name:    phpgwapi
Changes by:     Dave Hall <skwashd>     06/12/18 01:06:03

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

Log message:
        change return type for get_locations_list so it is consistent

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

Patches:
Index: class.acl.inc.php
===================================================================
RCS file: /sources/phpgwapi/phpgwapi/inc/class.acl.inc.php,v
retrieving revision 1.102
retrieving revision 1.103
diff -u -b -r1.102 -r1.103
--- class.acl.inc.php   27 Nov 2006 18:03:24 -0000      1.102
+++ class.acl.inc.php   18 Dec 2006 01:06:02 -0000      1.103
@@ -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.102 2006/11/27 18:03:24 sigurdne 
Exp $
+       * @version $Id: class.acl.inc.php,v 1.103 2006/12/18 01:06:02 skwashd 
Exp $
        */
 
        /**
@@ -685,11 +685,9 @@
                /**
                * Get location list for an application with specific access 
rights
                *
-               * @internal imho the return on this should be an empty array 
for no rights to keep the return type consistent - skwashd nov2006
-               *
                * @param $app Application name
                * @param integer $required Required rights as bitmap
-               * @return boolean|array Array with location list or false
+               * @return array list of locations or empty array for none
                */
                function get_location_list($app, $required)
                {
@@ -704,12 +702,13 @@
                                }
                        }
 
+                       $locations = array();
                        $sql = "SELECT acl_location, acl_rights FROM phpgw_acl 
WHERE acl_appname = '$app' AND acl_account IN(" . implode(',', $acct_ids) . 
')'; 
                        $this->db->query($sql ,__LINE__,__FILE__);
                        $rights = 0;
                        if ($this->db->num_rows() == 0 )
                        {
-                               return False;
+                               return $locations;
                        }
                        while ($this->db->next_record())
                        {




reply via email to

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