SOURCES: postfixadmin-non_local_db.patch (NEW) - rel.1 - works whe...

blues blues at pld-linux.org
Thu Jan 17 16:43:18 CET 2008


Author: blues                        Date: Thu Jan 17 15:43:18 2008 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- rel.1 - works when the database is non-local and no magic quotes

---- Files affected:
SOURCES:
   postfixadmin-non_local_db.patch (NONE -> 1.1)  (NEW)

---- Diffs:

================================================================
Index: SOURCES/postfixadmin-non_local_db.patch
diff -u /dev/null SOURCES/postfixadmin-non_local_db.patch:1.1
--- /dev/null	Thu Jan 17 16:43:18 2008
+++ SOURCES/postfixadmin-non_local_db.patch	Thu Jan 17 16:43:13 2008
@@ -0,0 +1,17 @@
+--- ./functions.inc.php.org	2008-01-17 16:38:55.000000000 +0100
++++ ./functions.inc.php	2008-01-17 16:39:42.000000000 +0100
+@@ -126,10 +126,12 @@
+ function escape_string ($string)
+ {
+    global $CONF;
++   $link = db_connect ();
++
+    if (get_magic_quotes_gpc () == 0)
+    {
+-      if ($CONF['database_type'] == "mysql")  $escaped_string = mysql_real_escape_string ($string);
+-      if ($CONF['database_type'] == "mysqli")  $escaped_string = mysqli_real_escape_string ($string);
++      if ($CONF['database_type'] == "mysql")  $escaped_string = mysql_real_escape_string ($string, $link);
++      if ($CONF['database_type'] == "mysqli")  $escaped_string = mysqli_real_escape_string ($link, $string);
+       if ($CONF['database_type'] == "pgsql")  $escaped_string = pg_escape_string ($string);
+    }
+    else
================================================================


More information about the pld-cvs-commit mailing list