]> git.nbdom.net Git - nb.git/commitdiff
sys.service
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Fri, 16 Dec 2016 10:27:08 +0000 (10:27 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Fri, 16 Dec 2016 10:27:08 +0000 (10:27 +0000)
lib/php/page.php
www/dbq/dbq.php

index 37eb71abe5e12d3a72cae06817e1252bf93541e1..4c65d97426868d1a4c1ea09557dacdb45b2f29c8 100644 (file)
@@ -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
index 72c21bea0def34b3466b697bd110b015ba938001..cea3a7f5af2419d0b2e8596f6a1d760d976c0810 100644 (file)
@@ -99,6 +99,7 @@ class DbQ extends nb {
       'css' => $this->css,
       'title' => join(', ',$title),
       'nav' => $nav,
+      'sep' => ', ',
     ]);
 
     if ($this->run) $this->run();