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 inc/class.ged_ui.i...


From: Pascal Vilarem
Subject: [Phpgroupware-cvs] ged inc/class.ged_dm.inc.php inc/class.ged_ui.i...
Date: Tue, 17 Jul 2007 15:46:21 +0000

CVSROOT:        /sources/phpgroupware
Module name:    ged
Changes by:     Pascal Vilarem <maat>   07/07/17 15:46:21

Modified files:
        inc            : class.ged_dm.inc.php class.ged_ui.inc.php 
        setup          : tables_update.inc.php 
Added files:
        templates/base/images: pending_for_acceptation-32.png 
                               pending_for_acceptation-16.png 
                               pending_for_acceptation-48.png 
        templates/base/images/work/png: pending_for_acceptation-32.png 
                                        pending_for_acceptation-48.png 
Removed files:
        templates/base/images: pending_for_approval-48.png 
                               pending_for_approval-16.png 
                               pending_for_approval-32.png 
        templates/base/images/work/png: pending_for_approval-32.png 
                                        pending_for_approval-48.png 

Log message:
        fix: changed approval -> acceptation to comply with the recent changes

CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/ged/templates/base/images/pending_for_acceptation-32.png?cvsroot=phpgroupware&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ged/templates/base/images/pending_for_acceptation-16.png?cvsroot=phpgroupware&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ged/templates/base/images/pending_for_acceptation-48.png?cvsroot=phpgroupware&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ged/templates/base/images/pending_for_approval-48.png?cvsroot=phpgroupware&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/ged/templates/base/images/pending_for_approval-16.png?cvsroot=phpgroupware&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/ged/templates/base/images/pending_for_approval-32.png?cvsroot=phpgroupware&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/ged/templates/base/images/work/png/pending_for_acceptation-32.png?cvsroot=phpgroupware&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ged/templates/base/images/work/png/pending_for_acceptation-48.png?cvsroot=phpgroupware&rev=1.1
http://cvs.savannah.gnu.org/viewcvs/ged/templates/base/images/work/png/pending_for_approval-32.png?cvsroot=phpgroupware&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/ged/templates/base/images/work/png/pending_for_approval-48.png?cvsroot=phpgroupware&r1=1.1&r2=0
http://cvs.savannah.gnu.org/viewcvs/ged/inc/class.ged_dm.inc.php?cvsroot=phpgroupware&r1=1.34&r2=1.35
http://cvs.savannah.gnu.org/viewcvs/ged/inc/class.ged_ui.inc.php?cvsroot=phpgroupware&r1=1.36&r2=1.37
http://cvs.savannah.gnu.org/viewcvs/ged/setup/tables_update.inc.php?cvsroot=phpgroupware&r1=1.8&r2=1.9

Patches:
Index: inc/class.ged_dm.inc.php
===================================================================
RCS file: /sources/phpgroupware/ged/inc/class.ged_dm.inc.php,v
retrieving revision 1.34
retrieving revision 1.35
diff -u -b -r1.34 -r1.35
--- inc/class.ged_dm.inc.php    17 Jul 2007 11:13:05 -0000      1.34
+++ inc/class.ged_dm.inc.php    17 Jul 2007 15:46:21 -0000      1.35
@@ -890,21 +890,21 @@
                return $version;
        }
 
