]> git.nbdom.net Git - nb.git/commitdiff
Fix bug /help
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Sat, 2 Dec 2023 00:30:41 +0000 (00:30 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Sat, 2 Dec 2023 00:30:41 +0000 (00:30 +0000)
www/dbq/dbq.php

index c5df11a453bee53e7aaf070106acb4b03e0cf751..957c15b7a5405c904d4867b3a470727a34fcb45c 100644 (file)
@@ -1235,34 +1235,44 @@ EOF;
 */
                if ($action == 'help') {
 
-                       $this->page($this->db,[
-                               [ 'help', 'This help' ],
-                               [ 'ls', 'List configured databases' ],
-                               # NB 14.12.22 [ 'databases', 'List others databases' ],
-                               [ 'random_str', 'Generate a random string' ],
-                               [ 'ssha_password', 'Encrypt a password' ],
-                               [ 'ssha512_password', 'Encrypt a password' ],
-                               [ 'logout', 'Clear Basic Auth' ],
-                               [ 'status', 'Status infos page' ],
-                               [ 'conf', 'Dump json infos' ],
-                               [ 'types', 'Available mime types' ],
-                       ] + (
-                               ($this->perm < self::ADMIN) ? [] :
-                       [
-# NB 07.02.18                          [ 'ldap', 'Connect to domain ldap server [/FILTER/ATTRS' ],
-                               [ 'phpinfo', 'Phpinfo' ],
-                               [ '_SERVER', 'Dump _SERVER' ],
-                               [ '_REQUEST', 'Dump _REQUEST' ],
-                       ]
-                       )
-                       ,['command','description'],function(&$r) {
-                               $r['command'] = $this->page->tag('a',$r['command'],'href="'
-                                       .$this->db->base.'/'.($r['command'] == self::PARAM_DB_DEFAULT
-                                               ? ''
-                                               : $r['command']
-                                       )
-                               .'"');
-                       });
+                       $this->page($this->db
+                               # Rows
+                               ,array_merge(
+                                       [
+                                               [ 'help', 'This help' ],
+                                               [ 'ls', 'List configured databases' ],
+                                               # NB 14.12.22 [ 'databases', 'List others databases' ],
+                                               [ 'random_str', 'Generate a random string' ],
+                                               [ 'ssha_password', 'Encrypt a password' ],
+                                               [ 'ssha512_password', 'Encrypt a password' ],
+                                               [ 'logout', 'Clear Basic Auth' ],
+                                               [ 'status', 'Status infos page' ],
+                                               [ 'conf', 'Dump api infos and params' ],
+                                               [ 'types', 'Available mime types' ],
+                                       ],
+                                       (
+                                               ($this->perm < self::ADMIN) ? [] :
+                                       [
+               # NB 07.02.18                           [ 'ldap', 'Connect to domain ldap server [/FILTER/ATTRS' ],
+                                               [ 'phpinfo', 'Phpinfo' ],
+                                               [ '_SERVER', 'Dump _SERVER' ],
+                                               [ '_REQUEST', 'Dump _REQUEST' ],
+                                       ]
+                               )
+                               )
+                               # Head
+                               ,['command','description']
+                               # Print
+                               ,function(&$r) {
+                                       $r['command'] = $this->page->tag('a',$r['command'],
+                                               'href="'.$this->db->base.'/'
+                                               .($r['command'] == self::PARAM_DB_DEFAULT
+                                                       ? ''
+                                                       : $r['command']
+                                               )
+                                       .'"');
+                               })
+                       ;
 
                } elseif ($action == 'ls') {