From aa7d3378ae786fbc834cb1c747ec97d400b69b6d Mon Sep 17 00:00:00 2001 From: www-data Date: Sat, 3 Feb 2024 08:34:23 +0100 Subject: [PATCH 01/14] class for submit buttons --- helper/fieldsubmit.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/helper/fieldsubmit.php b/helper/fieldsubmit.php index b9f2e45..183248e 100644 --- a/helper/fieldsubmit.php +++ b/helper/fieldsubmit.php @@ -44,6 +44,9 @@ public function renderfield($params, Doku_Form $form, $formid) { if(isset($this->opt['id'])) { $attr['id'] = $this->opt['id']; } + if(isset($this->opt['class'])) { + $attr['class'] = $this->opt['class']; + } $this->tpl = form_makeButton('submit','', '@@DISPLAY|' . $this->getLang('submit') . '@@', $attr); parent::renderfield($params, $form, $formid); } From 8131f680702dd421f43231b52dcd26aacaa5825c Mon Sep 17 00:00:00 2001 From: www-data Date: Sat, 3 Feb 2024 12:51:04 +0100 Subject: [PATCH 02/14] readonly attribute for textbox --- helper/field.php | 2 ++ helper/fieldtextbox.php | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/helper/field.php b/helper/field.php index 070e331..89a3399 100644 --- a/helper/field.php +++ b/helper/field.php @@ -103,6 +103,8 @@ protected function standardArgs($args) { } } elseif($arg == '@') { $this->opt['pagename'] = true; + } elseif($arg == '#') { + $this->opt['readonly'] = true; } elseif($arg == '@@') { $this->opt['replyto'] = true; } elseif(preg_match('/x\d/', $arg)) { diff --git a/helper/fieldtextbox.php b/helper/fieldtextbox.php index 430cc2d..b6604d5 100644 --- a/helper/fieldtextbox.php +++ b/helper/fieldtextbox.php @@ -23,6 +23,10 @@ function initialize($args) { $attr['required'] = 'required'; } + if(isset($this->opt['readonly'])) { + $attr['readonly'] = 'readonly'; + } + $this->tpl = form_makeTextField('@@NAME@@', '@@VALUE@@', '@@DISPLAY@@', '@@ID@@', '@@CLASS@@', $attr); if(isset($this->opt['class'])){ $this->tpl['class'] .= ' '.$this->opt['class']; From ec347d452e2c1aa1f30f7d7070e2d0ca33292efe Mon Sep 17 00:00:00 2001 From: www-data Date: Sat, 3 Feb 2024 12:52:54 +0100 Subject: [PATCH 03/14] multiple string condition with | --- script/fieldsets.js | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/script/fieldsets.js b/script/fieldsets.js index 2a3c12d..1cb7acb 100644 --- a/script/fieldsets.js +++ b/script/fieldsets.js @@ -17,15 +17,24 @@ jQuery(function () { jQuery('form.bureaucracy__plugin').each(function () { - + function isShowOrHide(input,dp) { + + var tvals=dp.tval.split('|'); + var soh=false; + for (const tval of tvals[Symbol.iterator]()) { + soh ||= + input.parentNode.parentNode.style.display !== 'none' && // input/checkbox is displayed AND + ((input.checked === tval) || // ( checkbox is checked + (input.type !== 'checkbox' && (tval === true && input.value !== '')) || // OR no checkbox, but input is set + input.value === tval); // OR input === tval ) + } + return soh + } //show/hide fieldset and trigger depending children function updateFieldset(input) { jQuery.each(jQuery(input).data('dparray'), function (i, dp) { - var showOrHide = - input.parentNode.parentNode.style.display !== 'none' && // input/checkbox is displayed AND - ((input.checked === dp.tval) || // ( checkbox is checked - (input.type !== 'checkbox' && (dp.tval === true && input.value !== '')) || // OR no checkbox, but input is set - input.value === dp.tval); // OR input === dp.tval ) + + var showOrHide = isShowOrHide(input,dp); dp.fset.toggle(showOrHide); From c96ac7546513dfc84497177d4676bbb75108e6b4 Mon Sep 17 00:00:00 2001 From: www-data Date: Thu, 8 Feb 2024 23:34:21 +0100 Subject: [PATCH 04/14] multiple string condition with | for fieldfieldset --- helper/fieldfieldset.php | 3 +-- script/fieldsets.js | 6 ++++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/helper/fieldfieldset.php b/helper/fieldfieldset.php index ddce2b6..4a66ff3 100644 --- a/helper/fieldfieldset.php +++ b/helper/fieldfieldset.php @@ -69,7 +69,6 @@ public function handle_post($value, &$fields, $index, $formid) { if(empty($this->depends_on)) { return true; } - // search the field where fieldset depends on in fields before fieldset $hidden = false; for ($n = 0 ; $n < $index; ++$n) { @@ -78,7 +77,7 @@ public function handle_post($value, &$fields, $index, $formid) { continue; } if(count($this->depends_on) > 1) { - $hidden = $field->getParam('value') != $this->depends_on[1]; + $hidden = (in_array($field->getParam('value'), explode("|",$this->depends_on[1]))==false); } else { $hidden = !$field->isSet_(); } diff --git a/script/fieldsets.js b/script/fieldsets.js index 1cb7acb..cfc7fd7 100644 --- a/script/fieldsets.js +++ b/script/fieldsets.js @@ -18,9 +18,11 @@ jQuery(function () { jQuery('form.bureaucracy__plugin').each(function () { function isShowOrHide(input,dp) { - - var tvals=dp.tval.split('|'); + + try { var tvals=dp.tval.split('|'); } + catch(err) {var tvals=[dp.tval]; } var soh=false; + for (const tval of tvals[Symbol.iterator]()) { soh ||= input.parentNode.parentNode.style.display !== 'none' && // input/checkbox is displayed AND From 4e6683f22ba6b75d52455f9404fc316283111018 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Kessel?= Date: Tue, 27 Feb 2024 15:16:02 +0100 Subject: [PATCH 05/14] multiple submit buttons --- helper/fieldsubmit.php | 41 ++++++++++++++++++++++++++++++++++++++--- syntax.php | 2 -- 2 files changed, 38 insertions(+), 5 deletions(-) diff --git a/helper/fieldsubmit.php b/helper/fieldsubmit.php index 183248e..318ff42 100644 --- a/helper/fieldsubmit.php +++ b/helper/fieldsubmit.php @@ -4,6 +4,7 @@ * * Creates a submit button */ + class helper_plugin_bureaucracy_fieldsubmit extends helper_plugin_bureaucracy_field { protected $mandatory_args = 1; static $captcha_displayed = array(); @@ -23,6 +24,14 @@ public function initialize($args) { $this->opt['optional'] = true; } + function form_button($attrs) + { + $p = (!empty($attrs['_action'])) ? 'name="do[' . $attrs['_action'] . ']" ' : ''; + $label = $attrs['label']; + unset($attrs['label']); + return ''; + } + /** * Render the field as XHTML * @@ -40,15 +49,37 @@ public function renderfield($params, Doku_Form $form, $formid) { $form->addElement($helper->getHTML()); } } + $attr = array(); + $attr['name'] = 'submit'; + if(isset($this->opt['value'])) { + $attr['value'] = $this->opt['value']; + } + if(isset($this->opt['label'])) { + $attr['label'] = $this->opt['label']; + } if(isset($this->opt['id'])) { $attr['id'] = $this->opt['id']; } if(isset($this->opt['class'])) { $attr['class'] = $this->opt['class']; } + $this->tpl = form_makeButton('submit','', '@@DISPLAY|' . $this->getLang('submit') . '@@', $attr); - parent::renderfield($params, $form, $formid); + + $this->_handlePreload(); + + if(!$form->_infieldset){ + $form->startFieldset(''); + } + if ($this->error) { + $params['class'] = 'bureaucracy_error'; + } + + $params = array_merge($this->opt, $params); + $element = $this->_parse_tpl($this->tpl, $params); + $form->addElement($this->form_button($element)); + } /** @@ -60,9 +91,13 @@ public function renderfield($params, Doku_Form $form, $formid) { * @param helper_plugin_bureaucracy_field[] $fields (reference) form fields (POST handled upto $this field) * @param int $index index number of field in form * @param int $formid unique identifier of the form which contains this field - * @return bool Whether the posted form has a valid captcha + * @return bool Whether the posted f$_POSTorm has a valid captcha */ public function handle_post($value, &$fields, $index, $formid) { + + // Set the value of the submit filed to the label of the button which was pressed + $this->setVal($_POST['submit']); + if ($this->hidden) { return true; } @@ -86,7 +121,7 @@ public function handle_post($value, &$fields, $index, $formid) { * @return mixed|null */ public function getParam($name) { - return ($name === 'value') ? null : parent::getParam($name); + return ($name === 'value') ? (($this->hidden)? null : parent::getParam($name)) : parent::getParam($name); } } diff --git a/syntax.php b/syntax.php index 454dd60..a5cc41b 100644 --- a/syntax.php +++ b/syntax.php @@ -203,7 +203,6 @@ public function handle($match, $state, $pos, Doku_Handler $handler) { public function render($format, Doku_Renderer $R, $data) { if($format != 'xhtml') return false; $R->info['cache'] = false; // don't cache - /** * replace some time and name placeholders in the default values * @var $field helper_plugin_bureaucracy_field @@ -309,7 +308,6 @@ private function _handlepost($data) { $success = true; foreach($data['fields'] as $index => $field) { /** @var $field helper_plugin_bureaucracy_field */ - $isValid = true; if($field->getFieldType() === 'file') { $file = array(); From 58adef9e28c50758e5e1d7d0dc19fba0f2558c8f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Kessel?= Date: Thu, 29 Feb 2024 19:44:44 +0100 Subject: [PATCH 06/14] limit namespaces for form usage --- conf/default.php | 3 ++- conf/metadata.php | 3 ++- lang/cs/settings.php | 3 ++- lang/de/lang.php | 1 + lang/de/settings.php | 1 + lang/en/lang.php | 3 +++ lang/en/settings.php | 1 + lang/es/settings.php | 1 + lang/fa/settings.php | 1 + lang/fr/settings.php | 1 + lang/hr/settings.php | 1 + lang/it/settings.php | 6 ++++++ lang/ja/settings.php | 1 + lang/lv/settings.php | 6 ++++++ lang/nl/settings.php | 1 + lang/no/settings.php | 1 + lang/pt-br/settings.php | 1 + lang/pt/settings.php | 1 + lang/ru/settings.php | 1 + lang/zh/settings.php | 1 + syntax.php | 38 ++++++++++++++++++++++++++++++++++++++ 21 files changed, 73 insertions(+), 3 deletions(-) create mode 100644 lang/it/settings.php create mode 100644 lang/lv/settings.php diff --git a/conf/default.php b/conf/default.php index ed0463f..812786c 100644 --- a/conf/default.php +++ b/conf/default.php @@ -1,4 +1,5 @@ */ $lang['runas'] = 'Afecta el modo plantilla. Use los permisos de este usuario (virtual) cuando compruebe los ACLs para leer plantillas y crear páginas.'; +$lang['namespaces'] = 'If set it limits the usage of forms to the given namspaces and page ids. The character * is a wildcard sysmbol and ** includes all subnamespaces'; $lang['maxEmailAttachmentSize'] = 'Maximo tamaño, en Bytes, de los elementos incrustados en un eMail. (por fichero)'; diff --git a/lang/fa/settings.php b/lang/fa/settings.php index 8bfc3b8..f06017a 100644 --- a/lang/fa/settings.php +++ b/lang/fa/settings.php @@ -6,4 +6,5 @@ * @author nima */ $lang['runas'] = 'روی حالت قالب اثر می‌گذارد. از این اجازه‌های کاربر (مجازی) وقتی استفاده کنید که ACL ها برای خواندن قالبها و ایجاد صفحات بررسی می‌شوند. '; +$lang['namespaces'] = 'If set it limits the usage of forms to the given namspaces and page ids. The character * is a wildcard sysmbol and ** includes all subnamespaces'; $lang['maxEmailAttachmentSize'] = 'اندازه حداکثر پیوست‌های ایمیل بر حسب بایت. (به ازای هر فایل)'; diff --git a/lang/fr/settings.php b/lang/fr/settings.php index 72031df..c57e6a8 100644 --- a/lang/fr/settings.php +++ b/lang/fr/settings.php @@ -6,4 +6,5 @@ * @author Schplurtz le Déboulonné */ $lang['runas'] = 'Mode «template» : teste les ACL avec les permissions de cet utilisateur (virtuel) pour la lecture des modèles et la création de page.'; +$lang['namespaces'] = 'If set it limits the usage of forms to the given namspaces and page ids. The character * is a wildcard sysmbol and ** includes all subnamespaces'; $lang['maxEmailAttachmentSize'] = 'Taille max en octet des pièces jointes dans les courriels. (par fichier)'; diff --git a/lang/hr/settings.php b/lang/hr/settings.php index d9df8dd..124524f 100644 --- a/lang/hr/settings.php +++ b/lang/hr/settings.php @@ -6,4 +6,5 @@ * @author Davor Turkalj */ $lang['runas'] = 'Utječe na mod predloška. Koristi ove (virtualne) ovlasti kada provjeravaš ACL za čitanje predloška i stvaranje stranice.'; +$lang['namespaces'] = 'If set it limits the usage of forms to the given namspaces and page ids. The character * is a wildcard sysmbol and ** includes all subnamespaces'; $lang['maxEmailAttachmentSize'] = 'Maksimalna veličina priloga pošti u Bajtovima. (po datoteci)'; diff --git a/lang/it/settings.php b/lang/it/settings.php new file mode 100644 index 0000000..46d3c4c --- /dev/null +++ b/lang/it/settings.php @@ -0,0 +1,6 @@ + */ $lang['runas'] = 'テンプレートモードに影響があります。テンプレートを読み込み、ページを作成するために ACL チェックする場合、この(仮想)ユーザーの権限を使用してください。'; +$lang['namespaces'] = 'If set it limits the usage of forms to the given namspaces and page ids. The character * is a wildcard sysmbol and ** includes all subnamespaces'; $lang['maxEmailAttachmentSize'] = 'メールに添付するファイルの最大サイズ(バイト数/1ファイルごと)'; diff --git a/lang/lv/settings.php b/lang/lv/settings.php new file mode 100644 index 0000000..46d3c4c --- /dev/null +++ b/lang/lv/settings.php @@ -0,0 +1,6 @@ + */ $lang['runas'] = 'Gebruikt in de template mode. Gebruik de rechten van deze (virtuele) gebruiker bij het controleren van de ACL gebruiker voor het lezen van templates en het maken van pagina\'s'; +$lang['namespaces'] = 'If set it limits the usage of forms to the given namspaces and page ids. The character * is a wildcard sysmbol and ** includes all subnamespaces'; $lang['maxEmailAttachmentSize'] = 'Max grootte van e-mailbijlages in Bytes. (per bestand)'; diff --git a/lang/no/settings.php b/lang/no/settings.php index 70227ce..fa704d2 100644 --- a/lang/no/settings.php +++ b/lang/no/settings.php @@ -1,5 +1,6 @@ */ $lang['runas'] = 'Afeta o modo de template. Use estas permissões de usuário (virtual) quando verificando ACLs para leitura de templates e criação de páginas.'; +$lang['namespaces'] = 'If set it limits the usage of forms to the given namspaces and page ids. The character * is a wildcard sysmbol and ** includes all subnamespaces'; $lang['maxEmailAttachmentSize'] = 'Tamanho máximo para anexos de e-mail em Bytes. (por arquivo)'; diff --git a/lang/pt/settings.php b/lang/pt/settings.php index 174eb1c..c7f2137 100644 --- a/lang/pt/settings.php +++ b/lang/pt/settings.php @@ -6,4 +6,5 @@ * @author Rafael Grando */ $lang['runas'] = 'Afeta o modo template. Use essas permissões (virtuais) de usuário quando checar ACLs para ler modelos e criar páginas.'; +$lang['namespaces'] = 'If set it limits the usage of forms to the given namspaces and page ids. The character * is a wildcard sysmbol and ** includes all subnamespaces'; $lang['maxEmailAttachmentSize'] = 'Tamanho máximo de anexos em bytes. (por arquivo)'; diff --git a/lang/ru/settings.php b/lang/ru/settings.php index cb8fe7b..e644bf4 100644 --- a/lang/ru/settings.php +++ b/lang/ru/settings.php @@ -7,4 +7,5 @@ * @author Yuriy Skalko */ $lang['runas'] = '(Влияет на режим шаблона.) Использовать права этого (виртуального) пользователя при проверке доступа для чтения шаблонов и создания страниц.'; +$lang['namespaces'] = 'If set it limits the usage of forms to the given namspaces and page ids. The character * is a wildcard sysmbol and ** includes all subnamespaces'; $lang['maxEmailAttachmentSize'] = 'Максимальный размер почтовых вложений в байтах. (на файл)'; diff --git a/lang/zh/settings.php b/lang/zh/settings.php index 6989239..565e77d 100644 --- a/lang/zh/settings.php +++ b/lang/zh/settings.php @@ -1,5 +1,6 @@ count($id)-1) { + $found=false; + break; + } elseif ($pat[$i]=='**') { + break; + } elseif ($pat[$i]=='*') { + continue; + } elseif ($pat[$i]!=$id[$i]) { + $found=false; + break; + } + } + if ($found) { + break; + } + } + return $found; + } else { + return true; + } + } /** * Connect pattern to lexer * @@ -75,12 +106,19 @@ public function connectTo($mode) { * @return bool|array Return an array with all data you want to use in render, false don't add an instruction */ public function handle($match, $state, $pos, Doku_Handler $handler) { + global $ID; $match = substr($match, 6, -7); // remove form wrap $lines = explode("\n", $match); $actions = $rawactions = array(); $thanks = ''; $labels = ''; + $namespaces = $this->getConf('namespaces'); + if (!$this->_checkvalidpages($ID, $namespaces)) { + msg($this->getLang('e_namespace'), -1); + return false; + } + // parse the lines into an command/argument array $cmds = array(); while(count($lines) > 0) { From 6df110079d88c91d7c0c86793c07af7f33c61e87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Kessel?= Date: Thu, 29 Feb 2024 23:13:49 +0100 Subject: [PATCH 07/14] additional script interface --- helper/actionscript.php | 8 +++++--- .../bureaucracy_handler_interface_ex.php | 19 +++++++++++++++++++ 2 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 interfaces/bureaucracy_handler_interface_ex.php diff --git a/helper/actionscript.php b/helper/actionscript.php index f308721..e9678bc 100644 --- a/helper/actionscript.php +++ b/helper/actionscript.php @@ -42,11 +42,13 @@ public function run($fields, $thanks, $argv) { /** @var dokuwiki\plugin\bureaucracy\interfaces\bureaucracy_handler_interface $handler */ $handler = new $className; - if (!is_a($handler, dokuwiki\plugin\bureaucracy\interfaces\bureaucracy_handler_interface::class)) { + if (is_a($handler, dokuwiki\plugin\bureaucracy\interfaces\bureaucracy_handler_interface::class)) { + return $handler->handleData($fields, $thanks); + } elseif (is_a($handler, dokuwiki\plugin\bureaucracy\interfaces\bureaucracy_handler_interface_ex::class)) { + return $handler->handleData($fields, $thanks,$argv); + } else { throw new InvalidArgumentException('The handler must implement the interface dokuwiki\\plugin\\bureaucracy\\interfaces\\bureaucracy_handler_interface !'); } - - return $handler->handleData($fields, $thanks); } /** diff --git a/interfaces/bureaucracy_handler_interface_ex.php b/interfaces/bureaucracy_handler_interface_ex.php new file mode 100644 index 0000000..215757e --- /dev/null +++ b/interfaces/bureaucracy_handler_interface_ex.php @@ -0,0 +1,19 @@ + Date: Tue, 17 Jun 2025 11:32:35 +0200 Subject: [PATCH 08/14] Update phpTestLinux.yml no fetchphpunit --- .github/workflows/phpTestLinux.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/phpTestLinux.yml b/.github/workflows/phpTestLinux.yml index 194e707..5727585 100644 --- a/.github/workflows/phpTestLinux.yml +++ b/.github/workflows/phpTestLinux.yml @@ -43,7 +43,6 @@ jobs: - name: Setup PHPUnit run: | - php _test/fetchphpunit.php cd _test - name: Run PHPUnit From dd42e788bef2579ae2514e0b4d88ad416a8e5840 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Kessel?= Date: Tue, 17 Jun 2025 12:00:31 +0200 Subject: [PATCH 09/14] Update phpTestLinux.yml added uses ... --- .github/workflows/phpTestLinux.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/phpTestLinux.yml b/.github/workflows/phpTestLinux.yml index 5727585..9908440 100644 --- a/.github/workflows/phpTestLinux.yml +++ b/.github/workflows/phpTestLinux.yml @@ -42,8 +42,9 @@ jobs: run: sh travis.sh - name: Setup PHPUnit - run: | - cd _test + uses: php-actions/phpunit@v3 + with: + memory_limit: "256M" - name: Run PHPUnit run: | From 9b595a8671e959b23e860fe6901fdd1d4ddbb67b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Kessel?= Date: Tue, 17 Jun 2025 12:15:58 +0200 Subject: [PATCH 10/14] Update phpTestLinux.yml ... --- .github/workflows/phpTestLinux.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.github/workflows/phpTestLinux.yml b/.github/workflows/phpTestLinux.yml index 9908440..4863357 100644 --- a/.github/workflows/phpTestLinux.yml +++ b/.github/workflows/phpTestLinux.yml @@ -46,7 +46,11 @@ jobs: with: memory_limit: "256M" + - uses: actions/checkout@v3 + - uses: php-actions/composer@v6 + - name: Run PHPUnit - run: | - cd _test - php phpunit.phar --verbose --stderr --group plugin_bureaucracy + uses: php-actions/phpunit@master + with: + memory_limit: "256M" + args: --verbose --stderr --group plugin_bureaucracy _test From babcba6c4140084bbdb4b3054a118ed8ce2aad7e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Kessel?= Date: Tue, 17 Jun 2025 12:18:54 +0200 Subject: [PATCH 11/14] Update phpTestLinux.yml ... --- .github/workflows/phpTestLinux.yml | 5 ----- 1 file changed, 5 deletions(-) diff --git a/.github/workflows/phpTestLinux.yml b/.github/workflows/phpTestLinux.yml index 4863357..5d1ff79 100644 --- a/.github/workflows/phpTestLinux.yml +++ b/.github/workflows/phpTestLinux.yml @@ -41,11 +41,6 @@ jobs: DOKUWIKI: ${{ matrix.dokuwiki-branch }} run: sh travis.sh - - name: Setup PHPUnit - uses: php-actions/phpunit@v3 - with: - memory_limit: "256M" - - uses: actions/checkout@v3 - uses: php-actions/composer@v6 From fbbad0adc698f177c7536df26e66169144a04414 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Kessel?= Date: Tue, 17 Jun 2025 12:22:33 +0200 Subject: [PATCH 12/14] Update phpTestLinux.yml ... --- .github/workflows/phpTestLinux.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/phpTestLinux.yml b/.github/workflows/phpTestLinux.yml index 5d1ff79..bf4049f 100644 --- a/.github/workflows/phpTestLinux.yml +++ b/.github/workflows/phpTestLinux.yml @@ -42,7 +42,6 @@ jobs: run: sh travis.sh - uses: actions/checkout@v3 - - uses: php-actions/composer@v6 - name: Run PHPUnit uses: php-actions/phpunit@master From e43fe0a97597d22b8e277d786563b313617d5fe4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Kessel?= Date: Tue, 17 Jun 2025 12:42:46 +0200 Subject: [PATCH 13/14] Create dokuwiki.yml --- .github/workflows/dokuwiki.yml | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 .github/workflows/dokuwiki.yml diff --git a/.github/workflows/dokuwiki.yml b/.github/workflows/dokuwiki.yml new file mode 100644 index 0000000..e6b8435 --- /dev/null +++ b/.github/workflows/dokuwiki.yml @@ -0,0 +1,11 @@ +name: DokuWiki Default Tasks +on: + push: + pull_request: + schedule: + - cron: '1 9 8 * *' + + +jobs: + all: + uses: dokuwiki/github-action/.github/workflows/all.yml@main From 2658f2ac53c32eaef77c1792472f168ab56ff859 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Kessel?= Date: Tue, 17 Jun 2025 12:47:08 +0200 Subject: [PATCH 14/14] Update phpTestLinux.yml --- .github/workflows/phpTestLinux.yml | 49 ------------------------------ 1 file changed, 49 deletions(-) diff --git a/.github/workflows/phpTestLinux.yml b/.github/workflows/phpTestLinux.yml index bf4049f..8b13789 100644 --- a/.github/workflows/phpTestLinux.yml +++ b/.github/workflows/phpTestLinux.yml @@ -1,50 +1 @@ -name: PHP Tests on Linux -on: [push, pull_request] - -jobs: - run: - name: PHP ${{ matrix.php-versions }} DokuWiki ${{ matrix.dokuwiki-branch }} - runs-on: ubuntu-latest - if: github.event_name == 'push' || github.event.pull_request.head.repo.full_name != github.repository - - strategy: - matrix: - php-versions: ['7.2', '7.3', '7.4', '8.0'] - dokuwiki-branch: [ 'master', 'stable'] - exclude: - - dokuwiki-branch: 'stable' - php-versions: '8.0' - fail-fast: true - - steps: - - name: Checkout - uses: actions/checkout@v2 - - - name: Setup PHP - uses: shivammathur/setup-php@v2 - with: - php-version: ${{ matrix.php-versions }} - extensions: mbstring, intl, PDO, pdo_sqlite, bz2 - - - name: Setup problem matchers - run: | - echo ::add-matcher::${{ runner.tool_cache }}/php.json - echo ::add-matcher::${{ runner.tool_cache }}/phpunit.json - - - name: Download DokuWiki Test-setup - run: wget https://raw.github.com/splitbrain/dokuwiki-travis/master/travis.sh - - - name: Run DokuWiki Test-setup - env: - CI_SERVER: 1 - DOKUWIKI: ${{ matrix.dokuwiki-branch }} - run: sh travis.sh - - - uses: actions/checkout@v3 - - - name: Run PHPUnit - uses: php-actions/phpunit@master - with: - memory_limit: "256M" - args: --verbose --stderr --group plugin_bureaucracy _test