-       function get_current_or_pending_for_approval_version($element_id)
+       function get_current_or_pending_for_acceptation_version($element_id)
        {
                // db2 neededbecause can_read can be called during a $this->db 
loop;            
                $db2 = clone($this->db);
 
-               if ( 
$this->debug('get_current_or_pending_for_approval_version') )
-                       print ( "get_current_or_pending_for_approval_version: 
entering with element_id=".$element_id."<br>\n");
+               if ( 
$this->debug('get_current_or_pending_for_acceptation_version') )
+                       print ( 
"get_current_or_pending_for_acceptation_version: entering with 
element_id=".$element_id."<br>\n");
                
                $sql="SELECT * FROM ".$this->tables['versions']." ";
                $sql.="WHERE element_id=".$element_id." ";
-               $sql.="AND ( status='current' OR status='alert' OR 
status='pending_for_approval' ) ";
+               $sql.="AND ( status='current' OR status='alert' OR 
status='pending_for_acceptation' ) ";
                $sql.="ORDER BY version_id DESC LIMIT 1";
 
-               if ( 
$this->debug('get_current_or_pending_for_approval_version') )
-                       print ( "get_current_or_pending_for_approval_version: 
".$sql."<br>\n");
+               if ( 
$this->debug('get_current_or_pending_for_acceptation_version') )
+                       print ( 
"get_current_or_pending_for_acceptation_version: ".$sql."<br>\n");
 
                //print ("<pre>");
                //print_r($this->db->metadata( $this->tables['versions'] ));
@@ -1088,18 +1088,18 @@
                return $version;
        }
 
-       function get_pending_for_approval ($element_id)
+       function get_pending_for_acceptation ($element_id)
        {
-               if ( $this->debug('get_pending_for_approval') )
-                       print ( "get_pending_for_approval: entering with 
element_id=".$element_id."<br>\n");
+               if ( $this->debug('get_pending_for_acceptation') )
+                       print ( "get_pending_for_acceptation: entering with 
element_id=".$element_id."<br>\n");
                
                $sql="SELECT * FROM ".$this->tables['versions']." ";
                $sql.="WHERE element_id=".$element_id." ";
-               $sql.="AND ( status='pending_for_approval' )";
+               $sql.="AND ( status='pending_for_acceptation' )";
                $sql.="ORDER BY version_id DESC LIMIT 1";
 
-               if ( $this->debug('get_pending_for_approval') )
-                       print ( "get_pending_for_approval: ".$sql."<br>\n");
+               if ( $this->debug('get_pending_for_acceptation') )
+                       print ( "get_pending_for_acceptation: ".$sql."<br>\n");
 
                //print ("<pre>");
                //print_r($this->db->metadata( $this->tables['versions'] ));
@@ -1143,7 +1143,7 @@
                
                $sql="SELECT * FROM ".$this->tables['versions']." ";
                $sql.="WHERE element_id=".$element_id." ";
-               $sql.="AND ( status='working' OR 
status='pending_for_technical_review' OR status='pending_for_quality_review' OR 
status='pending_for_approval' )";
+               $sql.="AND ( status='working' OR 
status='pending_for_technical_review' OR status='pending_for_quality_review' OR 
status='pending_for_acceptation' )";
                $sql.="ORDER BY version_id DESC LIMIT 1";
 
                if ( $this->debug('get_working_version') )
@@ -1375,7 +1375,7 @@
                                }
                                else
                                {
-                                       
$the_current_version=$this->get_current_or_pending_for_approval_version($the_element_id);
+                                       
$the_current_version=$this->get_current_or_pending_for_acceptation_version($the_element_id);
                                        
                                        if ( is_array($the_current_version))
                                        {
@@ -1450,7 +1450,7 @@
        
                        $sql1.="FROM ".$this->tables['versions']." ";
                        $sql1.="WHERE element_id=".$element_id." ";
-                       $sql1.="AND ( status='current' OR 
status='pending_for_approval') ";
+                       $sql1.="AND ( status='current' OR 
status='pending_for_acceptation') ";
                        $sql1.="ORDER BY version_id ";          
                }
 
@@ -1913,7 +1913,7 @@
        }
        
        // Say file is OK
-       // User must have approval rights on this document
+       // User must have acceptation rights on this document
 
        function accept_file ( $element_id )
        {
@@ -1992,11 +1992,11 @@
        
        // Say file is not valid
        // A new version must be worked on and delivered
-       // User must have approval rights on this document
+       // User must have acceptation rights on this document
        
        function refuse_file ( $element_id, $reason="Default reason" )
        {
-               $pending_version=$this->get_pending_for_approval($element_id);
+               
$pending_version=$this->get_pending_for_acceptation($element_id);
                
                // Need to check if there is a working version
                if (is_array($pending_version) )
@@ -2014,7 +2014,7 @@
                }
        }
 
