[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Phpgroupware-cvs] [18571] fix: using now static var for phpgw::get_var
From: |
Pascal Vilarem |
Subject: |
[Phpgroupware-cvs] [18571] fix: using now static var for phpgw::get_var check ( thanks x2 skwashd) |
Date: |
Sun, 01 Jun 2008 10:31:47 +0000 |
Revision: 18571
http://svn.sv.gnu.org/viewvc/?view=rev&root=phpgroupware&revision=18571
Author: maat
Date: 2008-06-01 10:31:46 +0000 (Sun, 01 Jun 2008)
Log Message:
-----------
fix: using now static var for phpgw::get_var check (thanks x2 skwashd)
Modified Paths:
--------------
trunk/ged/inc/class.flow_client.inc.php
trunk/ged/inc/class.ged_ui.inc.php
Modified: trunk/ged/inc/class.flow_client.inc.php
===================================================================
--- trunk/ged/inc/class.flow_client.inc.php 2008-06-01 10:20:16 UTC (rev
18570)
+++ trunk/ged/inc/class.flow_client.inc.php 2008-06-01 10:31:46 UTC (rev
18571)
@@ -49,12 +49,12 @@
// and old get_var otherwise
function get_var($varname,$method=null,$default=null)
{
- if (!isset($new_get_var))
+ static $new_get_var = null;
+ if (is_null($new_get_var))
{
- static $new_get_var;
$new_get_var=is_callable(array('phpgw',
'get_var'));
}
-
+
if ($new_get_var)
{
return
phpgw::get_var($varname,$method,$default);
Modified: trunk/ged/inc/class.ged_ui.inc.php
===================================================================
--- trunk/ged/inc/class.ged_ui.inc.php 2008-06-01 10:20:16 UTC (rev 18570)
+++ trunk/ged/inc/class.ged_ui.inc.php 2008-06-01 10:31:46 UTC (rev 18571)
@@ -292,25 +292,23 @@
// wrapper to use new phpgw::get_var if it exists
// and old get_var otherwise
- // wrapper to use new phpgw::get_var if it exists
- // and old get_var otherwise
- function get_var($varname,$method=null,$default=null)
+ function get_var($varname,$method=null,$default=null)
+ {
+ static $new_get_var = null;
+ if (is_null($new_get_var))
{
- if (!isset($new_get_var))
- {
- static $new_get_var;
- $new_get_var=is_callable(array('phpgw',
'get_var'));
- }
+ $new_get_var=is_callable(array('phpgw', 'get_var'));
+ }
- if ($new_get_var)
- {
- return
phpgw::get_var($varname,$method,$default);
- }
- else
- {
- return get_var($varname,$method, $default);
- }
+ if ($new_get_var)
+ {
+ return phpgw::get_var($varname,$method,$default);
}
+ else
+ {
+ return get_var($varname,$method, $default);
+ }
+ }
// TODO acl here
function view()
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Phpgroupware-cvs] [18571] fix: using now static var for phpgw::get_var check ( thanks x2 skwashd),
Pascal Vilarem <=