CVSROOT: /sources/phpgroupware Module name: ged Changes by: Pascal Vilarem <maat> 07/11/12 16:20:05
Modified files: inc : class.ged_dm.inc.php Log message: fixed : bug in acl when statuses is empty CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/ged/inc/class.ged_dm.inc.php?cvsroot=phpgroupware&r1=1.57&r2=1.58 Patches: Index: class.ged_dm.inc.php =================================================================== RCS file: /sources/phpgroupware/ged/inc/class.ged_dm.inc.php,v retrieving revision 1.57 retrieving revision 1.58 diff -u -b -r1.57 -r1.58 --- class.ged_dm.inc.php 9 Nov 2007 15:40:08 -0000 1.57 +++ class.ged_dm.inc.php 12 Nov 2007 16:20:04 -0000 1.58 @@ -106,7 +106,7 @@ $this->acl[$the_id]['changeacl']=$this->db->f('aclchangeacl'); $the_statuses=$this->db->f('aclstatuses'); - if ($the_statuses != "" ) + if ( ! empty ( $the_statuses ) ) { $this->acl[$the_id]['statuses']=unserialize($the_statuses); } @@ -802,7 +802,7 @@ if ( ! $this->can_read($element_id)) die("argh"); - if ( isset($this->acl[$element_id]['statuses']) && is_array($this->acl[$element_id]['statuses'])) + if ( isset($this->acl[$element_id]['statuses']) && ! empty( $this->acl[$element_id]['statuses'] ) && is_array($this->acl[$element_id]['statuses'])) { $or=''; $sqlstatuses="AND ("; @@ -862,7 +862,7 @@ if ( ! $this->can_read($element_id)) die("argh"); - if ( isset($this->acl[$element_id]['statuses']) && is_array($this->acl[$element_id]['statuses'])) + if ( isset($this->acl[$element_id]['statuses']) && ! empty( $this->acl[$element_id]['statuses'] ) && is_array($this->acl[$element_id]['statuses'])) { $or=''; $sqlstatuses="AND ("; @@ -1654,7 +1654,7 @@ //DEBUG //_debug_array($the_version_statuses); - if ( isset($this->acl[$the_element_id]['statuses']) && is_array($this->acl[$the_element_id]['statuses'])) + if ( isset($this->acl[$the_element_id]['statuses']) && ! empty( $this->acl[$the_element_id]['statuses'] ) && is_array($this->acl[$the_element_id]['statuses'])) { foreach ( $this->acl[$the_element_id]['statuses'] as $granted_status) { @@ -1890,7 +1890,7 @@ $acl[$account_id]['write']=$this->db->f('aclwrite'); $acl[$account_id]['delete']=$this->db->f('acldelete'); $statuses=$this->db->f('aclstatuses'); - if ( $statuses != "") + if ( ! empty($statuses) ) { $acl[$account_id]['statuses']=unserialize($statuses); } @@ -1925,7 +1925,7 @@ $acl_info['write']=$this->db->f('aclwrite'); $acl_info['delete']=$this->db->f('acldelete'); $statuses=$this->db->f('aclstatuses'); - if ( $statuses != "") + if ( ! empty($statuses) ) { $acl_info['statuses']=unserialize($statuses); } _______________________________________________ phpGroupWare-cvs mailing list phpGroupWare-cvs@gnu.org http://lists.gnu.org/mailman/listinfo/phpgroupware-cvs