Commit 22839d92 by Alexander Makarov

Fixes #4812: Fixed search filter

parent fc03527a
......@@ -6,6 +6,7 @@ Yii Framework 2 debug extension Change Log
- Bug #1263: Fixed the issue that Gii and Debug modules might be affected by incompatible asset manager configuration (qiangxue)
- Bug #3956: Debug toolbar was affecting flash message removal (samdark)
- Bug #4812: Fixed search filter (samdark)
- Enh #2299: Date and time in request list is now never wrapped (samdark)
- Enh #3088: The debug module will manage their own URL rules now (qiangxue)
- Enh #3103: debugger panel is now not displayed when printing a page (githubjeka)
......
......@@ -26,10 +26,10 @@ class SameAs extends Base
*/
public function match($value)
{
if (!$this->partial) {
return (mb_strtolower($this->baseValue, 'utf8') == mb_strtolower($value, 'utf8'));
if ($this->partial) {
return mb_stripos($value, $this->baseValue, \Yii::$app->charset) !== false;
} else {
return (mb_strpos(mb_strtolower($value, 'utf8'), mb_strtolower($this->baseValue, 'utf8')) !== false);
return strcmp(mb_strtoupper($this->baseValue, \Yii::$app->charset), mb_strtoupper($value, \Yii::$app->charset)) === 0;
}
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment