From 08b72b393b45a8b6a5a3f128ae909198990beb1d Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Sat, 19 Mar 2016 19:57:53 +0000 Subject: [PATCH] format no more default --- lib/php/db/table.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/lib/php/db/table.php b/lib/php/db/table.php index e002fe19..7a34f601 100644 --- a/lib/php/db/table.php +++ b/lib/php/db/table.php @@ -366,7 +366,7 @@ FROM pg_catalog.pg_attribute a WHERE a.attrelid = (SELECT c.oid FROM pg_catalog. .'' .'' .'' - .'' + .'' .''.NB_EOL; } @@ -600,6 +600,11 @@ FROM pg_catalog.pg_attribute a WHERE a.attrelid = (SELECT c.oid FROM pg_catalog. Html Output ******************************************************************/ public function rows($opt=array()) { + +# NB 17.03.16 $format = ( $this->p('format') ? $this->p('format') : 'table' ); +# NB 19.03.16 $format = $this->pdef('format','table'); + $format = $this->p('format'); + if (!$format) bye("No param format"); // // Select @@ -628,9 +633,6 @@ FROM pg_catalog.pg_attribute a WHERE a.attrelid = (SELECT c.oid FROM pg_catalog. $st = $this->db->conn->prepare($sql); $st->execute(); -# NB 17.03.16 $format = ( $this->p('format') ? $this->p('format') : 'table' ); - $format = $this->pdef('format','table'); - if (!isset($opt['is_html'])) $opt['is_html'] = preg_match('/^(table|div)$/',$format) ? ( $this->p('header')!=="0" and $this->p('inc')!=="1") : false @@ -663,7 +665,7 @@ FROM pg_catalog.pg_attribute a WHERE a.attrelid = (SELECT c.oid FROM pg_catalog. if ($opt['is_html']) echo $this->html_nav_top(); if ($out_conf) { - out::begin($out_conf,$this->fields()); + out::begin($out_conf,$this->fields(),array($row)); } else { echo $this->{"rows_begin_$format"}($this->fields()); @@ -1206,6 +1208,7 @@ FROM pg_catalog.pg_attribute a WHERE a.attrelid = (SELECT c.oid FROM pg_catalog. ) as $v) { $r .= ''; } + $r .= ''; // Embed for no html format // // Options -- 2.47.3