2013-12-23 02:55:53 +01:00
|
|
|
<?php
|
|
|
|
|
|
|
|
// Flush console messages
|
2016-04-18 01:44:45 +02:00
|
|
|
Router\get_action('flush-console', function () {
|
2013-12-23 02:55:53 +01:00
|
|
|
@unlink(DEBUG_FILENAME);
|
|
|
|
Response\redirect('?action=console');
|
|
|
|
});
|
|
|
|
|
|
|
|
// Display console
|
2016-04-18 01:44:45 +02:00
|
|
|
Router\get_action('console', function () {
|
2013-12-23 02:55:53 +01:00
|
|
|
Response\html(Template\layout('console', array(
|
|
|
|
'content' => @file_get_contents(DEBUG_FILENAME),
|
2014-11-15 14:32:31 +01:00
|
|
|
'nb_unread_items' => Model\Item\count_by_status('unread'),
|
2014-12-10 16:49:22 +01:00
|
|
|
'menu' => 'config',
|
2013-12-23 02:55:53 +01:00
|
|
|
'title' => t('Console')
|
|
|
|
)));
|
|
|
|
});
|