From b80b62f0efd3e7a75e4e885db610d690959cc893 Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Sat, 2 Dec 2017 02:23:20 +0000 Subject: [PATCH] lib/php/db/dbq.php --- lib/php/db.php | 5 +++-- lib/php/db/dbq.php | 2 ++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/php/db.php b/lib/php/db.php index a7f75a9e..fab71416 100644 --- a/lib/php/db.php +++ b/lib/php/db.php @@ -658,6 +658,9 @@ class Db extends nb { } elseif ($action == 'db.conf') { $return = $this->out(array_values($this->conf)); + } elseif ($action == 'db.ls') { + $return = $this->out($this->ls()); + } elseif ($r=self::class_action_out($this,$action) !== null) { return $r; @@ -812,9 +815,7 @@ class Db extends nb { # Construct assoc array $db = array_merge($conf[$id],[ - #'dbs' => array_keys($conf), 'conf' => $conf, -# NB 10.12.16 'id' => $id, ]); return $db; diff --git a/lib/php/db/dbq.php b/lib/php/db/dbq.php index 64753c7d..726cdbdf 100644 --- a/lib/php/db/dbq.php +++ b/lib/php/db/dbq.php @@ -9,5 +9,7 @@ require_once(realpath(dirname(__FILE__).'/init.php')); if (!isset($Db)) global $Db, $Table; $Db->pdef('format',$Db->content_type2format()); +#$Db->pdef('action','db.ls'); +#bye(nb::P('action')); return $Db->action($Db->p('action'),$Table); ?> -- 2.47.3