-       // Submit file to customer for approval
+       // Submit file to customer for acceptation
 
        // After a contractual timeout the file is
        // considered accepted
@@ -2029,7 +2029,7 @@
                        {
                                // Set "pending_for_internal_review" status
                                // TODO : Add submission date
-                               $sql="UPDATE ged_versions set 
status='pending_for_approval' WHERE 
version_id=".$pending_version['version_id'];                  
+                               $sql="UPDATE ged_versions set 
status='pending_for_acceptation' WHERE 
version_id=".$pending_version['version_id'];                       
                                $this->db->query($sql, __LINE__, __FILE__);
                                $this->db->unlock();
                                
@@ -2038,7 +2038,7 @@
                }
        }
 
-       // submit file for internal approval then delivery
+       // submit file for internal acceptation then delivery
        // the file must be working
        // and the performer of this action must have editor role
        function submit_file ( $element_id )
@@ -2358,7 +2358,7 @@
        function list_documents_to_expire ($period=0)
        {
                if ( $period==0 )
-                       
$period=$GLOBALS['phpgw_info']['user']['preferences']['ged']['warn_approval_within'];
+                       
$period=$GLOBALS['phpgw_info']['user']['preferences']['ged']['warn_acceptation_within'];
                        
                $now=time();
                $then=$now+$period*24*3600;
@@ -2411,7 +2411,7 @@
                $sql.="FROM ( ged_elements ";
                $sql.="INNER JOIN ged_versions as ged_current_version ";
                $sql.="ON 
ged_elements.element_id=ged_current_version.element_id ";
-               $sql.="AND ( 
ged_current_version.status='pending_for_technical_review' or 
ged_current_version.status='pending_for_quality_review' or 
ged_current_version.status='pending_for_approval' or 
ged_current_version.status='ready_for_delivery' )) ";
+               $sql.="AND ( 
ged_current_version.status='pending_for_technical_review' or 
ged_current_version.status='pending_for_quality_review' or 
ged_current_version.status='pending_for_acceptation' or 
ged_current_version.status='ready_for_delivery' )) ";
                $sql.="WHERE ( ";
                $vor="";
                        
@@ -2437,7 +2437,7 @@
                        $version_id=$this->db->f('version_id');
                        $version_status=$this->db->f('status');
                        
-                       if ( $this->can_write($element_id) || $version_status 
== "pending_for_approval" && $this->can_read($element_id) )
+                       if ( $this->can_write($element_id) || $version_status 
== "pending_for_acceptation" && $this->can_read($element_id) )
                        {
                                $docs[$i]['element_id']=$element_id;
                                $docs[$i]['name']=$this->db->f('name');
@@ -2642,7 +2642,7 @@
                        $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." ";
-                       $sql.="AND 
(".$this->tables['history'].".status='current' OR 
".$this->tables['history'].".status='pending_for_approval') ";
+                       $sql.="AND 
(".$this->tables['history'].".status='current' OR 
".$this->tables['history'].".status='pending_for_acceptation') ";
                        $sql.="ORDER BY ".$this->tables['history'].".logdate 
ASC";
                }
                
@@ -2694,7 +2694,7 @@
                $sql.="INNER JOIN ged_versions as ged_current_version ";
                $sql.="ON 
ged_elements.element_id=ged_current_version.element_id ";
                $sql.="AND ( ged_current_version.status='current' OR 
ged_current_version.status='working' OR 
ged_current_version.status='pending_for_technical_review' ";
-               $sql.="OR 
ged_current_version.status='pending_for_quality_review' OR 
ged_current_version.status='ready_for_delivery' OR 
ged_current_version.status='pending_for_approval' )) ";
+               $sql.="OR 
ged_current_version.status='pending_for_quality_review' OR 
ged_current_version.status='ready_for_delivery' OR 
ged_current_version.status='pending_for_acceptation' )) ";
                $sql.="WHERE ged_elements.name like '%".$query."%' OR 
