phpgroupware-cvs
[Top][All Lists]
Advanced

[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, 02 Apr 2007 17:59:09 +0000

CVSROOT:        /sources/phpgroupware
Module name:    ged
Changes by:     Pascal Vilarem <maat>   07/04/02 17:59:09

Modified files:
        inc            : class.ged_dm.inc.php 

Log message:
        only show history for admins and writers

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ged/inc/class.ged_dm.inc.php?cvsroot=phpgroupware&r1=1.19&r2=1.20

Patches:
Index: class.ged_dm.inc.php
===================================================================
RCS file: /sources/phpgroupware/ged/inc/class.ged_dm.inc.php,v
retrieving revision 1.19
retrieving revision 1.20
diff -u -b -r1.19 -r1.20
--- class.ged_dm.inc.php        2 Apr 2007 17:49:44 -0000       1.19
+++ class.ged_dm.inc.php        2 Apr 2007 17:59:09 -0000       1.20
@@ -2248,6 +2248,9 @@
        // History
        function get_history ( $element_id)
        {
+               if ( $this->admin || $this->can_write($element_id))
+               {
+               
                $sql="SELECT ".$this->tables['history'].".*, 
".$this->tables['versions'].".major, ".$this->tables['versions'].".minor FROM 
".$this->tables['history']." INNER JOIN ".$this->tables['versions']." ";
                $sql.="ON ".$this->tables['history'].".version_id = 
".$this->tables['versions'].".version_id ";
                $sql.="WHERE 
".$this->tables['history'].".element_id=".$element_id;
@@ -2274,6 +2277,7 @@
                }
                        
                $this->db->unlock();
+               }
                
                if ( isset($history))
                        return ($history);




reply via email to

[Prev in Thread] Current Thread [Next in Thread]