[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] [18504] fix: use phpgw::get_var if it's available
From: |
Pascal Vilarem |
Subject: |
[Phpgroupware-cvs] [18504] fix: use phpgw::get_var if it's available |
Date: |
Wed, 19 Mar 2008 07:44:34 +0000 |
Revision: 18504
http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=18504
Author: maat
Date: 2008-03-19 07:44:33 +0000 (Wed, 19 Mar 2008)
Log Message:
-----------
fix: use phpgw::get_var if it's available
Modified Paths:
--------------
trunk/ged/inc/class.ged_admin.inc.php
trunk/ged/inc/class.ged_ui.inc.php
Modified: trunk/ged/inc/class.ged_admin.inc.php
===================================================================
--- trunk/ged/inc/class.ged_admin.inc.php 2008-03-19 07:27:10 UTC (rev
18503)
+++ trunk/ged/inc/class.ged_admin.inc.php 2008-03-19 07:44:33 UTC (rev
18504)
@@ -43,6 +43,20 @@
}
$GLOBALS['phpgw']->css->validate_file('default','ged');
}
+
+ // wrapper to use new phpgw::$this->get_var if it exists
+ // and old $this->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,$default);
+ }
+ else
+ {
+ return get_var($varname,$method, $default);
+ }
+ }
function display_app_header()
{
@@ -52,8 +66,8 @@
function types()
{
- $action=get_var('action',array('POST'));
- $doc_types=get_var('doc_types',array('POST'));
+ $action=$this->get_var('action',array('POST'));
+ $doc_types=$this->get_var('doc_types',array('POST'));
if ( $action==lang("add"))
{
@@ -234,9 +248,9 @@
function places()
{
//$project_root_id=1;
- $project_root_id=get_var('project_root',array('GET'));
- $action=get_var('action',array('POST'));
- $places=get_var('places',array('POST'));
+ $project_root_id=$this->get_var('project_root',array('GET'));
+ $action=$this->get_var('action',array('POST'));
+ $places=$this->get_var('places',array('POST'));
if ( $action==lang("add"))
{
Modified: trunk/ged/inc/class.ged_ui.inc.php
===================================================================
--- trunk/ged/inc/class.ged_ui.inc.php 2008-03-19 07:27:10 UTC (rev 18503)
+++ trunk/ged/inc/class.ged_ui.inc.php 2008-03-19 07:44:33 UTC (rev 18504)
@@ -292,15 +292,15 @@
// wrapper to use new phpgw::get_var if it exists
// and old get_var otherwise
- function get_var($varname,$method)
+ function get_var($varname,$method=null,$default=null)
{
- if ( function_exists ('phpgw::get_var'))
+ if ( is_callable(array('phpgw', 'get_var')))
{
- return phpgw::get_var($varname,$method);
+ return
phpgw::get_var($varname,$method,$default,$default);
}
else
{
- return get_var($varname,$method);
+ return get_var($varname,$method, $default);
}
}
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] [18504] fix: use phpgw::get_var if it's available,
Pascal Vilarem <=