From f8ec8447451f9a53064184335061389fd2d0d70d Mon Sep 17 00:00:00 2001 From: Shish Date: Fri, 15 Dec 2023 21:23:26 +0000 Subject: [PATCH] [themes] move disable_left to base class --- core/basepage.php | 6 ++++++ themes/danbooru/page.class.php | 7 ------- themes/danbooru2/page.class.php | 6 ------ themes/futaba/page.class.php | 6 ------ themes/lite/page.class.php | 7 ------- 5 files changed, 6 insertions(+), 26 deletions(-) diff --git a/core/basepage.php b/core/basepage.php index a691336a8..c016f375c 100644 --- a/core/basepage.php +++ b/core/basepage.php @@ -113,6 +113,7 @@ public function set_redirect(string $redirect): void public string $title = ""; public string $heading = ""; public string $subheading = ""; + public bool $left_enabled = true; /** @var string[] */ public array $html_headers = []; @@ -157,6 +158,11 @@ public function flash(string $message): void $this->flash[] = $message; } + public function disable_left() + { + $this->left_enabled = false; + } + /** * Add a line to the HTML head section. */ diff --git a/themes/danbooru/page.class.php b/themes/danbooru/page.class.php index 3eee4ac05..b14a41726 100644 --- a/themes/danbooru/page.class.php +++ b/themes/danbooru/page.class.php @@ -50,13 +50,6 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ class Page extends BasePage { - public bool $left_enabled = true; - - public function disable_left() - { - $this->left_enabled = false; - } - public function render() { global $config; diff --git a/themes/danbooru2/page.class.php b/themes/danbooru2/page.class.php index d4575d37f..8bc283483 100644 --- a/themes/danbooru2/page.class.php +++ b/themes/danbooru2/page.class.php @@ -51,12 +51,6 @@ class Page extends BasePage { - public bool $left_enabled = true; - public function disable_left() - { - $this->left_enabled = false; - } - public function render() { global $config; diff --git a/themes/futaba/page.class.php b/themes/futaba/page.class.php index 83be4b913..4ff54ccbf 100644 --- a/themes/futaba/page.class.php +++ b/themes/futaba/page.class.php @@ -6,12 +6,6 @@ class Page extends BasePage { - public bool $left_enabled = true; - public function disable_left() - { - $this->left_enabled = false; - } - public function render() { $left_block_html = ""; diff --git a/themes/lite/page.class.php b/themes/lite/page.class.php index d6d606344..082a4b5f2 100644 --- a/themes/lite/page.class.php +++ b/themes/lite/page.class.php @@ -17,13 +17,6 @@ class Page extends BasePage { - public bool $left_enabled = true; - - public function disable_left() - { - $this->left_enabled = false; - } - public function render() { global $config;