From: Nicolas Boisselier Date: Sun, 22 Oct 2017 18:55:40 +0000 (+0100) Subject: www/dbq/dbq.php X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=8e18b3451bbd530f24afbb1b6d67f6879efaaab9;p=nb.git www/dbq/dbq.php --- diff --git a/lib/php/db/page.php b/lib/php/db/page.php index 16f771f8..2f69c69e 100644 --- a/lib/php/db/page.php +++ b/lib/php/db/page.php @@ -16,13 +16,10 @@ $Page = new Page([ ], 'content_type' => Page::content_type_and_set_format(), 'nav' => [ - [ 'Home', '/' ] + [ (!empty($Db) and !empty($Db->title)) ? $Db->title : 'Home', '/'], + ( (!empty($Table) and !empty($Table->name)) ? [Page::prettyText($Table->name),Page::path().'?table='.urlencode($Table->name)] : '' ), + ( Page::p('action') ? Page::prettyText(Page::p('action')) : '' ), ], -# NB 21.10.17 '_nav' => [ -# NB 21.10.17 [ (!empty($Db) and !empty($Db->title)) ? $Db->title : 'Home', '/'], -# NB 21.10.17 ( (!empty($Table) and !empty($Table->name)) ? [Page::prettyText($Table->name),Page::path().'?table='.urlencode($Table->name)] : '' ), -# NB 21.10.17 ( Page::p('action') ? Page::prettyText(Page::p('action')) : '' ), -# NB 21.10.17 ], 'call' => array( 'begin', #['out', "Hello World !!!\n"], diff --git a/lib/php/db/table.php b/lib/php/db/table.php index 5a78bf8c..210a8185 100644 --- a/lib/php/db/table.php +++ b/lib/php/db/table.php @@ -46,8 +46,9 @@ Class Table extends nb { public $show_buttons = true; public $show_url_sort = true; public $show_header = true; - public static $params = [ 'db', 'table', 'limit', 'debug', 'action' - , 'page', 'paged' # wordpress + public static $params = [ + 'db', 'table', 'limit', 'debug', 'action', + 'page', 'paged', # wordpress ]; function __construct($name,$opt=[]) { @@ -106,16 +107,7 @@ Class Table extends nb { } } - # NB 22.12.16: TODEL - #$this->show_header = (bool)$this->p('header',$this->show_header); - #$this->pdef('header',$this->show_header); - if (isset($_GET['rows.header'])) $this->show_header = $_GET['rows.header']; - #$this->pdef('header',$this->show_header); - #$this->show_header = (bool)$this->p('header',$this->show_header); - #bye($this->show_header); - #$this->show_header = (bool)$this->show_header; - #$this->db()->out->header($this->show_header); } diff --git a/www/dbq/dbq.php b/www/dbq/dbq.php index 3dc49740..724c6a70 100644 --- a/www/dbq/dbq.php +++ b/www/dbq/dbq.php @@ -17,7 +17,6 @@ class DbQ extends nb { 'admin' => self::ADMIN, 'delete' => self::DELETE, 'write' => self::WRITE, -# NB 27.07.17 'view' => self::READ, 'read' => self::READ, ];