From: Nicolas Boisselier Date: Thu, 15 Dec 2016 09:38:41 +0000 (+0000) Subject: for evo X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=ee7ef4035d8ceb48309bb0b9446f29db00a0e032;p=nb.git for evo --- diff --git a/lib/php/db.php b/lib/php/db.php index 04e1b1a5..dd8fb303 100644 --- a/lib/php/db.php +++ b/lib/php/db.php @@ -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' diff --git a/lib/php/db/table.php b/lib/php/db/table.php index f5402692..847dbe9f 100644 --- a/lib/php/db/table.php +++ b/lib/php/db/table.php @@ -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);