From: Nicolas Boisselier Date: Tue, 1 Mar 2016 00:59:50 +0000 (+0000) Subject: var formats X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=000b9594f779e2741727daa12025992e6c414c92;p=nb.git var formats --- diff --git a/lib/php/db.php b/lib/php/db.php index 6bfe1e0d..4417f534 100644 --- a/lib/php/db.php +++ b/lib/php/db.php @@ -46,6 +46,7 @@ class db extends nb { public $default_table; public $sort; public $extras; + public $formats = array( 'table','div','csv','xml','json','yaml' ); public $limits = array('10','20','50','100','500','1000'); public $help_criterias = array( ' * or % for wildcar', @@ -318,9 +319,11 @@ EOF; // Format $r .= ''; - $r .= ''.html_select_array(array( - 'table','div','csv','xml','json','yaml' - ),array( + + #$criteria[] = html_select_array(ar_map('array($a == "html" ? "" : $a,strtoupper($a))',$this->formats)); +# NB 01.03.16 $r .= ''.html_select_array(array( +# NB 01.03.16 'table','div','csv','xml','json','yaml' + $r .= ''.html_select_array($this->formats,array( 'html' => 'class="format" name="format" id="format"', 'selected' => $this->p('format'), 'prettyText' => true,