Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Running content-type filter in the end as well #119

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 7 additions & 3 deletions YiiDebugToolbar.php
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@
* @version $Id$
* @package YiiDebugToolbar
* @since 1.1.7
*
* @property YiiDebugToolbarRoute $owner Usually the owner of this widget is the debug-toolbar log route
*/
class YiiDebugToolbar extends CWidget
{
Expand Down Expand Up @@ -111,9 +113,11 @@ public function init()
*/
public function run()
{
$this->render('main', array(
'panels' => $this->getPanels()
));
if (!($this->owner instanceof YiiDebugToolbarRoute) || $this->owner->checkContentTypeWhitelist()) {
$this->render('main', array(
'panels' => $this->getPanels()
));
}
}

/**
Expand Down
2 changes: 1 addition & 1 deletion YiiDebugToolbarRoute.php
Original file line number Diff line number Diff line change
Expand Up @@ -193,7 +193,7 @@ protected function processLogs($logs)
$this->getToolbarWidget()->run();
}

private function checkContentTypeWhitelist()
public function checkContentTypeWhitelist()
{
$contentType = '';

Expand Down