[TASK] Use LOWER instead of LCASE 53/37953/2
authorAndreas Fernandez <a.fernandez@scripting-base.de>
Thu, 19 Mar 2015 13:47:35 +0000 (14:47 +0100)
committerJigal van Hemert <jigal.van.hemert@typo3.org>
Sun, 22 Mar 2015 14:55:29 +0000 (15:55 +0100)
Most databases have the lowercase function "LOWER", but MySQL has
also "LCASE", which is an alias for LOWER. Use LOWER now to
have a common method call.

Resolves: #65844
Releases: master, 6.2
Change-Id: I84aec1164817252b18e5affe804791e78dab94b0
Reviewed-on: http://review.typo3.org/37953
Reviewed-by: Stephan GroƟberndt <stephan@grossberndt.de>
Reviewed-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Tested-by: Mathias Schreiber <mathias.schreiber@wmdb.de>
Reviewed-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
Tested-by: Jigal van Hemert <jigal.van.hemert@typo3.org>
typo3/sysext/backend/Classes/Search/LiveSearch/LiveSearch.php
typo3/sysext/recordlist/Classes/RecordList/AbstractDatabaseRecordList.php

index 62d16f7..63b4d07 100644 (file)
@@ -314,7 +314,7 @@ class LiveSearch {
                                if (isset($GLOBALS['TCA'][$tableName]['columns'][$fieldName])) {
                                        $fieldConfig = &$GLOBALS['TCA'][$tableName]['columns'][$fieldName]['config'];
                                        // Check whether search should be case-sensitive or not
-                                       $format = 'LCASE(%s) LIKE LCASE(%s)';
+                                       $format = 'LOWER(%s) LIKE LOWER(%s)';
                                        if (is_array($fieldConfig['search'])) {
                                                if (in_array('case', $fieldConfig['search'])) {
                                                        $format = '%s LIKE %s';
index ced8fb7..0488fab 100644 (file)
@@ -699,7 +699,7 @@ class AbstractDatabaseRecordList extends AbstractRecordList {
                                        foreach ($searchableFields as $fieldName) {
                                                if (isset($GLOBALS['TCA'][$table]['columns'][$fieldName])) {
                                                        $fieldConfig = &$GLOBALS['TCA'][$table]['columns'][$fieldName]['config'];
-                                                       $format = 'LCASE(%s) LIKE LCASE(%s)';
+                                                       $format = 'LOWER(%s) LIKE LOWER(%s)';
                                                        if (is_array($fieldConfig['search'])) {
                                                                if (in_array('case', $fieldConfig['search'])) {
                                                                        $format = '%s LIKE %s';