mirror of
https://github.com/Sarjuuk/aowow.git
synced 2025-11-29 15:58:16 +08:00
Profiler/Profiles
* allow strings with less then 3 chars in name search * store name as binary to allow accent-sensitive search (note: guilds and arenateams have the same issue but utf8mb4_bin can't be applied blindly as the search also becomes case-sensitive (wich is already handled for profiles))
This commit is contained in:
@@ -324,8 +324,8 @@ class ProfileListFilter extends Filter
|
|||||||
// name [str] - the table is case sensitive. Since i down't want to destroy indizes, lets alter the search terms
|
// name [str] - the table is case sensitive. Since i down't want to destroy indizes, lets alter the search terms
|
||||||
if (!empty($_v['na']))
|
if (!empty($_v['na']))
|
||||||
{
|
{
|
||||||
$lower = $this->modularizeString([$k.'.name'], Util::lower($_v['na']), !empty($_v['ex']) && $_v['ex'] == 'on');
|
$lower = $this->modularizeString([$k.'.name'], Util::lower($_v['na']), !empty($_v['ex']) && $_v['ex'] == 'on', true);
|
||||||
$proper = $this->modularizeString([$k.'.name'], Util::ucWords($_v['na']), !empty($_v['ex']) && $_v['ex'] == 'on');
|
$proper = $this->modularizeString([$k.'.name'], Util::ucWords($_v['na']), !empty($_v['ex']) && $_v['ex'] == 'on', true);
|
||||||
|
|
||||||
$parts[] = ['OR', $lower, $proper];
|
$parts[] = ['OR', $lower, $proper];
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1827,7 +1827,7 @@ CREATE TABLE `aowow_profiler_profiles` (
|
|||||||
`copy` int(10) unsigned DEFAULT NULL,
|
`copy` int(10) unsigned DEFAULT NULL,
|
||||||
`icon` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
`icon` varchar(50) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
||||||
`user` int(11) unsigned DEFAULT NULL,
|
`user` int(11) unsigned DEFAULT NULL,
|
||||||
`name` varchar(50) COLLATE utf8mb4_unicode_ci NOT NULL,
|
`name` varchar(50) COLLATE utf8mb4_bin NOT NULL,
|
||||||
`race` tinyint(3) unsigned NOT NULL,
|
`race` tinyint(3) unsigned NOT NULL,
|
||||||
`class` tinyint(3) unsigned NOT NULL,
|
`class` tinyint(3) unsigned NOT NULL,
|
||||||
`level` tinyint(3) unsigned NOT NULL,
|
`level` tinyint(3) unsigned NOT NULL,
|
||||||
|
|||||||
1
setup/updates/1524907872_01.sql
Normal file
1
setup/updates/1524907872_01.sql
Normal file
@@ -0,0 +1 @@
|
|||||||
|
ALTER TABLE `aowow_profiler_profiles` CHANGE COLUMN `name` `name` VARCHAR(50) NOT NULL COLLATE 'utf8mb4_bin' AFTER `user`;
|
||||||
Reference in New Issue
Block a user