[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] ged/inc class.ged_dm.inc.php
From: |
Pascal Vilarem |
Subject: |
[Phpgroupware-cvs] ged/inc class.ged_dm.inc.php |
Date: |
Mon, 19 Nov 2007 11:11:15 +0000 |
CVSROOT: /sources/phpgroupware
Module name: ged
Changes by: Pascal Vilarem <maat> 07/11/19 11:11:15
Modified files:
inc : class.ged_dm.inc.php
Log message:
tiny fixes for home board display
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ged/inc/class.ged_dm.inc.php?cvsroot=phpgroupware&r1=1.58&r2=1.59
Patches:
Index: class.ged_dm.inc.php
===================================================================
RCS file: /sources/phpgroupware/ged/inc/class.ged_dm.inc.php,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -b -r1.58 -r1.59
--- class.ged_dm.inc.php 12 Nov 2007 16:20:04 -0000 1.58
+++ class.ged_dm.inc.php 19 Nov 2007 11:11:15 -0000 1.59
@@ -800,7 +800,7 @@
print ( "get_last_version: entering with
element_id=".$element_id."<br>\n");
if ( ! $this->can_read($element_id))
- die("argh");
+ die("argh 1");
if ( isset($this->acl[$element_id]['statuses']) && ! empty(
$this->acl[$element_id]['statuses'] ) &&
is_array($this->acl[$element_id]['statuses']))
{
@@ -860,7 +860,7 @@
print ( "get_last_version: entering with
element_id=".$element_id."<br>\n");
if ( ! $this->can_read($element_id))
- die("argh");
+ die("argh 2 : cannot read ".$element_id);
if ( isset($this->acl[$element_id]['statuses']) && ! empty(
$this->acl[$element_id]['statuses'] ) &&
is_array($this->acl[$element_id]['statuses']))
{
@@ -954,7 +954,7 @@
$this->db->unlock();
if ( ! $this->can_read($element_id))
- die("argh");
+ die("argh 3");
$version['mime_type']=$this->get_mime_type($version['file_extension']);
@@ -1611,7 +1611,7 @@
{
if ( ! $this->can_read($parent_id))
- die("argh");
+ die("argh 4");
$sql="SELECT * FROM ".$this->tables['elements']." ";
$sql.="WHERE parent_id=".$parent_id." ";
@@ -1705,7 +1705,7 @@
$versions=null;
if ( ! $this->can_read($element_id))
- die("argh");
+ die("argh 5");
if ( $this->debug('list_version') )
echo "list_versions: entering with
element_id=".$element_id."<br/>\n";
@@ -2112,7 +2112,7 @@
if ( is_array($parent_acl))
foreach ( $parent_acl as $ac )
{
- $this->new_acl($element_id, $ac['account_id'],
$ac['read'], $ac['statuses'], $ac['write'], $ac['delete'], $ac['change_acl']);
+ $this->new_acl($element_id, $ac['account_id'],
$ac['read'], $ac['statuses'], $ac['write'], $ac['delete'], $ac['changeacl']);
}
}
@@ -2601,7 +2601,26 @@
$version_id=$this->db->f('version_id');
$version_status=$this->db->f('status');
- if ( $this->can_write($element_id) || $version_status
== "pending_for_acceptation" && $this->can_read($element_id) )
+ if ( $this->can_read($element_id) )
+ {
+ if ( !
isset($this->acl[$element_id]['statuses']) )
+ {
+ $go="ok";
+ }
+ elseif(
empty($this->acl[$element_id]['statuses']) )
+ {
+ $go="ok";
+ }
+ elseif(in_array(
$version_status,$this->acl[$element_id]['statuses']))
+ {
+ $go="ok";
+ }
+ else
+ {
+ $go=false;
+ }
+
+ if ( $go==true )
{
$docs[$i]['element_id']=$element_id;
$docs[$i]['name']=$this->db->f('name');
@@ -2613,6 +2632,7 @@
$i ++;
}
}
+ }
$this->db->unlock();