diff options
Diffstat (limited to 'ui/include/page_header.php')
-rw-r--r-- | ui/include/page_header.php | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/ui/include/page_header.php b/ui/include/page_header.php index f9275281ac6..efb96f340a3 100644 --- a/ui/include/page_header.php +++ b/ui/include/page_header.php @@ -19,8 +19,6 @@ **/ -CSession::start(); - if (!isset($page['type'])) { $page['type'] = PAGE_TYPE_HTML; } @@ -85,13 +83,14 @@ switch ($page['type']) { header('X-Content-Type-Options: nosniff'); header('X-XSS-Protection: 1; mode=block'); - if (X_FRAME_OPTIONS !== null) { - if (strcasecmp(X_FRAME_OPTIONS, 'SAMEORIGIN') == 0 || strcasecmp(X_FRAME_OPTIONS, 'DENY') == 0) { - $x_frame_options = X_FRAME_OPTIONS; + if (CSettingsHelper::getGlobal(CSettingsHelper::X_FRAME_OPTIONS) !== '') { + if (strcasecmp(CSettingsHelper::get(CSettingsHelper::X_FRAME_OPTIONS), 'SAMEORIGIN') == 0 + || strcasecmp(CSettingsHelper::get(CSettingsHelper::X_FRAME_OPTIONS), 'DENY') == 0) { + $x_frame_options = CSettingsHelper::get(CSettingsHelper::X_FRAME_OPTIONS); } else { $x_frame_options = 'SAMEORIGIN'; - $allowed_urls = explode(',', X_FRAME_OPTIONS); + $allowed_urls = explode(',', CSettingsHelper::get(CSettingsHelper::X_FRAME_OPTIONS)); $url_to_check = array_key_exists('HTTP_REFERER', $_SERVER) ? parse_url($_SERVER['HTTP_REFERER'], PHP_URL_HOST) : null; @@ -133,14 +132,14 @@ if ($page['type'] == PAGE_TYPE_HTML) { global $DB; if (!empty($DB['DB'])) { - $config = select_config(); $theme = getUserTheme(CWebUser::$data); - $pageHeader->addStyle(getTriggerSeverityCss($config)); - $pageHeader->addStyle(getTriggerStatusCss($config)); + $pageHeader->addStyle(getTriggerSeverityCss()); + $pageHeader->addStyle(getTriggerStatusCss()); // perform Zabbix server check only for standard pages - if ($is_standard_page && $config['server_check_interval'] && !empty($ZBX_SERVER) && !empty($ZBX_SERVER_PORT)) { + if ($is_standard_page && CSettingsHelper::get(CSettingsHelper::SERVER_CHECK_INTERVAL) && !empty($ZBX_SERVER) + && !empty($ZBX_SERVER_PORT)) { $page['scripts'][] = 'servercheck.js'; } } @@ -167,7 +166,7 @@ if ($page['type'] == PAGE_TYPE_HTML) { ->getUrl() ); - if ($page['scripts']) { + if (array_key_exists('scripts', $page) && $page['scripts']) { $pageHeader->addJsFile((new CUrl('jsLoader.php')) ->setArgument('ver', ZABBIX_VERSION) ->setArgument('lang', CWebUser::$data['lang']) |