phpgroupware-cvs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Phpgroupware-cvs] phpgwapi/inc functions.inc.php,1.121.2.13.2.31


From: Caeies
Subject: [Phpgroupware-cvs] phpgwapi/inc functions.inc.php,1.121.2.13.2.31
Date: Fri, 30 Sep 2005 11:38:00 +0200

Update of phpgwapi/inc

Modified Files:
     Branch: Version-0_9_16-branch
            functions.inc.php lines: +3 -5

Log Message:
Using a better syntax and avoid problems when calling clean_var by others way

====================================================
Index: phpgwapi/inc/functions.inc.php
diff -u phpgwapi/inc/functions.inc.php:1.121.2.13.2.30 
phpgwapi/inc/functions.inc.php:1.121.2.13.2.31
--- phpgwapi/inc/functions.inc.php:1.121.2.13.2.30      Thu Sep 29 23:33:03 2005
+++ phpgwapi/inc/functions.inc.php      Fri Sep 30 09:38:11 2005
@@ -44,10 +44,9 @@

        function clean_vars($vars, $safe_redirect = True)
        {
-               global $data_cleaner;
                if ( !is_array($vars) )
                {
-                       return $data_cleaner->clean($vars, $safe_redirect);
+                       return $GLOBALS['data_cleaner']->clean($vars, 
$safe_redirect);
                }

                foreach ( $vars as $key => $val )
@@ -218,7 +217,7 @@
        // Remove this and I will make sure that you lose important parts of 
your anatomy - skwashd
        $GLOBALS['RAW_REQUEST'] = $_REQUEST; // if you really need the raw value
        $to_cleans = array('_GET', '_POST', '_COOKIE', '_REQUEST');
-       $data_cleaner = createObject('phpgwapi.data_cleaner');
+       $GLOBALS['data_cleaner'] = createObject('phpgwapi.data_cleaner'); // We 
create it for the whole call ...
        foreach ( $to_cleans as $to_clean )
        {
                if ( isset($GLOBALS[$to_clean]) && 
is_array($GLOBALS[$to_clean]) && count($GLOBALS[$to_clean]) )
@@ -227,7 +226,6 @@
                        $GLOBALS["HTTP{$to_clean}_VARS"] = 
$GLOBALS[$to_clean];//legacy app support - will be dropped in 18
                }
        }
-       unset($data_cleaner);

        if(@isset($GLOBALS['phpgw_info']['server']['enforce_ssl']) && !$HTTPS)
        {






reply via email to

[Prev in Thread] Current Thread [Next in Thread]