Update of phpgwapi/inc

Modified Files:
     Branch: Version-0_9_16-branch
            functions.inc.php lines: +6 -4

Log Message:
fixed use of globals in function clean_vars

====================================================
Index: phpgwapi/inc/functions.inc.php
diff -u phpgwapi/inc/functions.inc.php:1.121.2.13.2.26 
phpgwapi/inc/functions.inc.php:1.121.2.13.2.27
--- phpgwapi/inc/functions.inc.php:1.121.2.13.2.26      Fri Sep 23 11:23:52 2005
+++ phpgwapi/inc/functions.inc.php      Sun Sep 25 23:25:34 2005
@@ -44,12 +44,14 @@

        function clean_vars($vars)
        {
-               global $data_cleaner;
                if ( !is_array($vars) )
                {
-                       return $data_cleaner->clean($vars);
+                       $data_cleaner = CreateObject('phpgwapi.data_cleaner');
+                       $_vars = $data_cleaner->clean($vars);
+                       unset($data_cleaner);
+                       return $_vars;
                }
-
+
                foreach ( $vars as $key => $val )
                {
                        $vars[$key] = clean_vars($val);




_______________________________________________
Phpgroupware-cvs mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/phpgroupware-cvs

Reply via email to