ged_elements.description like '%".$query."%' OR ged_elements.reference like 
'%".$query."%' ";
                $sql.="OR  ged_current_version.description like '%".$query."%' 
";
                
@@ -2707,7 +2707,7 @@
                        $version_id=$this->db->f('version_id');
                        $version_status=$this->db->f('status');
                        
-                       if ( $this->can_write($element_id) || ( $version_status 
== "pending_for_approval" || $version_status == "current" ) && 
$this->can_read($element_id) )
+                       if ( $this->can_write($element_id) || ( $version_status 
== "pending_for_acceptation" || $version_status == "current" ) && 
$this->can_read($element_id) )
                        {
                                $docs[$i]['element_id']=$element_id;
                                
$docs[$i]['version_id']=$this->db->f('version_id');
@@ -2755,7 +2755,7 @@
                        $version_id=$this->db->f('version_id');
                        $version_status=$this->db->f('status');
                        
-                       if ( $this->can_write($element_id) || ( $version_status 
== "pending_for_approval" || $version_status == "current" || $version_status == 
"refused") && $this->can_read($element_id) )
+                       if ( $this->can_write($element_id) || ( $version_status 
== "pending_for_acceptation" || $version_status == "current" || $version_status 
== "refused") && $this->can_read($element_id) )
                        {
                                $docs[$i]['element_id']=$element_id;
                                $docs[$i]['version_id']=$version_id;

Index: inc/class.ged_ui.inc.php
===================================================================
RCS file: /sources/phpgroupware/ged/inc/class.ged_ui.inc.php,v
retrieving revision 1.36
retrieving revision 1.37
diff -u -b -r1.36 -r1.37
--- inc/class.ged_ui.inc.php    17 Jul 2007 11:13:06 -0000      1.36
+++ inc/class.ged_ui.inc.php    17 Jul 2007 15:46:21 -0000      1.37
@@ -561,7 +561,7 @@
                }
                elseif ($this->ged_dm->can_read($element_id))
                {
-                       
$current_version=$this->ged_dm->get_current_or_pending_for_approval_version($element_id);
+                       
$current_version=$this->ged_dm->get_current_or_pending_for_acceptation_version($element_id);
                }
                
                $this->t->set_var('current_version_status_image', 
$GLOBALS['phpgw']->common->image('ged', $current_version['status']."-48"));
@@ -739,7 +739,7 @@
                        
$expiration_date=$current_version['validation_date']+$element_info['validity_period'];
                        
                        if ( $expiration_date < time() )
-                               $expiration_date='Need approval';
+                               $expiration_date='Need acceptation';
                        else
                                $expiration_date=date("d/m/y", 
$expiration_date);
                }
@@ -932,7 +932,7 @@
                                        print ( "browse: case file<br/>\n");
                                
                                
$last_version=$this->ged_dm->get_last_version($focused_id);
-                               
$current_version=$this->ged_dm->get_current_or_pending_for_approval_version($focused_id);
+                               
$current_version=$this->ged_dm->get_current_or_pending_for_acceptation_version($focused_id);
 
                                // No current version and no write acl : 
cheater !
                                if ( ! is_array($current_version) && ! 
$this->ged_dm->can_write($focused_id))
@@ -985,7 +985,7 @@
                                
                                
                                // TODO : droit specifique d'approbation ?
-                               if ( $this->ged_dm->admin && 
($last_version['status'] == 'working' || $last_version['status'] == 
'pending_for_technical_review' || $last_version['status'] == 
'pending_for_quality_review' || $last_version['status'] == 
'pending_for_approval' )  )
+                               if ( $this->ged_dm->admin && 
($last_version['status'] == 'working' || $last_version['status'] == 
'pending_for_technical_review' || $last_version['status'] == 
'pending_for_quality_review' || $last_version['status'] == 
'pending_for_acceptation' )  )
                                {
                                        $link_data=null;
                                        
$link_data['menuaction']='ged.ged_ui.accept_file';
@@ -1018,7 +1018,7 @@
                                        $this->t->set_var('deliver_file', "<a 
href=\"".$approve_file_url."\">".lang('Deliver file')."</a>");
                                }
                                
