[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] phpgwapi/inc class.acl.inc.php
From: |
Sigurd Nes |
Subject: |
[Phpgroupware-cvs] phpgwapi/inc class.acl.inc.php |
Date: |
Thu, 06 Jul 2006 08:41:15 +0000 |
CVSROOT: /sources/phpgwapi
Module name: phpgwapi
Changes by: Sigurd Nes <sigurdne> 06/07/06 08:41:15
Modified files:
inc : class.acl.inc.php
Log message:
get_ids_for_location is inside a db-loop
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/class.acl.inc.php?cvsroot=phpgwapi&r1=1.78&r2=1.79
Patches:
Index: class.acl.inc.php
===================================================================
RCS file: /sources/phpgwapi/phpgwapi/inc/class.acl.inc.php,v
retrieving revision 1.78
retrieving revision 1.79
diff -u -b -r1.78 -r1.79
--- class.acl.inc.php 3 Jul 2006 10:59:19 -0000 1.78
+++ class.acl.inc.php 6 Jul 2006 08:41:15 -0000 1.79
@@ -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.78 2006/07/03 10:59:19 sigurdne
Exp $
+ * @version $Id: class.acl.inc.php,v 1.79 2006/07/06 08:41:15 sigurdne
Exp $
*/
/**
@@ -55,6 +55,7 @@
function acl($account_id = '')
{
$this->db =& $GLOBALS['phpgw']->db;
+ $this->db2 = clone($this->db);
$this->like = $this->db->like;
$this->join = $this->db->join;
@@ -788,19 +789,19 @@
}
$sql = "select acl_account, acl_rights from phpgw_acl
where acl_appname = '$app' and ";
$sql .= "acl_location = '".$location."'";
- $this->db->query($sql ,__LINE__,__FILE__);
+ $this->db2->query($sql ,__LINE__,__FILE__);
$rights = 0;
- if ($this->db->num_rows() == 0 )
+ if ($this->db2->num_rows() == 0 )
{
return False;
}
- while ($this->db->next_record())
+ while ($this->db2->next_record())
{
$rights = 0;
- $rights |= $this->db->f('acl_rights');
+ $rights |= $this->db2->f('acl_rights');
if (!!($rights & $required) == True)
{
- $accounts[] =
intval($this->db->f('acl_account'));
+ $accounts[] =
intval($this->db2->f('acl_account'));
}
}
@reset($accounts);
@@ -862,7 +863,6 @@
function get_grants($app='',$location='')
{
-
$grant_rights =
$this->get_grants_type($app,$location,0);
$grant_mask = $this->get_grants_type($app,$location,1);
if(is_array($grant_mask))
@@ -930,7 +930,6 @@
{
// if $grantor is a group, get its
members
$members =
$this->get_ids_for_location($grantor,1,'phpgw_group');
-
if(!$members)
{
$accounts[$grantor] =
array($grantor);