Skip to content

Commit

Permalink
Merge pull request croogo#31 from real34/json-layout-fix
Browse files Browse the repository at this point in the history
Json layout fix
  • Loading branch information
fahad19 committed Nov 5, 2011
2 parents ea5b5ac + e58cd65 commit dca682d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions app_controller.php
Original file line number Diff line number Diff line change
Expand Up @@ -130,6 +130,19 @@ public function beforeFilter() {
Configure::write('Config.language', $this->params['locale']);
}
}
/**
* afterFilter callback
* Disable debug mode on JSON pages to prevent the script execution time to be appended to the page
*
* @see http://croogo.lighthouseapp.com/projects/32818/tickets/216
* @return void
*/
public function afterFilter() {
parent::afterFilter();
if (!empty($this->params['url']['ext']) && $this->params['url']['ext'] === 'json') {
Configure::write('debug', 0);
}
}
/**
* blackHoleCallback for SecurityComponent
*
Expand Down

0 comments on commit dca682d

Please sign in to comment.