Skip to content
This repository has been archived by the owner on Nov 2, 2020. It is now read-only.

Commit

Permalink
fix(Component): Fix parent::onRequest{Before,After} miss
Browse files Browse the repository at this point in the history
  • Loading branch information
Rhilip committed Aug 14, 2019
1 parent 687a2d0 commit 200926f
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 15 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@
- **Config:** Remove params `$throw` in Config()->get() (706cc9a)
- **RateLimit:** Change last param of isRateLimitHit and rate limit store Namespace (4dd571d)
- **Site:** Simple Category Detail get function (ffa6855)
- **Site:** Move Cat, Quality, PinnedTag cache to Config.runtime (da1d9a7)
- **Validator:** fix user input extract (81bdc8f)
- **View:** Make View extends BaseObject (0865cf9)
- **torrent/structure:** Use zui.tree instead javascript `$(this).next('ul').toggle()` (7b20b2c)
Expand All @@ -42,6 +43,9 @@
### Revert
- **Redis:** Remove view in redis , use other software install (c5d3378)

### Style
- **Redis:** rewrite namespace of cache keys (0c4e1a2)


<a name="v0.1.5-alpha"></a>
## [v0.1.5-alpha] - 2019-08-09
Expand Down
2 changes: 1 addition & 1 deletion apps/components/Auth.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,8 @@ public function onRequestBefore()

public function onRequestAfter()
{
$this->logSessionInfo();
parent::onRequestAfter();
$this->logSessionInfo();
}

/**
Expand Down
1 change: 1 addition & 0 deletions framework/Component/I18n.php
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,7 @@ class I18n extends Component

public function onRequestBefore()
{
parent::onRequestBefore();
$lastLang = null;
}

Expand Down
10 changes: 3 additions & 7 deletions framework/Database/BasePDOConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -65,9 +65,10 @@ public function onInitialize()
$this->_driverOptions = $this->driverOptions + $this->_defaultDriverOptions; // 设置驱动连接选项
}

public function onRequestAfter()
public function onRequestBefore()
{
$this->_recordData && $this->cleanSqlExecuteData();
parent::onRequestBefore();
$this->_sqlExecuteData = [];
}

// 创建连接
Expand Down Expand Up @@ -426,11 +427,6 @@ public function getRawSql()
return array_shift($sqlPrepareData);
}

public function cleanSqlExecuteData()
{
$this->_sqlExecuteData = [];
}

public function getExecuteData() {
return $this->_sqlExecuteData;
}
Expand Down
10 changes: 3 additions & 7 deletions framework/Redis/BaseRedisConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -221,9 +221,10 @@ public function onInitialize()
$this->_driverOptions = $this->driverOptions + $this->_defaultDriverOptions; // 设置驱动连接选项
}

public function onRequestAfter()
public function onRequestBefore()
{
$this->cleanCalledData();
parent::onRequestBefore();
$this->_calledData = [];
}

// 创建连接
Expand Down Expand Up @@ -317,11 +318,6 @@ public function getCalledData()
return $this->_calledData;
}

public function cleanCalledData()
{
$this->_recordData && $this->_calledData = [];
}

/**
* @param bool $recordData
*/
Expand Down

0 comments on commit 200926f

Please sign in to comment.