]> git.mxchange.org Git - friendica.git/commitdiff
Restore module custom title display
authorHypolite Petovan <hypolite@mrpetovan.com>
Mon, 4 Mar 2019 11:47:40 +0000 (06:47 -0500)
committerHypolite Petovan <hypolite@mrpetovan.com>
Mon, 4 Mar 2019 11:47:40 +0000 (06:47 -0500)
src/App.php

index 6945dc459d734d95eaf1decd1209a5c08bc56442..cfb04efcd771efa3fa975fbc111096e72af4ef7e 100644 (file)
@@ -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 {