$call = $this->row_parse_pre; $call($row,$this);
}
+ # Passed param on rows()
+ if ($parser and !empty($opt['row_parse_pre'])) {
+ $call = $opt['row_parse_pre']; $call($row,$this);
+ }
+
//
// Format
//
#$this->pset('action','table.row');
#$this->pset('action','');
$opt = ($this->page->is('html')
- #and $this->table->type() == 'table'
+ and ($this->perm >= self::VIEW)
+ and $this->table->type() != 'sql'
) ? [
'buttons' => join(' ',[
'<input type="submit" class="button button-small" value="GO"/>',
#'<input type="button" class="button button-small" onclick="f=this.parentElement.parentElement; f.elements[\'action\'].value=\'edit\'; f.setAttribute(\'method\',\'POST\'); f.submit();" value="Add"/>',
'<input type="button" class="button button-small" onclick="window.location=\''.$this->table->base.'add/'.'\'" value="Add"/>',
]),
+ 'row_parse_pre' => function(&$r){
+
+ #if ($this->perm < self::VIEW) return;
+# NB 20.12.16 $args = urlencode( join(self::PARAM_ARGS_SEP,$this->table->fields_keys_values($r)) );
+ $GLOBALS['dbq_args'] = urlencode( join(self::PARAM_ARGS_SEP,$this->table->fields_keys_values($r)) );
+ },
'row_parse_post' => function(&$r){
- if ($this->perm < self::VIEW) return;
- $args = urlencode( join(self::PARAM_ARGS_SEP,$this->table->fields_keys_values($r)) );
+ #if ($this->perm < self::VIEW) return;
+# NB 20.12.16 $args = urlencode( join(self::PARAM_ARGS_SEP,$this->table->fields_keys_values($r)) );
+ $args = $GLOBALS['dbq_args'];
$r = ['@' => join(' ',[
'<a class="button select" href="'.$this->table->base.'vi/'.$args.'">View</a>'