]> git.nbdom.net Git - nb.git/commitdiff
www/dbq/dbq.php
authorNicolas Boisselier <nicolas.boisselier@gmail.com>
Thu, 14 Dec 2017 21:25:47 +0000 (21:25 +0000)
committerNicolas Boisselier <nicolas.boisselier@gmail.com>
Thu, 14 Dec 2017 21:25:47 +0000 (21:25 +0000)
www/dbq/dbq.php

index 535d2e4c18ffe082c1b66ca978da30217abfe6bb..36ad8bd0e071769e44c2e40f5a06e0b6dcb2605b 100644 (file)
@@ -524,7 +524,7 @@ class DbQ extends nb {
                                $nav[] = [
                                        $this->prettyText($v),
                                        [
-                                               'href' => "$path" . urlencode($v) . "." . $this->ext,
+                                               'href' => $this->link("$path" . urlencode($v)),
                                                'class' => $k,
                                        ],
                                ];
@@ -1079,14 +1079,14 @@ EOF;
                                $r['command'] = $this->page->tag('a',$r['command'],'href="'
                                        .$this->db->base.'/'.($r['command'] == self::PARAM_DB_DEFAULT
                                                ? ''
-                                               : $r['command'].'.'.$this->ext
+                                               : $this->link($r['command'])
                                        )
                                .'"');
                        });
 
                } elseif ($action == 'ls') {
                        $this->page('',$this->db->tables_rows(),[],function(&$r){
-                               $r['name'] = $this->page->tag('a',$r['name'],'href="'.$this->db->base.'/'.$r['name'].'.'.$this->ext.'"');
+                               $r['name'] = $this->page->tag('a',$r['name'],'href="'.$this->link($this->db->base.'/'.$r['name']).'"');
                        });
 
                } elseif ($action == 'status') {
@@ -1132,7 +1132,7 @@ EOF;
                                $r['command'] = $this->page->tag('a',$r['command'],'href="'
                                        .$this->table->base.'/'.($r['command'] == self::PARAM_DB_DEFAULT
                                                ? ''
-                                               : $r['command'].'.'.$this->ext
+                                               : $this->link($r['command'])
                                        )
                                .'"');
                        });
@@ -1219,6 +1219,11 @@ EOF;
                return true;
        }
 
+       public function link($link) {
+               return $link;
+# NB 14.12.17          return $link . '.' . $this->ext;
+       }
+
 } # < Class Dbq
 $DBQ = new DbQ(['run'=>true]);
 ?>