]> git.nbdom.net Git - nb.git/commitdiff
etc/dbq/pub.php
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Tue, 16 Jan 2018 20:38:32 +0000 (20:38 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Tue, 16 Jan 2018 20:38:32 +0000 (20:38 +0000)
etc/dbq/pub.php
lib/php/db/table.php

index d725af38311022e98ea6757c62cefb463e096827..63a647891a42a357dc101f5cce4a39e5e001892d 100644 (file)
@@ -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  },
 ];
 ?>
index eb538e9f0cbc1548db25549d2f2f1c229aaa101e..bf66e64dff05636f9abdbac9c89c733de358b12c 100644 (file)
@@ -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;