forked from extern/egroupware
various little cleanups
This commit is contained in:
parent
8bc405905d
commit
1222384e5d
@ -95,7 +95,7 @@
|
|||||||
// User piece
|
// User piece
|
||||||
$sql = "select acl_rights from phpgw_acl where acl_appname='$appname'";
|
$sql = "select acl_rights from phpgw_acl where acl_appname='$appname'";
|
||||||
$sql .= " and acl_location = '$location' and ";
|
$sql .= " and acl_location = '$location' and ";
|
||||||
$sql .= "acl_account_type = ".$id_type." and acl_account = ".$id;
|
$sql .= "acl_account_type = '".$id_type."' and acl_account = ".$id;
|
||||||
$this->db->query($sql ,__LINE__,__FILE__);
|
$this->db->query($sql ,__LINE__,__FILE__);
|
||||||
$rights = 0;
|
$rights = 0;
|
||||||
if ($this->db->num_rows() == 0 && $phpgw_info["server"]["acl_default"] != "deny"){ return True; }
|
if ($this->db->num_rows() == 0 && $phpgw_info["server"]["acl_default"] != "deny"){ return True; }
|
||||||
@ -120,11 +120,11 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
function delete($app, $location, $id, $id_type){
|
function delete($app, $location, $id, $id_type){
|
||||||
$sql = "delete from phpgw_acl where acl_appname like '".$app."'";
|
$sql = "delete from phpgw_acl where acl_appname like '".$app."'"
|
||||||
$sql .= " and acl_location like '".$location."' and ";
|
. " and acl_location like '".$location."' and "
|
||||||
$sql .= " acl_account_type = '".$id_type."' and acl_account = ".$id;
|
. " acl_account_type = '".$id_type."' and acl_account = ".$id;
|
||||||
$this->db->query($sql ,__LINE__,__FILE__);
|
$this->db->query($sql ,__LINE__,__FILE__);
|
||||||
return True;
|
return $this->db->num_rows();
|
||||||
}
|
}
|
||||||
|
|
||||||
function replace($app, $location, $id, $id_type, $rights){
|
function replace($app, $location, $id, $id_type, $rights){
|
||||||
@ -146,8 +146,6 @@
|
|||||||
$rights |= $this->db->f("acl_rights");
|
$rights |= $this->db->f("acl_rights");
|
||||||
if (!!($rights & $required) == True){
|
if (!!($rights & $required) == True){
|
||||||
$apps[] = $this->db->f("acl_appname");
|
$apps[] = $this->db->f("acl_appname");
|
||||||
}else{
|
|
||||||
return False;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return $apps;
|
return $apps;
|
||||||
|
Loading…
Reference in New Issue
Block a user