[ros-diffs] [dgoette] 417: fix more problems with case sensitive names
dgoette at svn.reactos.org
dgoette at svn.reactos.org
Mon May 18 15:12:54 CEST 2009
Author: dgoette
Date: Mon May 18 17:12:53 2009
New Revision: 417
URL: http://svn.reactos.org/svn/reactos?rev=417&view=rev
Log:
fix more problems with case sensitive names
Modified:
branches/danny-web/www/www.reactos.org/roscms/lib/backend/Backend_ViewEntryTable.class.php
branches/danny-web/www/www.reactos.org/roscms/lib/backend/Backend_ViewUserTable.class.php
Modified: branches/danny-web/www/www.reactos.org/roscms/lib/backend/Backend_ViewEntryTable.class.php
URL: http://svn.reactos.org/svn/reactos/branches/danny-web/www/www.reactos.org/roscms/lib/backend/Backend_ViewEntryTable.class.php?rev=417&r1=416&r2=417&view=diff
==============================================================================
--- branches/danny-web/www/www.reactos.org/roscms/lib/backend/Backend_ViewEntryTable.class.php [iso-8859-1] (original)
+++ branches/danny-web/www/www.reactos.org/roscms/lib/backend/Backend_ViewEntryTable.class.php [iso-8859-1] Mon May 18 17:12:53 2009
@@ -568,7 +568,7 @@
// user
case 'u':
// get user_id
- $stmt=&DBConnection::getInstance()->prepare("SELECT id FROM ".ROSCMST_USERS." WHERE name = :user_name LIMIT 1");
+ $stmt=&DBConnection::getInstance()->prepare("SELECT id FROM ".ROSCMST_USERS." WHERE LOWER(name) = LOWER(:user_name) LIMIT 1");
$stmt->bindParam('user_name',$type_c,PDO::PARAM_STR);
$stmt->execute();
$user_id = $stmt->fetchColumn();
Modified: branches/danny-web/www/www.reactos.org/roscms/lib/backend/Backend_ViewUserTable.class.php
URL: http://svn.reactos.org/svn/reactos/branches/danny-web/www/www.reactos.org/roscms/lib/backend/Backend_ViewUserTable.class.php?rev=417&r1=416&r2=417&view=diff
==============================================================================
--- branches/danny-web/www/www.reactos.org/roscms/lib/backend/Backend_ViewUserTable.class.php [iso-8859-1] (original)
+++ branches/danny-web/www/www.reactos.org/roscms/lib/backend/Backend_ViewUserTable.class.php [iso-8859-1] Mon May 18 17:12:53 2009
@@ -287,7 +287,7 @@
// set order field
switch ($type_c) {
case 'name': // accóunt name
- $this->sql_order .= " u.name ";
+ $this->sql_order .= " LOWER(u.name) ";
break;
case 'real-name': // real name
$this->sql_order .= " u.fullname ";
@@ -406,7 +406,8 @@
break;
case 'name': // account name
default:
- $this->sql_where .= " u.name";
+ $this->sql_where .= " LOWER(u.name)";
+ $searchtext = strtolower($searchtext);
break;
} // end switch
$this->sql_where .= " LIKE ".DBConnection::getInstance()->quote('%'.$searchtext.'%',PDO::PARAM_STR)." ";
More information about the Ros-diffs
mailing list