mirror of
https://github.com/Oreolek/ifhub.club.git
synced 2024-06-29 04:55:02 +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')){
|
if($sKeyRequest=getRequest('keyword')){
|
||||||
$sKeyRequest=urldecode($sKeyRequest);
|
$sKeyRequest=urldecode($sKeyRequest);
|
||||||
$aWords= (1===preg_match('##u', $sKeyRequest))
|
preg_match_all('~(\S+)~u',$sKeyRequest,$aWords);
|
||||||
? preg_split('#[\W_]+#Disu', $sKeyRequest, -1, PREG_SPLIT_NO_EMPTY)
|
|
||||||
: preg_split('#[\W_]+#Dis', $sKeyRequest, -1, PREG_SPLIT_NO_EMPTY);
|
if(is_array($aWords[1])&&isset($aWords[1])&&count($aWords[1])) {
|
||||||
if(is_array($aWords)&&count($aWords)) {
|
$aFilter['keyword']='%'.implode('%',$aWords[1]).'%';
|
||||||
$aFilter['keyword']='%'.implode('%',$aWords).'%';
|
|
||||||
} else {
|
} else {
|
||||||
unset($_REQUEST['keyword']);
|
unset($_REQUEST['keyword']);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue