$filter = ($this->params['table'] ? $this->params['table'] : '');
$attrs = ($this->params['action'] ? explode(',',$this->params['action']) : []);
- if (!strpos($this->params['table'],'=')) {
+ if (!empty($this->params['table']) and !strpos($this->params['table'],'=')) {
$filter = '';
$attrs = explode(',',$this->params['table']);
}
$this->page($rows);
}
- public function page_ls($args) {
+ public function page_table_ls($args) {
$this->deniedUnless($this->perm >= self::READ);
- if (!strpos($args,'=')) $this->table->fields_only = explode(',',$args);
+ if (!empty($args) and !strpos($args,'=')) $this->table->fields_only = explode(',',$args);
$this->page($this,'table_rows');
}
'name' => 'dbq.params.format',
'value' => $this->params['format'],
];
- if (0) $rows[] = [
- 'name' => 'dbq.page.is.html',
- 'value' => ($this->page->is('html') ? 1 : 0),
- ];
+
$user = '';
if (true or $user = $this->logged()) {
if ($user) $rows[] = [ 'name' => 'dbq.user.name', 'value' => $user ];
});
} elseif ($action == 'ls') {
- $this->page_ls($this->params['args']);
+ $this->page_table_ls($this->params['args']);
} elseif ($action == 'fields') {
$this->page($this->table,'fields_rows');
} else {
- if (!strpos($action,'=')) $this->page_ls($action);
+ if (!strpos($action,'=')) $this->page_table_ls($action);
$this->notImplemented('Unknown table action'." `$action`");
}