$nav[] = [
$this->prettyText($v),
[
- 'href' => "$path" . urlencode($v) . "." . $this->ext,
+ 'href' => $this->link("$path" . urlencode($v)),
'class' => $k,
],
];
$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') {
$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'])
)
.'"');
});
return true;
}
+ public function link($link) {
+ return $link;
+# NB 14.12.17 return $link . '.' . $this->ext;
+ }
+
} # < Class Dbq
$DBQ = new DbQ(['run'=>true]);
?>