From: Nicolas Boisselier Date: Mon, 5 Dec 2016 17:28:49 +0000 (+0000) Subject: Home X-Git-Url: https://git.nbdom.net/?a=commitdiff_plain;h=db4c217529c16bfd2e3436c9efdc5888845a570d;p=nb.git Home --- diff --git a/lib/php/db.php b/lib/php/db.php index 9f6f7aaf..0dabadad 100644 --- a/lib/php/db.php +++ b/lib/php/db.php @@ -572,6 +572,10 @@ class Db extends nb { } + if (!empty($this->out_parser)) { + $fct = $this->out_parser; + $fct($rows); + } $this->out->rows($format,$rows,$head); return true; } diff --git a/www/dbq/html/index.php b/www/dbq/html/index.php index 1fee63bb..d7c41e18 100644 --- a/www/dbq/html/index.php +++ b/www/dbq/html/index.php @@ -41,6 +41,14 @@ function run() { #$Db = new Db($DB_CONFS[$params['db']]+['conf'=>$DB_CONFS]); $Db = new Db(['conf'=>$DB_CONFS]); $Db->format = $params['format']; + if (0) $Db->out_parser = function(&$rows) use($Page) { + foreach ($rows as $k=>$row) { + foreach ($row as $kk=>$vv) { + $rows[$k][$kk] = $Page->tag('a',$vv); + break; + } + } + }; # # Db actions pre conn