From 04a1c0b32e4c7909305e5965098f5ae8e6ed8c0f Mon Sep 17 00:00:00 2001 From: Devops Date: Thu, 6 Apr 2017 15:43:50 +0100 Subject: [PATCH] lib/php/db/table.php --- lib/php/db/table.php | 4 ++-- www/dbq/dbq.php | 10 +++++----- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/php/db/table.php b/lib/php/db/table.php index 9d428d00..6bf45de6 100644 --- a/lib/php/db/table.php +++ b/lib/php/db/table.php @@ -109,8 +109,8 @@ Class Table extends nb { #$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); + #$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 a3bd7608..1179d0bd 100644 --- a/www/dbq/dbq.php +++ b/www/dbq/dbq.php @@ -47,6 +47,7 @@ class DbQ extends nb { public $default_limit = '30'; public $limits = ['30','100','500','1000']; public $formats = [ 'html','csv','xml','json','yaml','sh','sql','php' ]; + public $is_html; # Page public $css = '/default'.(PRODUCTION ? '.min' : '').'.css'; @@ -321,9 +322,7 @@ class DbQ extends nb { 'db' => $this->db, 'show_hidden_params' => false, 'show_buttons' => false, - 'show_header' => ($this->params['format'] == 'html'), - #'params' => [], - #'params' => [ 'limit' ], + 'show_header' => $this->is_html, ],$param)); $this->table->base = $this->db->base.'/'.$this->table->name; @@ -465,7 +464,7 @@ class DbQ extends nb { if ($password=='') { if ($password=='') $password = $this->params['table']; if ($password=='' and !empty($_POST['password'])) $password = $_POST['password']; - if ($this->db->is_html) echo <<is_html) echo << @@ -577,7 +576,8 @@ EOF; if ($format == 'html') $format = $this->format_html; $this->params['format'] = $format; $this->db->format = $format; - $this->db->is_html = strpos($content_type,'html') ? true : false; + $this->is_html = strpos($content_type,'html') ? true : false; + $this->db->is_html = $this->is_html; } -- 2.47.3