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()
_______________________________________________
phpGroupWare-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/phpgroupware-cvs