mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-26 03:30:48 +03:00
Fix кириллического поиска по заголовкам talk-писем
This commit is contained in:
parent
8e3c8b643a
commit
bafe4eacfc
|
@ -204,11 +204,10 @@ class ActionTalk extends Action {
|
|||
}
|
||||
if($sKeyRequest=getRequest('keyword')){
|
||||
$sKeyRequest=urldecode($sKeyRequest);
|
||||
$aWords= (1===preg_match('##u', $sKeyRequest))
|
||||
? preg_split('#[\W_]+#Disu', $sKeyRequest, -1, PREG_SPLIT_NO_EMPTY)
|
||||
: preg_split('#[\W_]+#Dis', $sKeyRequest, -1, PREG_SPLIT_NO_EMPTY);
|
||||
if(is_array($aWords)&&count($aWords)) {
|
||||
$aFilter['keyword']='%'.implode('%',$aWords).'%';
|
||||
preg_match_all('~(\S+)~u',$sKeyRequest,$aWords);
|
||||
|
||||
if(is_array($aWords[1])&&isset($aWords[1])&&count($aWords[1])) {
|
||||
$aFilter['keyword']='%'.implode('%',$aWords[1]).'%';
|
||||
} else {
|
||||
unset($_REQUEST['keyword']);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue