Skip to content

Commit

Permalink
Only show toolbar for text/html response types.
Browse files Browse the repository at this point in the history
  • Loading branch information
pnomolos committed Mar 31, 2012
1 parent 03fc874 commit a1b3763
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion config/bootstrap/dispatcher.php
Expand Up @@ -50,7 +50,11 @@

// Render the toolbar (unless it's an asset from the li3_perf library)
// Why? See li3_perf\extensions\util\Asset
if(!isset($params['request']->params['asset_type'])) {
$content_type = isset($result->headers['Content-Type']) ? join('', explode(';', $result->headers['Content-Type'], 1)) : '';
if(
!isset($params['request']->params['asset_type']) &&
(!$content_type || $content_type == 'text/html')
)
$skip = false;
$li3_perf = Libraries::get('li3_perf');
if(isset($li3_perf['skip'])) {
Expand Down

0 comments on commit a1b3763

Please sign in to comment.