]> git.andy128k.dev Git - ipf.git/commitdiff
cleanup
authorAndrey Kutejko <andy128k@gmail.com>
Fri, 26 Jul 2013 13:55:30 +0000 (16:55 +0300)
committerAndrey Kutejko <andy128k@gmail.com>
Fri, 26 Jul 2013 13:55:30 +0000 (16:55 +0300)
ipf/http.php [deleted file]
ipf/http/request.php

diff --git a/ipf/http.php b/ipf/http.php
deleted file mode 100644 (file)
index bd4f02a..0000000
+++ /dev/null
@@ -1,50 +0,0 @@
-<?php
-
-class IPF_HTTP
-{
-    function removeTheMagic()
-    {
-        if (get_magic_quotes_gpc()) {
-            if (!empty($_GET)) {
-                array_walk($_GET, 'IPF_HTTP_magicStrip');
-            }
-            if (!empty($_POST)) {
-                array_walk($_POST, 'IPF_HTTP_magicStrip');
-            }
-            if (!empty($_REQUEST)) {
-                array_walk($_REQUEST, 'IPF_HTTP_magicStrip');
-            }
-            if (!empty($_COOKIE)) {
-                array_walk($_COOKIE, 'IPF_HTTP_magicStrip');
-            }
-        }
-        if (function_exists('ini_set')) {
-            @ini_set('session.use_cookies', '1');
-            @ini_set('session.use_only_cookies', '1');
-            @ini_set('session.use_trans_sid', '0');
-            @ini_set('url_rewriter.tags', '');
-        }
-    }
-}
-
-function IPF_HTTP_magicStrip(&$k, $key)
-{
-    $k = IPF_HTTP_handleMagicQuotes($k);
-}
-
-function IPF_HTTP_handleMagicQuotes(&$value)
-{
-    if (is_array($value)) {
-        $result = array();
-        foreach ($value as $k => $v) {
-            if (is_array($v)) {
-                $result[$k] = IPF_HTTP_handleMagicQuotes($v);
-            } else {
-                $result[$k] = stripslashes($v);
-            }
-        }
-        return $result;
-    } else {
-        return stripslashes($value);
-    }
-}
index 9894080965efde4b8451293c8ab95fa50d98d422..78fa4e58110f666862b51efb6ab90ee90f7aace2 100644 (file)
@@ -18,8 +18,6 @@ class IPF_HTTP_Request
 
     public function __construct()
     {
-        $http = new IPF_HTTP();
-        $http->removeTheMagic();
         $this->POST =& $_POST;
         $this->GET =& $_GET;
         $this->REQUEST =& $_REQUEST;