From da17179a4f50c59175df2a61e4a2fe82f6e195ba Mon Sep 17 00:00:00 2001 From: Devops Date: Tue, 30 May 2017 12:09:01 +0100 Subject: [PATCH] fix bug for extras --- lib/php/db/table.php | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/lib/php/db/table.php b/lib/php/db/table.php index bfa963e3..1041a255 100644 --- a/lib/php/db/table.php +++ b/lib/php/db/table.php @@ -752,6 +752,8 @@ Class Table extends nb { # having, denorm, EMPTY if ($field->extras) { $extra_where = (string)$this->db()->conf_type('extra_where'); + #if ($_SERVER['REMOTE_USER'] == 'nico') debug($sql); + $k = $field->extras; if ($extra_where == 'having') { $having[] = "$k$equal$v"; } else { @@ -772,10 +774,6 @@ Class Table extends nb { public function add_extras($extras) { if ($this->p('extras') === '0') return false; - #return false; - - # Test if type exists because of a bug from shell.php -# NB 30.08.16 if ($this->db()->conf_type('type')) $this->fields(); foreach ($extras as $k => $v) { @@ -1903,7 +1901,7 @@ Class Table extends nb { public function err_sql($sql) { $err = $this->db()->conn->errorInfo(); $err[] = $sql; - self::bye(join(' | ',$err)); + $this->bye(join(' | ',$err)); } public function html_menu($opt=[]) { -- 2.47.3