This repository has been archived on 2024-04-08. You can view files and clone it, but cannot push or open issues or pull requests.
khosb/application/classes/controller/debug.php
2012-01-12 19:53:53 +11:00

29 lines
616 B
PHP

<?php defined('SYSPATH') or die('No direct access allowed.');
class Controller_Debug extends Controller_TemplateDefault {
public function before() {
if (! in_array(Config::sitemode(),array(Kohana::DEVELOPMENT,Kohana::TESTING)))
$this->request->redirect();
parent::before();
}
public function action_site() {
$output = '';
$output .= debug::vars(array(
'm'=>__METHOD__,
'site'=>Config::site(),
'siteID'=>Config::siteid(),
'siteMode'=>Config::sitemodeverbose(),
'modules'=>Config::appmodules(),
));
Block::add(array(
'title'=>_('Site debug'),
'body'=>$output,
));
}
}
?>