[Fusionforge-commits] r7857 - trunk/gforge/www/account

Roland Mas lolando at libremir.placard.fr.eu.org
Fri Jun 19 11:54:57 CEST 2009


Author: lolando
Date: 2009-06-19 11:54:57 +0200 (Fri, 19 Jun 2009)
New Revision: 7857

Modified:
   trunk/gforge/www/account/change_email-complete.php
   trunk/gforge/www/account/lostlogin.php
   trunk/gforge/www/account/unsubscribe.php
Log:
Semi-automated db_query_params() transition for simple cases

Modified: trunk/gforge/www/account/change_email-complete.php
===================================================================
--- trunk/gforge/www/account/change_email-complete.php	2009-06-19 09:54:48 UTC (rev 7856)
+++ trunk/gforge/www/account/change_email-complete.php	2009-06-19 09:54:57 UTC (rev 7857)
@@ -39,7 +39,9 @@
 }
 $confirm_hash = html_clean_hash_string($confirm_hash);
 
-$res_user = db_query("SELECT * FROM users WHERE confirm_hash='$confirm_hash'");
+$res_user = db_query_params ('SELECT * FROM users WHERE confirm_hash=$1',
+			array($confirm_hash)) ;
+
 if (db_numrows($res_user) > 1) {
 	exit_error("Error","This confirm hash exists more than once.");
 }

Modified: trunk/gforge/www/account/lostlogin.php
===================================================================
--- trunk/gforge/www/account/lostlogin.php	2009-06-19 09:54:48 UTC (rev 7856)
+++ trunk/gforge/www/account/lostlogin.php	2009-06-19 09:54:57 UTC (rev 7857)
@@ -41,7 +41,9 @@
 // Remove noise from hash produced by buggy mail clients
 $confirm_hash = html_clean_hash_string($confirm_hash);
 
-$res_user = db_query("SELECT * FROM users WHERE confirm_hash='$confirm_hash'");
+$res_user = db_query_params ('SELECT * FROM users WHERE confirm_hash=$1',
+			array($confirm_hash)) ;
+
 if (db_numrows($res_user) > 1) {
 	exit_error(
 		_('ERROR'),

Modified: trunk/gforge/www/account/unsubscribe.php
===================================================================
--- trunk/gforge/www/account/unsubscribe.php	2009-06-19 09:54:48 UTC (rev 7856)
+++ trunk/gforge/www/account/unsubscribe.php	2009-06-19 09:54:57 UTC (rev 7857)
@@ -39,7 +39,9 @@
 
 $confirm_hash = html_clean_hash_string($confirm_hash);
 
-$res_user = db_query("SELECT * FROM users WHERE confirm_hash='$confirm_hash'");
+$res_user = db_query_params ('SELECT * FROM users WHERE confirm_hash=$1',
+			array($confirm_hash)) ;
+
 if (db_numrows($res_user) > 1) {
 	exit_error("Error","This confirm hash exists more than once.");
 }




More information about the Fusionforge-commits mailing list