[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] [18569] fix: use phpgw::get_var if available
From: |
Pascal Vilarem |
Subject: |
[Phpgroupware-cvs] [18569] fix: use phpgw::get_var if available |
Date: |
Sun, 01 Jun 2008 08:04:43 +0000 |
Revision: 18569
http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=18569
Author: maat
Date: 2008-06-01 08:04:42 +0000 (Sun, 01 Jun 2008)
Log Message:
-----------
fix: use phpgw::get_var if available
Modified Paths:
--------------
trunk/ged/inc/class.flow_client.inc.php
Modified: trunk/ged/inc/class.flow_client.inc.php
===================================================================
--- trunk/ged/inc/class.flow_client.inc.php 2008-06-01 04:59:06 UTC (rev
18568)
+++ trunk/ged/inc/class.flow_client.inc.php 2008-06-01 08:04:42 UTC (rev
18569)
@@ -45,6 +45,20 @@
}
}
+ // wrapper to use new phpgw::get_var if it exists
+ // and old get_var otherwise
+ function get_var($varname,$method=null,$default=null)
+ {
+ if ( is_callable(array('phpgw', 'get_var')))
+ {
+ return
phpgw::get_var($varname,$method,$default);
+ }
+ else
+ {
+ return get_var($varname,$method, $default);
+ }
+ }
+
function load_template_defaults()
{
$this->t->set_var('lang_name', lang('name'));
@@ -121,8 +135,8 @@
$last_version=$this->ged_dm->get_version_info($object['version_id']);
$element=$this->ged_dm->get_element_info($last_version['element_id']);
- $review_file=get_var('review_file',array('POST'));
- $comment=addslashes(get_var('comment', array( 'POST')));
+
$review_file=$this->get_var('review_file',array('POST'));
+ $comment=addslashes($this->get_var('comment', array(
'POST')));
// Récupérer le type de review file en fonction de la
transition
// Du type de fichier, du projet concerné
@@ -226,33 +240,33 @@
$element=$this->ged_dm->get_element_info($version['element_id']);
// actions
- $update_file=get_var('update_file', array('POST',
'GET'));
- $update_version=get_var('update_version', array('POST',
'GET'));
- $go_back=get_var('go_back', array('POST', 'GET'));
- $search=get_var('search', array('POST', 'GET'));
- $do_add_relation=get_var('do_add_relation',
array('POST', 'GET'));
- $do_remove_relation=get_var('do_remove_relation',
array('POST', 'GET'));
+ $update_file=$this->get_var('update_file',
array('POST', 'GET'));
+ $update_version=$this->get_var('update_version',
array('POST', 'GET'));
+ $go_back=$this->get_var('go_back', array('POST',
'GET'));
+ $search=$this->get_var('search', array('POST', 'GET'));
+ $do_add_relation=$this->get_var('do_add_relation',
array('POST', 'GET'));
+
$do_remove_relation=$this->get_var('do_remove_relation', array('POST', 'GET'));
// needed for 'update_file' action
- $new_file_name=get_var('file_name', array('POST',
'GET'));
- $new_file_description=get_var('file_description',
array('POST', 'GET'));
-
$new_referenceq=get_var('referenceq',array('GET','POST'));
- $new_doc_type=get_var('document_type', array('GET',
'POST'));
- $new_validity_period=get_var('validity_period',
array('POST', 'GET'));
+ $new_file_name=$this->get_var('file_name',
array('POST', 'GET'));
+
$new_file_description=$this->get_var('file_description', array('POST', 'GET'));
+
$new_referenceq=$this->get_var('referenceq',array('GET','POST'));
+ $new_doc_type=$this->get_var('document_type',
array('GET', 'POST'));
+ $new_validity_period=$this->get_var('validity_period',
array('POST', 'GET'));
// needed for 'update_version' action
- $new_version_description=get_var('version_description',
array('POST', 'GET'));
- $new_major_value=get_var('major', array('POST', 'GET'));
- $new_minor_value=get_var('minor', array('POST', 'GET'));
+
$new_version_description=$this->get_var('version_description', array('POST',
'GET'));
+ $new_major_value=$this->get_var('major', array('POST',
'GET'));
+ $new_minor_value=$this->get_var('minor', array('POST',
'GET'));
// TODO : version numbering
- $new_version_type=get_var('version_type', array('POST',
'GET'));
+ $new_version_type=$this->get_var('version_type',
array('POST', 'GET'));
// needed for 'search' action
- $query=get_var('query', array('POST', 'GET'));
+ $query=$this->get_var('query', array('POST', 'GET'));
// needed for relations action
- $new_relations=get_var('relations', array('POST',
'GET'));
+ $new_relations=$this->get_var('relations',
array('POST', 'GET'));
// TODO : real update
if ($update_file==lang('Update'))
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] [18569] fix: use phpgw::get_var if available,
Pascal Vilarem <=