From db4c217529c16bfd2e3436c9efdc5888845a570d Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Mon, 5 Dec 2016 17:28:49 +0000 Subject: [PATCH] Home --- lib/php/db.php | 4 ++++ www/dbq/html/index.php | 8 ++++++++ 2 files changed, 12 insertions(+) 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 -- 2.47.3