From 8fdf1db0329ae1d444b3c89f36c068ad2c33eb24 Mon Sep 17 00:00:00 2001 From: Hypolite Petovan Date: Mon, 4 Mar 2019 06:47:40 -0500 Subject: [PATCH 1/2] Restore module custom title display --- src/App.php | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/src/App.php b/src/App.php index 6945dc459d..cfb04efcd7 100644 --- a/src/App.php +++ b/src/App.php @@ -570,14 +570,14 @@ class App $interval = 40000; } - // compose the page title from the sitename and the - // current module called - if (!$this->module == '') { - $this->page['title'] = $this->config->get('config', 'sitename') . ' (' . $this->module . ')'; - } else { - $this->page['title'] = $this->config->get('config', 'sitename'); + // Default title: current module called + if (empty($this->page['title']) && $this->module) { + $this->page['title'] = ucfirst($this->module); } + // Prepend the sitename to the page title + $this->page['title'] = $this->config->get('config', 'sitename') . ($this->page['title'] ? ' | ' . $this->page['title'] : ''); + if (!empty(Core\Renderer::$theme['stylesheet'])) { $stylesheet = Core\Renderer::$theme['stylesheet']; } else { From a5d86fe7878c9d599ae0b05d698bd853df12caec Mon Sep 17 00:00:00 2001 From: Philipp Date: Mon, 4 Mar 2019 07:54:51 -0500 Subject: [PATCH 2/2] Add default value for config.sitename in App::initHead - Protect $this->page['title'] even more Co-Authored-By: MrPetovan --- src/App.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/App.php b/src/App.php index cfb04efcd7..b3eed92a0d 100644 --- a/src/App.php +++ b/src/App.php @@ -576,7 +576,7 @@ class App } // Prepend the sitename to the page title - $this->page['title'] = $this->config->get('config', 'sitename') . ($this->page['title'] ? ' | ' . $this->page['title'] : ''); + $this->page['title'] = $this->config->get('config', 'sitename', '') . (!empty($this->page['title']) ? ' | ' . $this->page['title'] : ''); if (!empty(Core\Renderer::$theme['stylesheet'])) { $stylesheet = Core\Renderer::$theme['stylesheet'];