Skip to content

Commit

Permalink
dev
Browse files Browse the repository at this point in the history
  • Loading branch information
skeeks-semenov committed Dec 8, 2023
1 parent 92c14f4 commit 4677116
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/CmsSearchComponent.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
use skeeks\cms\search\assets\CmsSearchAsset;
use yii\data\ActiveDataProvider;
use yii\helpers\ArrayHelper;
use yii\web\NotFoundHttpException;
use yii\widgets\ActiveForm;

/**
Expand Down Expand Up @@ -154,6 +155,10 @@ public function getSearchQuery()
public function buildElementsQuery(\yii\db\ActiveQuery $activeQuery)
{
$where = [];

if (!\Yii::$app->request->referrer) {
throw new NotFoundHttpException("Поисковый запрос некорректный");
}

$searchQueryArr = explode(" ", $this->searchQuery);
if ($searchQueryArr) {
Expand Down

0 comments on commit 4677116

Please sign in to comment.