-                               if ( $this->ged_dm->admin && 
$last_version['status'] == 'pending_for_approval' )
+                               if ( $this->ged_dm->admin && 
$last_version['status'] == 'pending_for_acceptation' )
                                {
                                        $link_data=null;
                                        
$link_data['menuaction']='ged.ged_ui.refuse_file';
@@ -2375,7 +2375,7 @@
                        $this->t->set_var('accepted_block_handle', "");
                        
                        $stats_delivered=null;
-                       
$stats_delivered=$this->ged_dm->get_stats($datetime_start, $datetime_end, 
'pending_for_approval',$my_element_id);
+                       
$stats_delivered=$this->ged_dm->get_stats($datetime_start, $datetime_end, 
'pending_for_acceptation',$my_element_id);
 
                        $count=0;
                        if (isset($stats_delivered))

Index: setup/tables_update.inc.php
===================================================================
RCS file: /sources/phpgroupware/ged/setup/tables_update.inc.php,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -b -r1.8 -r1.9
--- setup/tables_update.inc.php 17 Jul 2007 14:08:09 -0000      1.8
+++ setup/tables_update.inc.php 17 Jul 2007 15:46:21 -0000      1.9
@@ -149,6 +149,8 @@
                $GLOBALS['phpgw_setup']->oProc->query ("UPDATE ged_history SET 
status='refused', action='refused', comment='refused WHERE status='rejected'" );
                $GLOBALS['phpgw_setup']->oProc->query ("UPDATE ged_history SET 
action='approved', comment='approved' WHERE action='accepted'" );
                $GLOBALS['phpgw_setup']->oProc->query ("UPDATE ged_history SET 
action='accepted', comment='accepted' WHERE status='current'" );
+               $GLOBALS['phpgw_setup']->oProc->query ("UPDATE ged_history SET 
status='pending_for_acceptation' WHERE status='pending_for_approval'" );
+               $GLOBALS['phpgw_setup']->oProc->query ("UPDATE ged_versions SET 
status='pending_for_acceptation' WHERE status='pending_for_approval'" );
                
                $GLOBALS['setup_info']['ged']['currentver']='0.9.18.003';
                return $GLOBALS['setup_info']['ged']['currentver'];

Index: templates/base/images/pending_for_acceptation-32.png
===================================================================
RCS file: templates/base/images/pending_for_acceptation-32.png
diff -N templates/base/images/pending_for_acceptation-32.png
Binary files /dev/null and /tmp/cvsQFum7I differ

Index: templates/base/images/pending_for_acceptation-16.png
===================================================================
RCS file: templates/base/images/pending_for_acceptation-16.png
diff -N templates/base/images/pending_for_acceptation-16.png
Binary files /dev/null and /tmp/cvsHmc0GJ differ

Index: templates/base/images/pending_for_acceptation-48.png
===================================================================
RCS file: templates/base/images/pending_for_acceptation-48.png
diff -N templates/base/images/pending_for_acceptation-48.png
Binary files /dev/null and /tmp/cvseRlMiM differ



Index: templates/base/images/pending_for_approval-48.png
===================================================================
RCS file: templates/base/images/pending_for_approval-48.png
diff -N templates/base/images/pending_for_approval-48.png
Binary files /tmp/cvsdFfOmN and /dev/null differ

Index: templates/base/images/pending_for_approval-16.png
===================================================================
RCS file: templates/base/images/pending_for_approval-16.png
diff -N templates/base/images/pending_for_approval-16.png
Binary files /tmp/cvsynMLeL and /dev/null differ

Index: templates/base/images/pending_for_approval-32.png
===================================================================
RCS file: templates/base/images/pending_for_approval-32.png
diff -N templates/base/images/pending_for_approval-32.png
Binary files /tmp/cvs3WhbML and /dev/null differ






reply via email to

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