From afbe9e606e0a983297472a9966f0b989b9609a22 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Fri, 16 Dec 2016 10:27:08 +0000 Subject: [PATCH] sys.service --- lib/php/page.php | 8 +++++--- www/dbq/dbq.php | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/lib/php/page.php b/lib/php/page.php index 37eb71ab..4c65d974 100644 --- a/lib/php/page.php +++ b/lib/php/page.php @@ -69,7 +69,7 @@ class Page extends nb { if (!$this->content_type()) $this->content_type($this->client_content_type()); // Nav - $links = []; + list($title,$html) = [[],[]]; if (isset($opt['nav'])) { list($title,$html) = self::nav_parse($opt['nav']); unset($opt['nav']); @@ -90,8 +90,10 @@ class Page extends nb { parent::__construct($opt); // Defaults - if ( !empty($title) and empty($this->title) ) $this->title = join($this->sep,$title); - if ( empty($this->title) ) $this->title = $this->filename2title(); + if ( empty($this->title) and !empty($title) ) $this->title = join($this->sep,$title); + if ( empty($this->h1) and !empty($html) ) $this->h1 = join($this->sep,$html); + #if ( !empty($title) and empty($this->title) ) $this->title = join($this->sep,$title); + #if ( empty($this->title) ) $this->title = $this->filename2title(); if ( empty($this->h1) and ! empty($this->title) ) $this->h1 = $this->title; // Call / Print diff --git a/www/dbq/dbq.php b/www/dbq/dbq.php index 72c21bea..cea3a7f5 100644 --- a/www/dbq/dbq.php +++ b/www/dbq/dbq.php @@ -99,6 +99,7 @@ class DbQ extends nb { 'css' => $this->css, 'title' => join(', ',$title), 'nav' => $nav, + 'sep' => ', ', ]); if ($this->run) $this->run(); -- 2.47.3