Updates logs plugin to new pages system, bumps version
parent
2f4b0b7aef
commit
65f0758e82
|
@ -1,5 +1,13 @@
|
||||||
<?php
|
<?php
|
||||||
|
|
||||||
|
// Logs plugin bootstrap
|
||||||
|
// (here we add any plugin autoloader, if needed)
|
||||||
|
|
||||||
|
// List here all the controllers in "/controllers/" that we need as pages
|
||||||
|
$GLOBALS['plugin_controllers']['logs'] = [
|
||||||
|
'logs'
|
||||||
|
];
|
||||||
|
|
||||||
// Logger plugin bootstrap
|
// Logger plugin bootstrap
|
||||||
register_hook('logger.system_init', function(array $context) {
|
register_hook('logger.system_init', function(array $context) {
|
||||||
// Load plugin-specific LoggerFactory class
|
// Load plugin-specific LoggerFactory class
|
||||||
|
@ -11,12 +19,6 @@ register_hook('logger.system_init', function(array $context) {
|
||||||
$GLOBALS['user_IP'] = $userIP;
|
$GLOBALS['user_IP'] = $userIP;
|
||||||
});
|
});
|
||||||
|
|
||||||
// Add to allowed URLs
|
|
||||||
register_hook('filter_allowed_urls', function($urls) {
|
|
||||||
$urls[] = 'logs';
|
|
||||||
return $urls;
|
|
||||||
});
|
|
||||||
|
|
||||||
// Configuration for top menu injection
|
// Configuration for top menu injection
|
||||||
define('LOGS_MAIN_MENU_SECTION', 'main'); // section of the top menu
|
define('LOGS_MAIN_MENU_SECTION', 'main'); // section of the top menu
|
||||||
define('LOGS_MAIN_MENU_POSITION', 20); // lower = earlier in menu
|
define('LOGS_MAIN_MENU_POSITION', 20); // lower = earlier in menu
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
{
|
{
|
||||||
"name": "Logger Plugin",
|
"name": "Logger Plugin",
|
||||||
"version": "1.0.0",
|
"version": "1.0.1",
|
||||||
"enabled": true,
|
"enabled": true,
|
||||||
"description": "Initializes logging system via LoggerFactory"
|
"description": "Initializes logging system via LoggerFactory"
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue