[Top][All Lists]
[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: |
Sun, 09 Jul 2006 14:26:39 +0000 |
CVSROOT: /cvsroot/phpgwapi
Module name: phpgwapi
Changes by: Dave Hall <skwashd> 06/07/09 14:26:39
Modified files:
inc : class.acl.inc.php
Log message:
attempt to fix call to non existant accounts::security_equals()
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/inc/class.acl.inc.php?cvsroot=phpgwapi&r1=1.79&r2=1.80
Patches:
Index: class.acl.inc.php
===================================================================
RCS file: /cvsroot/phpgwapi/phpgwapi/inc/class.acl.inc.php,v
retrieving revision 1.79
retrieving revision 1.80
diff -u -b -r1.79 -r1.80
--- class.acl.inc.php 6 Jul 2006 08:41:15 -0000 1.79
+++ class.acl.inc.php 9 Jul 2006 14:26:39 -0000 1.80
@@ -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.79 2006/07/06 08:41:15 sigurdne
Exp $
+ * @version $Id: class.acl.inc.php,v 1.80 2006/07/09 14:26:39 skwashd
Exp $
*/
/**
@@ -577,17 +577,18 @@
function get_location_list($app, $required)
{
// User piece
- $sql = "select acl_location, acl_rights from phpgw_acl
where acl_appname = '$app' ";
- $sql .= " and (acl_account in ('".$this->account_id."',
0"; // group 0 covers all users
- $equalto =
$GLOBALS['phpgw']->accounts->security_equals($this->account_id);
+ $sql = "SELECT acl_location, acl_rights FROM phpgw_acl
WHERE acl_appname = '$app' ";
+ $sql .= " AND acl_account IN({$this->account_id}, 0";
// group 0 covers all users
+
+ $equalto =
$GLOBALS['phpgw']->accounts->membership($this->account_id);
if (is_array($equalto) && count($equalto) > 0)
{
- for ($idx = 0; $idx < count($equalto); ++$idx)
+ foreach ( $equalto as $group )
{
- $sql .= ','.$equalto[$idx][0];
+ $sql .= ", {$group['account_id']}";
}
}
- $sql .= ')))';
+ $sql .= ')';
$this->db->query($sql ,__LINE__,__FILE__);
$rights = 0;