Commit 665aefbb by Qiang Xue

Fixes #3042: `yii\widgets\Pjax` should end application right after it finishes…

Fixes #3042: `yii\widgets\Pjax` should end application right after it finishes responding to a pjax request
parent ce9a8f20
...@@ -4,6 +4,7 @@ Yii Framework 2 Change Log ...@@ -4,6 +4,7 @@ Yii Framework 2 Change Log
2.0.0-rc under development 2.0.0-rc under development
-------------------------- --------------------------
- Bug #3042: `yii\widgets\Pjax` should end application right after it finishes responding to a pjax request (qiangxue)
- Bug #3066: `yii\db\mssql\Schema::getTableSchema()` should return null when the table does not exist (qiangxue) - Bug #3066: `yii\db\mssql\Schema::getTableSchema()` should return null when the table does not exist (qiangxue)
- Bug #3091: Fixed inconsistent treatment of `Widget::run()` when a widget is used as a container and as a self-contained object (qiangxue) - Bug #3091: Fixed inconsistent treatment of `Widget::run()` when a widget is used as a container and as a self-contained object (qiangxue)
- Bug #3128: Fixed the bug that `defaultRoles` set in RBAC manager was not working as specified (qiangxue) - Bug #3128: Fixed the bug that `defaultRoles` set in RBAC manager was not working as specified (qiangxue)
......
...@@ -136,18 +136,13 @@ class Pjax extends Widget ...@@ -136,18 +136,13 @@ class Pjax extends Widget
// only need the content enclosed within this widget // only need the content enclosed within this widget
$response = Yii::$app->getResponse(); $response = Yii::$app->getResponse();
$level = ob_get_level();
$response->clearOutputBuffers(); $response->clearOutputBuffers();
$response->setStatusCode(200); $response->setStatusCode(200);
$response->format = Response::FORMAT_HTML; $response->format = Response::FORMAT_HTML;
$response->content = $content; $response->content = $content;
$response->send(); $response->send();
// re-enable output buffer to capture content after this widget Yii::$app->end();
for (; $level > 0; --$level) {
ob_start();
ob_implicit_flush(false);
}
} }
/** /**
......
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