[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: |
Sat, 15 Apr 2006 12:14:11 +0000 |
CVSROOT: /sources/phpgwapi
Module name: phpgwapi
Branch:
Changes by: Sigurd Nes <address@hidden> 06/04/15 12:14:11
Modified files:
inc : class.acl.inc.php
Log message:
fix join statement
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/phpgwapi/phpgwapi/inc/class.acl.inc.php.diff?tr1=1.73&tr2=1.74&r1=text&r2=text
Patches:
Index: phpgwapi/inc/class.acl.inc.php
diff -u phpgwapi/inc/class.acl.inc.php:1.73 phpgwapi/inc/class.acl.inc.php:1.74
--- phpgwapi/inc/class.acl.inc.php:1.73 Tue Mar 21 12:56:47 2006
+++ phpgwapi/inc/class.acl.inc.php Sat Apr 15 12:14:10 2006
@@ -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.73 2006/03/21 12:56:47 sigurdne
Exp $
+ * @version $Id: class.acl.inc.php,v 1.74 2006/04/15 12:14:10 sigurdne
Exp $
*/
/**
@@ -62,6 +62,9 @@
$this->db->User =
$GLOBALS['phpgw_info']['server']['db_user'];
$this->db->Password =
$GLOBALS['phpgw_info']['server']['db_pass'];
+ $this->like = $this->db->like;
+ $this->join = $this->db->join;
+
$this->db2 = CreateObject('phpgwapi.db');
$this->db2->Host =
$GLOBALS['phpgw_info']['server']['db_host'];
$this->db2->Type =
$GLOBALS['phpgw_info']['server']['db_type'];
@@ -139,7 +142,7 @@
$this->acl();
}
- $sql = 'select * from phpgw_acl join phpgw_accounts on
phpgw_acl.acl_account = phpgw_accounts.account_id where (acl_account in (';
+ $sql = "select * from phpgw_acl $this->join
phpgw_accounts on phpgw_acl.acl_account = phpgw_accounts.account_id where
(acl_account in (";
if(!$account_type || $account_type == 'accounts' ||
$account_type == 'both')
{
@@ -267,7 +270,7 @@
{
if(is_array($this->data[$idx]))
{
- $sql = "SELECT id as location FROM
phpgw_acl_location WHERE id like '".$this->data[$idx]['location']."%' AND
appname='" . $this->data[$idx]['appname'] . "' AND id !=
'".$this->data[$idx]['location'] . "'";
+ $sql = "SELECT id as location FROM
phpgw_acl_location WHERE id $this->like '".$this->data[$idx]['location']."%'
AND appname='" . $this->data[$idx]['appname'] . "' AND id !=
'".$this->data[$idx]['location'] . "'";
$this->db->query($sql,__LINE__,__FILE__);
while($this->db->next_record())
{
@@ -599,7 +602,7 @@
$inherit_location[] = $location; // in case the
location is not found in the location table
- $sql = "SELECT id as location FROM phpgw_acl_location
WHERE id like '".$location."%' AND appname='" . $app . "' AND id != '"
.$location . "'";
+ $sql = "SELECT id as location FROM phpgw_acl_location
WHERE id $this->like '".$location."%' AND appname='" . $app . "' AND id != '"
.$location . "'";
$this->db->query($sql,__LINE__,__FILE__);
while($this->db->next_record())
{
@@ -642,7 +645,7 @@
$account_sel = ' and acl_account=' .
$account_id;
}
- $sql = "delete from phpgw_acl where acl_appname like '"
. $app . "' and acl_location like '" . $location . "%'" . $account_sel;
+ $sql = "delete from phpgw_acl where acl_appname
$this->like '" . $app . "' and acl_location $this->like '" . $location . "%'" .
$account_sel;
$this->db->query($sql ,__LINE__,__FILE__);
return $this->db->num_rows();
}
- [Phpgroupware-cvs] phpgwapi/inc class.acl.inc.php,
Sigurd Nes <=