[fusion-commits] r3061 - trunk/layers/MapGuide/php

svn_fusion at osgeo.org svn_fusion at osgeo.org
Mon Apr 10 07:19:14 PDT 2023


Author: jng
Date: 2023-04-10 07:19:13 -0700 (Mon, 10 Apr 2023)
New Revision: 3061

Modified:
   trunk/layers/MapGuide/php/GetSelectionProperties.php
   trunk/layers/MapGuide/php/SaveSelection.php
Log:
Remove usages of get_magic_quotes_gpc() in PHP backend. Patch by Patrik Johansson

Fixes #667

Modified: trunk/layers/MapGuide/php/GetSelectionProperties.php
===================================================================
--- trunk/layers/MapGuide/php/GetSelectionProperties.php	2023-04-03 12:49:53 UTC (rev 3060)
+++ trunk/layers/MapGuide/php/GetSelectionProperties.php	2023-04-10 14:19:13 UTC (rev 3061)
@@ -198,25 +198,9 @@
 {
     global $selText;
 
-    $selText = UnescapeMagicQuotes($params['selection']);
+    $selText = $params['selection'];
 }
 
-
-function UnescapeMagicQuotes($str)
-{
-    if(ini_get("magic_quotes_sybase") == "1")
-        return str_replace("''", "'", $str);
-    else if(get_magic_quotes_gpc() == "1")
-    {
-        //Unescape double quotes
-        $str = str_replace('\\"', '"', $str);
-
-        //remove additional backslash
-        return str_replace("\\", "", $str);
-    }
-    return $str;
-}
-
 function GetRequestParameters()
 {
     if($_SERVER['REQUEST_METHOD'] == "POST")

Modified: trunk/layers/MapGuide/php/SaveSelection.php
===================================================================
--- trunk/layers/MapGuide/php/SaveSelection.php	2023-04-03 12:49:53 UTC (rev 3060)
+++ trunk/layers/MapGuide/php/SaveSelection.php	2023-04-10 14:19:13 UTC (rev 3061)
@@ -102,26 +102,10 @@
     global $selText;
     global $getExtents;
 
-    $selText = UnescapeMagicQuotes($params['selection']);
+    $selText = $params['selection'];
     $getExtents = ($params['getextents'] == "true") ? true : false;
 }
 
-
-function UnescapeMagicQuotes($str)
-{
-    if(ini_get("magic_quotes_sybase") == "1")
-        return str_replace("''", "'", $str);
-    else if(get_magic_quotes_gpc() == "1")
-    {
-        //Unescape double quotes
-        $str = str_replace('\\"', '"', $str);
-
-        //remove additional backslash
-        return str_replace("\\", "", $str);
-    }
-    return $str;
-}
-
 function GetRequestParameters()
 {
     if($_SERVER['REQUEST_METHOD'] == "POST")



More information about the fusion-commits mailing list