[ros-diffs] [cfinck] 36717: Remove unneeded LOWER/strtolower calls. The fields are already declared as utf8_unicode_ci, so MySQL automatically compares case-insensitive by default.
cfinck at svn.reactos.org
cfinck at svn.reactos.org
Sat Oct 11 16:28:32 CEST 2008
Author: cfinck
Date: Sat Oct 11 09:28:31 2008
New Revision: 36717
URL: http://svn.reactos.org/svn/reactos?rev=36717&view=rev
Log:
Remove unneeded LOWER/strtolower calls.
The fields are already declared as utf8_unicode_ci, so MySQL automatically compares case-insensitive by default.
Modified:
trunk/web/reactos.org/htdocs/roscms/logon/user_register.php
Modified: trunk/web/reactos.org/htdocs/roscms/logon/user_register.php
URL: http://svn.reactos.org/svn/reactos/trunk/web/reactos.org/htdocs/roscms/logon/user_register.php?rev=36717&r1=36716&r2=36717&view=diff
==============================================================================
--- trunk/web/reactos.org/htdocs/roscms/logon/user_register.php [iso-8859-1] (original)
+++ trunk/web/reactos.org/htdocs/roscms/logon/user_register.php [iso-8859-1] Sat Oct 11 09:28:31 2008
@@ -61,7 +61,7 @@
// check if another account with the same username already exists
$sql_exist_name = "SELECT user_name
FROM users
- WHERE REPLACE(user_name, '_', ' ') = LOWER(REPLACE('" . mysql_real_escape_string($_POST['username'])."', '_', ' '))
+ WHERE REPLACE(user_name, '_', ' ') = REPLACE('" . mysql_real_escape_string($_POST['username'])."', '_', ' ')
LIMIT 1;";
$query_exist_name = mysql_query($sql_exist_name);
$result_exist_name = mysql_fetch_array($query_exist_name);
@@ -73,7 +73,7 @@
// check if the username is equal to a protected name
$sql_unsafe_name = "SELECT unsafe_name
FROM user_unsafenames
- WHERE unsafe_name = '".mysql_real_escape_string(strtolower($_POST['username']))."'
+ WHERE unsafe_name = '".mysql_real_escape_string($_POST['username'])."'
LIMIT 1;";
$query_unsafe_name = mysql_query($sql_unsafe_name);
$result_unsafe_name = mysql_fetch_array($query_unsafe_name);
More information about the Ros-diffs
mailing list