From b76ee95c76e5c0c4101a805eb69fd22e0b0dc80b Mon Sep 17 00:00:00 2001 From: Shish Date: Sat, 18 Jun 2016 12:25:54 +0100 Subject: [PATCH] fix and use get_all_html_headers() --- core/page.class.php | 3 ++- themes/danbooru/layout.class.php | 8 +------- themes/danbooru2/layout.class.php | 8 +------- themes/default/layout.class.php | 7 +------ themes/futaba/layout.class.php | 7 +------ themes/lite/layout.class.php | 7 +------ themes/material/layout.class.php | 9 ++------- themes/warm/layout.class.php | 7 +------ 8 files changed, 10 insertions(+), 46 deletions(-) diff --git a/core/page.class.php b/core/page.class.php index cca68f63..725630a5 100644 --- a/core/page.class.php +++ b/core/page.class.php @@ -225,8 +225,9 @@ class Page { */ public function get_all_html_headers() { $data = ''; + ksort($this->html_headers); foreach ($this->html_headers as $line) { - $data .= $line . "\n"; + $data .= "\t\t" . $line . "\n"; } return $data; } diff --git a/themes/danbooru/layout.class.php b/themes/danbooru/layout.class.php index afd13b56..ce8fa61e 100644 --- a/themes/danbooru/layout.class.php +++ b/themes/danbooru/layout.class.php @@ -50,13 +50,7 @@ class Layout { //$base_href = $config->get_string('base_href'); $data_href = get_base_href(); $contact_link = contact_link(); - - - $header_html = ""; - ksort($page->html_headers); - foreach($page->html_headers as $line) { - $header_html .= "\t\t$line\n"; - } + $header_html = $page->get_all_html_headers(); $left_block_html = ""; $user_block_html = ""; diff --git a/themes/danbooru2/layout.class.php b/themes/danbooru2/layout.class.php index 58862221..73433c42 100644 --- a/themes/danbooru2/layout.class.php +++ b/themes/danbooru2/layout.class.php @@ -50,13 +50,7 @@ class Layout { //$base_href = $config->get_string('base_href'); //$data_href = get_base_href(); $contact_link = contact_link(); - - - $header_html = ""; - ksort($page->html_headers); - foreach($page->html_headers as $line) { - $header_html .= "\t\t$line\n"; - } + $header_html = $page->get_all_html_headers(); $left_block_html = ""; $user_block_html = ""; diff --git a/themes/default/layout.class.php b/themes/default/layout.class.php index 27751a02..4dc94739 100644 --- a/themes/default/layout.class.php +++ b/themes/default/layout.class.php @@ -14,12 +14,7 @@ class Layout { //$theme_name = $config->get_string('theme', 'default'); //$data_href = get_base_href(); $contact_link = contact_link(); - - $header_html = ""; - ksort($page->html_headers); - foreach($page->html_headers as $line) { - $header_html .= "\t\t$line\n"; - } + $header_html = $page->get_all_html_headers(); $left_block_html = ""; $main_block_html = ""; diff --git a/themes/futaba/layout.class.php b/themes/futaba/layout.class.php index 86082eda..cd79d626 100644 --- a/themes/futaba/layout.class.php +++ b/themes/futaba/layout.class.php @@ -7,12 +7,7 @@ class Layout { $theme_name = $config->get_string('theme', 'default'); $data_href = get_base_href(); $contact_link = contact_link(); - - $header_html = ""; - ksort($page->html_headers); - foreach($page->html_headers as $line) { - $header_html .= "\t\t$line\n"; - } + $header_html = $page->get_all_html_headers(); $left_block_html = ""; $main_block_html = ""; diff --git a/themes/lite/layout.class.php b/themes/lite/layout.class.php index 6a0953e1..9606456a 100644 --- a/themes/lite/layout.class.php +++ b/themes/lite/layout.class.php @@ -21,12 +21,7 @@ class Layout { $site_name = $config->get_string('title'); $data_href = get_base_href(); $contact_link = contact_link(); - - $header_html = ""; - ksort($page->html_headers); - foreach($page->html_headers as $line) { - $header_html .= "\t\t{$line}\n"; - } + $header_html = $page->get_all_html_headers(); $menu = "