From e8d3646c1f6c3126373797dfee552c1702edadaf Mon Sep 17 00:00:00 2001 From: Nicolas Boisselier Date: Thu, 14 Dec 2017 21:25:47 +0000 Subject: [PATCH] www/dbq/dbq.php --- www/dbq/dbq.php | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/www/dbq/dbq.php b/www/dbq/dbq.php index 535d2e4c..36ad8bd0 100644 --- a/www/dbq/dbq.php +++ b/www/dbq/dbq.php @@ -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]); ?> -- 2.47.3