Skip to content

Commit 1f37efb

Browse files
committed
Update
- Поиск сломал страницу просмотра #10
1 parent 8606491 commit 1f37efb

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ apexwire/yii2-restclient changelog
33

44
## 0.3 Under development
55

6+
- Поиск сломал страницу просмотра #10
67

78
## 0.2 2016-03-17
89

src/Command.php

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -60,11 +60,9 @@ public function queryAll($options = [])
6060
public function queryOne($options = [])
6161
{
6262
//TODO: use $this->getOldPrimaryKey() yii\restclient\ActiveRecord
63-
$url = $this->index . '/' . ArrayHelper::getValue($this->queryParts, 'id');
64-
ArrayHelper::remove($this->queryParts, 'id');
65-
$options = array_merge($this->queryParts, $options);
63+
$url = $this->index . '/' . current($this->queryParts);
6664

67-
return $this->db->get($url, $options);
65+
return $this->db->get($url);
6866
}
6967

7068
/**

0 commit comments

Comments
 (0)