Do not render debug toolbar in ajax request.

This commit is contained in:
octicon-git-branch(16/)
octicon-tag(16/)
Qiang Xue
2013-11-18 20:52:28 -05:00
gitea-unlock(16/)
parent b6cc8c0066
commit a69fa1bfed

2
extensions/debug/Module.php
View File

@@ -85,7 +85,7 @@ class Module extends \yii\base\Module
public function renderToolbar($event)
{
if (!$this->checkAccess()) {
if (!$this->checkAccess() || Yii::$app->getRequest()->getIsAjax()) {
return;
}
$url = Yii::$app->getUrlManager()->createUrl($this->id . '/default/toolbar', [