]> git.nbdom.net Git - nb.git/commitdiff
for evo
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Thu, 15 Dec 2016 09:38:41 +0000 (09:38 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Thu, 15 Dec 2016 09:38:41 +0000 (09:38 +0000)
lib/php/db.php
lib/php/db/table.php

index 04e1b1a5e2e880fe4ee022016e66c2db70f7ffbc..dd8fb3032a6538306e7b2a01c03e107b1ee9dbdf 100644 (file)
@@ -53,7 +53,7 @@ class Db extends nb {
   public $types = [];
   public $conf = [];
   public $attach = []; # for sqlite
-  public $row_parse; # Function to call in table.rows()
+  public $row_parse_pre; # Function to call in table.rows()
 
   # Encryption
   public $encrypt = [
@@ -249,8 +249,8 @@ class Db extends nb {
     if (empty($this->title)) $this->title = prettyText($this->name);
 
     # Row parser
-    if (empty($this->row_parse) and $this->conf_type('row_parse')) {
-      $this->row_parse = $this->conf_type('row_parse');
+    if (empty($this->row_parse_pre) and $this->conf_type('row_parse')) {
+      $this->row_parse_pre = $this->conf_type('row_parse');
     }
 
   } # < if else 'use_path'
index f5402692655781a05828ba8cc244c43c9a3f4072..847dbe9f17241f4e6f932b0f0f2f80a242b6638e 100644 (file)
@@ -781,8 +781,8 @@ Class Table extends nb {
     $call = null;
 
     if ($parser) $this->db()->table_row_decrypt($this,$row);
-    if ($parser and !empty($this->db()->row_parse)) {
-      $call = $this->db()->row_parse; $call($row);
+    if ($parser and !empty($this->db()->row_parse_pre)) {
+      $call = $this->db()->row_parse_pre; $call($row);
     }
 
     if ($parser and !empty($this->row_parse_pre)) {
@@ -800,6 +800,10 @@ Class Table extends nb {
       $call = $this->row_parse_post; $call($row);
     }
 
+    if ($parser and !empty($this->db()->row_parse_post)) {
+      $call = $this->db()->row_parse_post; $call($row);
+    }
+
     # Passed param on rows()
     if ($parser and !empty($opt['row_parse_post'])) {
       $call = $opt['row_parse_post']; $call($row);