From: Nicolas Boisselier Date: Mon, 15 Jan 2018 04:52:23 +0000 (+0000) Subject: lib/php/db/table.php X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=d372cb6123c866c138543f10946d8efeecc6b5a1;p=nb.git lib/php/db/table.php --- diff --git a/lib/php/db/table.php b/lib/php/db/table.php index 852e5f54..dc0f7c00 100644 --- a/lib/php/db/table.php +++ b/lib/php/db/table.php @@ -1035,7 +1035,6 @@ Class Table extends nb { } public function rows(&$opt=[],$opt_by_val=null) { - $opt['TABLE'] = $this; # # Db type change @@ -1167,7 +1166,6 @@ Class Table extends nb { $count = 0; while ($fct() and $row = $st->fetch(PDO::FETCH_ASSOC, PDO::FETCH_ORI_NEXT)) { - $opt_backup = $opt; $count++; $call = null; @@ -1225,7 +1223,6 @@ Class Table extends nb { } else { echo $this->{"rows_rec_$format"}($row,$opt); } - $opt = $opt_backup; } # < while rows @@ -1291,7 +1288,6 @@ Class Table extends nb { echo ''.NB_EOL; } - unset($opt['TABLE']); #return $count; } @@ -1562,8 +1558,8 @@ Class Table extends nb { if ($this->buttons() and !empty($buttons[0])) $html .= ''.$buttons[0].''.NB_EOL; foreach ($row as $k => $v) { - if ( !empty($opt['TABLE']) and !empty($opt['TABLE']->field($k)) ) { - $v = $opt['TABLE']->field($k)->htmlValue($v); + if ( !empty($this) and !empty($this->field($k)) ) { + $v = $this->field($k)->htmlValue($v); } $html .= '__rows_table_attr[$k].'>'.$v.''.NB_EOL; }