[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] CVS: property/inc class.acl2.inc.php,1.2,1.3
From: |
Sigurd Nes <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: property/inc class.acl2.inc.php,1.2,1.3 |
Date: |
Sun, 09 Mar 2003 12:39:40 -0500 |
Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv10902/inc
Modified Files:
class.acl2.inc.php
Log Message:
no message
Index: class.acl2.inc.php
===================================================================
RCS file: /cvsroot/phpgroupware/property/inc/class.acl2.inc.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** class.acl2.inc.php 8 Mar 2003 22:23:15 -0000 1.2
--- class.acl2.inc.php 9 Mar 2003 17:39:37 -0000 1.3
***************
*** 39,43 ****
$args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
! $sql = "SELECT acl_location,acl_rights FROM phpgw_acl2
WHERE (
acl_host='".$this->host_id."' and acl_appid = 0 and acl_account =
".$args['account_id'].")";
$this->db->query($sql,__LINE__,__FILE__);
--- 39,43 ----
$args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
! $sql = "SELECT acl_location,acl_rights FROM fm_acl2
WHERE (
acl_host='".$this->host_id."' and acl_appid = 0 and acl_account =
".$args['account_id'].")";
$this->db->query($sql,__LINE__,__FILE__);
***************
*** 69,73 ****
}
! $sql = "SELECT
acl_rights,acl_type,acl_data,acl_location FROM phpgw_acl2 WHERE (acl_appid =
'".$args['app_id']."' ";
$sql .= " and (acl_account in
(".$args['account_id'].",".$this->memberships_sql.'))';
$sql .= " and
(".$this->get_location_list($args['location'],$args['app_id'],$args['account_id']).")";
--- 69,73 ----
}
! $sql = "SELECT
acl_rights,acl_type,acl_data,acl_location FROM fm_acl2 WHERE (acl_appid =
'".$args['app_id']."' ";
$sql .= " and (acl_account in
(".$args['account_id'].",".$this->memberships_sql.'))';
$sql .= " and
(".$this->get_location_list($args['location'],$args['app_id'],$args['account_id']).")";
***************
*** 193,204 ****
$expected_args[0] =
Array('name'=>'location','default'=>'##REQUIRED##', 'type'=>'alphanumeric');
$expected_args[1] =
Array('name'=>'rights','default'=>1, 'type'=>'number');
! $expected_args[2] = Array('name'=>'type','default'=>0,
'type'=>'number');
! $expected_args[3] =
Array('name'=>'app_id','default'=>$this->app_id, 'type'=>'number');
! $expected_args[4] =
Array('name'=>'data','default'=>NULL, 'type'=>'any');
$recieved_args = func_get_args();
$args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
! $sql = "SELECT acl_rights FROM phpgw_acl2 WHERE
(acl_appid = '".$args['app_id']."' ";
! $sql .= " and acl_account = ".$this->account_id;
$sql .= " and acl_location = '".$args['location']."'
and acl_type=".$args['type'].")";
$this->db->query($sql,__LINE__,__FILE__);
--- 193,205 ----
$expected_args[0] =
Array('name'=>'location','default'=>'##REQUIRED##', 'type'=>'alphanumeric');
$expected_args[1] =
Array('name'=>'rights','default'=>1, 'type'=>'number');
! $expected_args[2] =
Array('name'=>'account_id','default'=>$this->account_id, 'type'=>'number');
! $expected_args[3] = Array('name'=>'type','default'=>0,
'type'=>'number');
! $expected_args[4] =
Array('name'=>'app_id','default'=>$this->app_id, 'type'=>'number');
! $expected_args[5] =
Array('name'=>'data','default'=>NULL, 'type'=>'any');
$recieved_args = func_get_args();
$args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
! $sql = "SELECT acl_rights FROM fm_acl2 WHERE (acl_appid
= '".$args['app_id']."' ";
! $sql .= " and acl_account = ".$args['account_id'];
$sql .= " and acl_location = '".$args['location']."'
and acl_type=".$args['type'].")";
$this->db->query($sql,__LINE__,__FILE__);
***************
*** 207,216 ****
$this->db->next_record();
$newrights = $this->bit_set($args['rights'],
(int)$this->db->f('acl_rights'));
! $sql = "UPDATE phpgw_acl2 SET acl_rights
=".$newrights;
! $sql .= " WHERE acl_host=".$this->host_id." AND
acl_appid=".$args['app_id']." AND acl_account=".$this->account_id." AND
acl_location='".$args['location']."' AND acl_type=".$args['type'];
}
else
{
! $sql = "INSERT INTO phpgw_acl2
(acl_host,acl_appid,acl_account,acl_location,acl_rights,acl_type,acl_data)
VALUES
(".$this->host_id.",".$args['app_id'].",".$this->account_id.",'".$args['location']."',".$args['rights'].",".$args['type'].",'".$args['data']."')";
}
$this->db->query($sql,__LINE__,__FILE__);
--- 208,217 ----
$this->db->next_record();
$newrights = $this->bit_set($args['rights'],
(int)$this->db->f('acl_rights'));
! $sql = "UPDATE fm_acl2 SET acl_rights
=".$newrights;
! $sql .= " WHERE acl_host=".$this->host_id." AND
acl_appid=".$args['app_id']." AND acl_account=".$args['account_id']." AND
acl_location='".$args['location']."' AND acl_type=".$args['type'];
}
else
{
! $sql = "INSERT INTO fm_acl2
(acl_host,acl_appid,acl_account,acl_location,acl_rights,acl_type,acl_data)
VALUES
(".$this->host_id.",".$args['app_id'].",".$args['account_id'].",'".$args['location']."',".$args['rights'].",".$args['type'].",'".$args['data']."')";
}
$this->db->query($sql,__LINE__,__FILE__);
***************
*** 230,234 ****
$args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
! $sql = "SELECT acl_rights FROM phpgw_acl2 WHERE
(acl_appid = '".$args['app_id']."' ";
$sql .= " and acl_account = ".$args['account_id'];
$sql .= " and acl_location = '".$args['location']."'
and acl_type=".$args['type'].")";
--- 231,235 ----
$args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
! $sql = "SELECT acl_rights FROM fm_acl2 WHERE (acl_appid
= '".$args['app_id']."' ";
$sql .= " and acl_account = ".$args['account_id'];
$sql .= " and acl_location = '".$args['location']."'
and acl_type=".$args['type'].")";
***************
*** 238,246 ****
if((int)$args['rights'] == 0)
{
! $sql = "DELETE FROM phpgw_acl2";
}
else
{
! $sql = "UPDATE phpgw_acl2 SET
acl_rights =".$args['rights'];
}
$sql .= " WHERE acl_host=".$this->host_id." AND
acl_appid=".$args['app_id']." AND acl_account=".$args['account_id']." AND
acl_location='".$args['location']."' AND acl_type=".$args['type'];
--- 239,247 ----
if((int)$args['rights'] == 0)
{
! $sql = "DELETE FROM fm_acl2";
}
else
{
! $sql = "UPDATE fm_acl2 SET acl_rights
=".$args['rights'];
}
$sql .= " WHERE acl_host=".$this->host_id." AND
acl_appid=".$args['app_id']." AND acl_account=".$args['account_id']." AND
acl_location='".$args['location']."' AND acl_type=".$args['type'];
***************
*** 251,255 ****
if($args['rights'] != 0)
{
! $sql = "INSERT INTO phpgw_acl2
(acl_host,acl_appid,acl_account,acl_location,acl_rights,acl_type,acl_data)
VALUES
(".$this->host_id.",".$args['app_id'].",".$args['account_id'].",'".$args['location']."',".$args['rights'].",".$args['type'].",'".$args['data']."')";
$this->db->query($sql,__LINE__,__FILE__);
}
--- 252,256 ----
if($args['rights'] != 0)
{
! $sql = "INSERT INTO fm_acl2
(acl_host,acl_appid,acl_account,acl_location,acl_rights,acl_type,acl_data)
VALUES
(".$this->host_id.",".$args['app_id'].",".$args['account_id'].",'".$args['location']."',".$args['rights'].",".$args['type'].",'".$args['data']."')";
$this->db->query($sql,__LINE__,__FILE__);
}
***************
*** 270,274 ****
$args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
! $sql = "SELECT acl_rights FROM phpgw_acl2 WHERE
(acl_appid = '".$args['app_id']."' ";
$sql .= " and acl_account = ".$args['account_id'];
$sql .= " and acl_location = '".$args['location']."'
and acl_type=".$args['type'].")";
--- 271,275 ----
$args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
! $sql = "SELECT acl_rights FROM fm_acl2 WHERE (acl_appid
= '".$args['app_id']."' ";
$sql .= " and acl_account = ".$args['account_id'];
$sql .= " and acl_location = '".$args['location']."'
and acl_type=".$args['type'].")";
***************
*** 283,291 ****
if ($newrights != 0)
{
! $sql = "UPDATE phpgw_acl2 SET
acl_rights =".$newrights;
}
else
{
! $sql = "DELETE FROM phpgw_acl2";
}
$sql .= " WHERE acl_host=".$this->host_id." AND
acl_appid=".$args['app_id']." AND acl_account=".$args['account_id']." AND
acl_location='".$args['location']."' AND acl_type=".$args['type'];
--- 284,292 ----
if ($newrights != 0)
{
! $sql = "UPDATE fm_acl2 SET acl_rights
=".$newrights;
}
else
{
! $sql = "DELETE FROM fm_acl2";
}
$sql .= " WHERE acl_host=".$this->host_id." AND
acl_appid=".$args['app_id']." AND acl_account=".$args['account_id']." AND
acl_location='".$args['location']."' AND acl_type=".$args['type'];
***************
*** 308,312 ****
$args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
! $sql = "SELECT acl_rights,acl_type,acl_data FROM
phpgw_acl2 WHERE (acl_appid = '".$args['app_id']."' ";
$sql .= " and acl_account = ".$args['account_id'];
$sql .= " and acl_location = '".$args['location']."'
and acl_type=0)";
--- 309,313 ----
$args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
! $sql = "SELECT acl_rights,acl_type,acl_data FROM
fm_acl2 WHERE (acl_appid = '".$args['app_id']."' ";
$sql .= " and acl_account = ".$args['account_id'];
$sql .= " and acl_location = '".$args['location']."'
and acl_type=0)";
***************
*** 329,333 ****
$args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
! $sql = "SELECT acl_rights,acl_type,acl_data FROM
phpgw_acl2 WHERE (acl_appid = '".$args['app_id']."' ";
$sql .= " and (acl_account in
(".$this->account_id.",".$this->memberships_sql.'))';
$sql .= " and acl_location = '".$args['location']."'
and acl_type=0)";
--- 330,334 ----
$args = safe_args($expected_args,
$recieved_args,__LINE__,__FILE__);
! $sql = "SELECT acl_rights,acl_type,acl_data FROM
fm_acl2 WHERE (acl_appid = '".$args['app_id']."' ";
$sql .= " and (acl_account in
(".$this->account_id.",".$this->memberships_sql.'))';
$sql .= " and acl_location = '".$args['location']."'
and acl_type=0)";
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: property/inc class.acl2.inc.php,1.2,1.3,
Sigurd Nes <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: email addressbook.php,1.32.2.5,1.32.2.6
- Next by Date:
[Phpgroupware-cvs] CVS: property/setup setup.inc.php,1.23,1.24 tables_current.inc.php,1.41,1.42
- Previous by thread:
[Phpgroupware-cvs] CVS: email addressbook.php,1.32.2.5,1.32.2.6
- Next by thread:
[Phpgroupware-cvs] CVS: property/setup setup.inc.php,1.23,1.24 tables_current.inc.php,1.41,1.42
- Index(es):