diff --git a/Form/DropdownElement.php b/Form/DropdownElement.php index 7ee932e..5031151 100644 --- a/Form/DropdownElement.php +++ b/Form/DropdownElement.php @@ -135,9 +135,7 @@ protected function mainElementHTML() $html = ''; diff --git a/bureaucracy_field.php b/bureaucracy_field.php index b4fc71d..f1007c5 100644 --- a/bureaucracy_field.php +++ b/bureaucracy_field.php @@ -8,6 +8,9 @@ */ class syntax_plugin_bureaucracy_field_dataplugin extends helper_plugin_bureaucracy_field { + public $opt; + public $tpl; + public $error; private $args = []; private $additional; @@ -113,21 +116,18 @@ public function renderfield($params, Doku_Form $form, $formid) $this->additional['required'] = 'required'; } - $form->addElement(call_user_func_array( - 'form_makeListboxField', - $this->_parse_tpl( - [ - '@@NAME@@[]', - $params['args'], - $params['value'], - '@@DISPLAY@@', - '', - '@@CLASS@@', - $this->additional - ], - $params - ) - )); + $form->addElement(form_makeListboxField(...$this->_parse_tpl( + [ + '@@NAME@@[]', + $params['args'], + $params['value'], + '@@DISPLAY@@', + '', + '@@CLASS@@', + $this->additional + ], + $params + ))); } } diff --git a/helper/aliastextbox.php b/helper/aliastextbox.php index 010e791..ea286a9 100644 --- a/helper/aliastextbox.php +++ b/helper/aliastextbox.php @@ -8,6 +8,9 @@ */ class helper_plugin_data_aliastextbox extends helper_plugin_bureaucracy_field { + public $opt; + public $tpl; + public $error; private $args; private $additional; @@ -108,21 +111,18 @@ public function renderfield($params, Doku_Form $form, $formid) $this->additional['required'] = 'required'; } - $form->addElement(call_user_func_array( - 'form_makeListboxField', - $this->_parse_tpl( - [ - '@@NAME@@[]', - $params['args'], - $params['value'], - '@@DISPLAY@@', - '', - '@@CLASS@@', - $this->additional - ], - $params - ) - )); + $form->addElement(form_makeListboxField(...$this->_parse_tpl( + [ + '@@NAME@@[]', + $params['args'], + $params['value'], + '@@DISPLAY@@', + '', + '@@CLASS@@', + $this->additional + ], + $params + ))); } } diff --git a/syntax/entry.php b/syntax/entry.php index d5ea71d..cdb3ad4 100644 --- a/syntax/entry.php +++ b/syntax/entry.php @@ -303,9 +303,8 @@ public function saveData($data, $id, $title) * @fixme replace this madness * @return bool|mixed */ - public function replaceQuery() + public function replaceQuery(...$args) { - $args = func_get_args(); $argc = func_num_args(); if ($argc > 1) { @@ -320,7 +319,7 @@ public function replaceQuery() $sqlite = $this->dthlp->getDB(); if (!$sqlite) return false; - return call_user_func_array(array(&$sqlite, 'query'), $args); + return $sqlite->query(...$args); }