2014-02-11 13:40:29 +01:00
|
|
|
<?php
|
|
|
|
/*
|
|
|
|
* run.php
|
|
|
|
*
|
|
|
|
* This file runs every request to register runtime functionality
|
|
|
|
*
|
|
|
|
*/
|
|
|
|
|
2014-02-11 16:21:36 +01:00
|
|
|
use Icinga\Application\Icinga;
|
|
|
|
use Icinga\Authentication\Manager as AuthManager;
|
|
|
|
use Icinga\Web\Hook;
|
|
|
|
|
|
|
|
if (Icinga::app()->isCli()) {
|
|
|
|
return;
|
|
|
|
}
|
|
|
|
|
|
|
|
if (AuthManager::getInstance()->isAuthenticated()) {
|
|
|
|
Hook::register(
|
|
|
|
Hook::TARGET_LAYOUT_TOPBAR,
|
|
|
|
'monitoring-topbar',
|
|
|
|
'Icinga\\Module\\Monitoring\\Web\\Hook\\TopBar'
|
|
|
|
);
|
|
|
|
}
|