From 52fef4c1aeceb55c3739c06986c874297e8f3c2c Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Tue, 16 Jan 2018 20:38:32 +0000 Subject: [PATCH] etc/dbq/pub.php --- etc/dbq/pub.php | 6 ++++++ lib/php/db/table.php | 14 ++++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/etc/dbq/pub.php b/etc/dbq/pub.php index d725af38..63a64789 100644 --- a/etc/dbq/pub.php +++ b/etc/dbq/pub.php @@ -6,9 +6,15 @@ if ($html) { # CORS Cross scheme allowed header('Access-Control-Allow-Origin: *'); header('Access-Control-Allow-Methods: GET, POST, OPTIONS'); + header('Access-Control-Allow-Headers: DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range'); + header('Access-Control-Expose-Headers: DNT,X-CustomHeader,Keep-Alive,User-Agent,X-Requested-With,If-Modified-Since,Cache-Control,Content-Type,Content-Range,Range'); } $DBQ['pub'] = [ 'row_parse_post' => !$html ? null : function(&$r,&$t) { Maps::row($r); }, +# NB 16.01.18 'row_parse_post' => function(&$r,&$t,$opt) { +# NB 16.01.18 #bye($opt); +# NB 16.01.18 Maps::row($r); +# NB 16.01.18 }, ]; ?> diff --git a/lib/php/db/table.php b/lib/php/db/table.php index eb538e9f..bf66e64d 100644 --- a/lib/php/db/table.php +++ b/lib/php/db/table.php @@ -969,16 +969,16 @@ Class Table extends nb { // Pre // if ($parser and !empty($this->db()->row_parse_pre)) { - $call = $this->db()->row_parse_pre; $call($row,$this); + $call = $this->db()->row_parse_pre; $call($row,$this,$opt); } if ($parser and !empty($this->row_parse_pre)) { - $call = $this->row_parse_pre; $call($row,$this); + $call = $this->row_parse_pre; $call($row,$this,$opt); } # Passed param on rows() if ($parser and !empty($opt['row_parse_pre'])) { - $call = $opt['row_parse_pre']; $call($row,$this); + $call = $opt['row_parse_pre']; $call($row,$this,$opt); } // @@ -995,18 +995,16 @@ Class Table extends nb { // Post // if ($parser and !empty($this->row_parse_post)) { - $fct = $this->row_parse_post; - $fct($row,$this); + $call = $this->row_parse_post; $call($row,$this,$opt); } if ($parser and !empty($this->db()->row_parse_post)) { - $fct = $this->db()->row_parse_post; - $fct($row,$this); + $call = $this->db()->row_parse_post; $call($row,$this,$opt); } # Passed param on rows() if ($parser and !empty($opt['row_parse_post'])) { - $call = $opt['row_parse_post']; $call($row,$this); + $call = $opt['row_parse_post']; $call($row,$this,$opt); } return $call; -- 2.47.3