[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.9,1.10
From: |
Sigurd Nes <address@hidden> |
Subject: |
[Phpgroupware-cvs] CVS: property/inc class.acl2.inc.php,1.9,1.10 |
Date: |
Mon, 14 Jul 2003 04:52:01 -0400 |
Update of /cvsroot/phpgroupware/property/inc
In directory subversions:/tmp/cvs-serv21010/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.9
retrieving revision 1.10
diff -C2 -r1.9 -r1.10
*** class.acl2.inc.php 11 Jul 2003 11:03:53 -0000 1.9
--- class.acl2.inc.php 14 Jul 2003 08:51:56 -0000 1.10
***************
*** 273,277 ****
}
! function set()
{
$expected_args[0] =
Array('name'=>'location','default'=>'##REQUIRED##', 'type'=>'alphanumeric');
--- 273,277 ----
}
! function set_org() // no inheritance saved to the database
{
$expected_args[0] =
Array('name'=>'location','default'=>'##REQUIRED##', 'type'=>'alphanumeric');
***************
*** 354,358 ****
}
! function set_test() //rights_cache are making false inheritance
(not inheriting from parent before one child is defined)
{
$expected_args[0] =
Array('name'=>'location','default'=>'##REQUIRED##', 'type'=>'alphanumeric');
--- 354,358 ----
}
! function set() //inheritance is saved to the database
{
$expected_args[0] =
Array('name'=>'location','default'=>'##REQUIRED##', 'type'=>'alphanumeric');
***************
*** 395,427 ****
{
$add_locations = array_diff($add_locations,
$updated_locations);
-
-
}
if(is_array($add_locations) && count($add_locations)>0)
{
- $add_locations= explode("_",implode("_",
$add_locations));
- //_debug_array($add_locations);
for ($i=0;$i<count($add_locations);$i++)
{
- if($args['rights'] != 0)
- {
- $sql = "SELECT acl_rights FROM
fm_acl2 WHERE (acl_appid = '".$args['app_id']."' ";
- $sql .= " and acl_account =
".$args['account_id'];
- $sql .= " and acl_location =
'".$add_locations[$i]."' and acl_type=".$args['type'].")";
-
$this->db->query($sql,__LINE__,__FILE__);
! if($this->db->num_rows() == 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'].",'".$add_locations[$i]."',".$args['rights'].",".$args['type'].",'".$args['data']."')";
!
$this->db2->query($sql,__LINE__,__FILE__);
! }
! 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='".$add_locations[$i]."'
AND acl_type=".$args['type'];
!
$this->db2->query($sql,__LINE__,__FILE__);
}
}
}
}
--- 395,437 ----
{
$add_locations = array_diff($add_locations,
$updated_locations);
}
+ $add_locations =
explode("-",implode("-",$add_locations));
+ //_debug_array($add_locations);
if(is_array($add_locations) && count($add_locations)>0)
{
for ($i=0;$i<count($add_locations);$i++)
{
! for ($j=0;$j<($i+1);$j++)
! {
! $location
=$add_locations[$j];
! }
! //_debug_array($location);
!
if(strlen($location)>=strlen($args['location']))
! {
! if($args['rights'] != 0)
{
! $sql = "SELECT
acl_rights FROM fm_acl2 WHERE (acl_appid = '".$args['app_id']."' ";
! $sql .= " and
acl_account = ".$args['account_id'];
! $sql .= " and
acl_location = '$location' and acl_type=".$args['type'].")";
!
$this->db->query($sql,__LINE__,__FILE__);
!
! //echo $sql;
!
if($this->db->num_rows() == 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'].",'".$location."',".$args['rights'].",".$args['type'].",'".$args['data']."')";
!
!
$this->db2->query($sql,__LINE__,__FILE__);
! }
! 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='".$location."' AND
acl_type=".$args['type'];
!
$this->db2->query($sql,__LINE__,__FILE__);
! }
}
}
+ unset($location);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] CVS: property/inc class.acl2.inc.php,1.9,1.10,
Sigurd Nes <address@hidden> <=
- Prev by Date:
[Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php, 1.71.2.36, 1.71.2.37 class.uicalendar.inc.php, 1.66.2.58, 1.66.2.59
- Next by Date:
[Phpgroupware-cvs] CVS: property/setup default_records.inc.php, 1.28, 1.29
- Previous by thread:
[Phpgroupware-cvs] CVS: calendar/inc class.bocalendar.inc.php, 1.71.2.36, 1.71.2.37 class.uicalendar.inc.php, 1.66.2.58, 1.66.2.59
- Next by thread:
[Phpgroupware-cvs] CVS: property/setup default_records.inc.php, 1.28, 1.29
- Index(es):