diff --git a/models/RuleSearch.php b/models/RuleSearch.php index e5785a5e..4e14f67b 100644 --- a/models/RuleSearch.php +++ b/models/RuleSearch.php @@ -91,6 +91,6 @@ public function getRuleNames($searchQuery = null) $query->where(['LIKE', 'LOWER(name)', mb_strtolower($searchQuery)]); } - return $query->all(); + return $query->all($this->authManager->db); } } diff --git a/models/Search.php b/models/Search.php index 3a5dd1f7..eb5b6013 100644 --- a/models/Search.php +++ b/models/Search.php @@ -102,7 +102,7 @@ public function getNameList() ->select(['name']) ->andWhere(['type' => $this->type]) ->from($this->manager->itemTable) - ->all(); + ->all($this->manager->db); return ArrayHelper::map($rows, 'name', 'name'); } @@ -117,7 +117,7 @@ public function getRuleList() $rows = (new Query()) ->select(['name']) ->from($this->manager->ruleTable) - ->all(); + ->all($this->manager->db); return ArrayHelper::map($rows, 'name', 'name'); }