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

37 lines
799 B
PHP
Raw Normal View History

2011-09-17 10:45:08 +00:00
<?php defined('SYSPATH') or die('No direct access allowed.');
2013-03-19 22:35:19 +00:00
/**
*
* @package OSB
* @category Controllers
* @author Deon George
* @copyright (c) 2009-2013 Open Source Billing
* @license http://dev.osbill.net/license.html
*/
2011-09-17 10:45:08 +00:00
class Controller_Debug extends Controller_TemplateDefault {
public function before() {
if (! in_array(Config::sitemode(),array(Kohana::DEVELOPMENT,Kohana::TESTING)))
2012-11-09 23:13:57 +00:00
HTTP::redirect();
2011-09-17 10:45:08 +00:00
parent::before();
}
public function action_site() {
$output = '';
$output .= debug::vars(array(
'm'=>__METHOD__,
'site'=>Config::site(),
'siteID'=>Company::instance()->site(),
2011-09-17 10:45:08 +00:00
'siteMode'=>Config::sitemodeverbose(),
'modules'=>Config::appmodules(),
));
Block::add(array(
'title'=>_('Site debug'),
'body'=>$output,
));
}
}
?>