2013-12-23 02:55:53 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
use PicoFarad\Router;
|
|
|
|
use PicoFarad\Response;
|
|
|
|
use PicoFarad\Request;
|
|
|
|
use PicoFarad\Session;
|
2014-03-17 02:56:43 +01:00
|
|
|
use PicoFarad\Template;
|
2013-12-23 02:55:53 +01:00
|
|
|
|
|
|
|
// Flush console messages
|
|
|
|
Router\get_action('flush-console', function() {
|
|
|
|
|
|
|
|
@unlink(DEBUG_FILENAME);
|
|
|
|
Response\redirect('?action=console');
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
// Display console
|
|
|
|
Router\get_action('console', function() {
|
|
|
|
|
|
|
|
Response\html(Template\layout('console', array(
|
|
|
|
'content' => @file_get_contents(DEBUG_FILENAME),
|
2014-12-10 16:49:22 +01:00
|
|
|
'menu' => 'config',
|
2013-12-23 02:55:53 +01:00
|
|
|
'title' => t('Console')
|
|
|
|
)));
|
|
|
|
});
|