diff --git a/core/page.class.php b/core/page.class.php index 3bd5c2ca..b22fff3c 100644 --- a/core/page.class.php +++ b/core/page.class.php @@ -79,7 +79,7 @@ class GenericPage { header("Cache-control: no-cache"); usort($this->blocks, "blockcmp"); $layout = new Layout(); - $layout->display_page($this); + $layout->display_page($context); break; case "data": if(!is_null($this->filename)) { diff --git a/themes/danbooru/layout.class.php b/themes/danbooru/layout.class.php index b3320201..4231da2a 100644 --- a/themes/danbooru/layout.class.php +++ b/themes/danbooru/layout.class.php @@ -42,8 +42,10 @@ Tips * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ class Layout { - public function display_page($page) { - global $config; + public function display_page($context) { + $page = $context->page; + $config = $context->config; + $theme_name = $config->get_string('theme'); $base_href = $config->get_string('base_href'); $data_href = get_base_href(); diff --git a/themes/default/layout.class.php b/themes/default/layout.class.php index 07b61a72..167011c8 100644 --- a/themes/default/layout.class.php +++ b/themes/default/layout.class.php @@ -1,8 +1,10 @@ page; + $config = $context->config; + $theme_name = $config->get_string('theme', 'default'); $data_href = get_base_href(); $contact_link = $config->get_string('contact_link'); diff --git a/themes/futaba/layout.class.php b/themes/futaba/layout.class.php index a1d27860..0a6ea41c 100644 --- a/themes/futaba/layout.class.php +++ b/themes/futaba/layout.class.php @@ -1,8 +1,10 @@ page; + $config = $context->config; + $theme_name = $config->get_string('theme', 'default'); $data_href = get_base_href(); $contact_link = $config->get_string('contact_link'); diff --git a/themes/minimal/layout.class.php b/themes/minimal/layout.class.php index 4a62a41d..306da52f 100644 --- a/themes/minimal/layout.class.php +++ b/themes/minimal/layout.class.php @@ -1,8 +1,10 @@ page; + $config = $context->config; + $theme_name = $config->get_string('theme', 'default'); $data_href = get_base_href(); $contact_link = $config->get_string('contact_link');