From cae54ce5e0c85b8fdd304ed86bd5d482eca6d2cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=BCdiger=20Kessel?= Date: Fri, 13 Oct 2023 22:53:08 +0200 Subject: [PATCH] fix: typo --- conf/default.php | 2 +- conf/metadata.php | 2 +- lang/en/settings.php | 2 +- plugin.info.txt | 2 +- remote.php | 33 +++++++++++++++++++++++++++++++++ syntax/base.php | 5 +++-- 6 files changed, 40 insertions(+), 6 deletions(-) create mode 100644 remote.php diff --git a/conf/default.php b/conf/default.php index 4254409..375455a 100644 --- a/conf/default.php +++ b/conf/default.php @@ -6,7 +6,7 @@ * @author Rüdiger Kessel */ -$conf['save_mode'] = 'server'; +$conf['safe_mode'] = 'server'; $conf['adoc2html'] = 'browser'; $conf['exec_node'] = 'node'; $conf['use_kroki'] = 1; diff --git a/conf/metadata.php b/conf/metadata.php index 6651509..761c259 100644 --- a/conf/metadata.php +++ b/conf/metadata.php @@ -7,7 +7,7 @@ */ $meta['use_css'] = array('onoff'); -$meta['save_mode'] = array('multichoice','_choices' => array('unsave','save','server','secure')); +$meta['safe_mode'] = array('multichoice','_choices' => array('unsafe','safe','server','secure')); $meta['adoc2html'] = array('multichoice','_choices' => array('browser','server')); $meta['exec_node'] = array('string'); $meta['use_kroki'] = array('onoff'); diff --git a/lang/en/settings.php b/lang/en/settings.php index 97022e8..784e30f 100644 --- a/lang/en/settings.php +++ b/lang/en/settings.php @@ -5,7 +5,7 @@ * @author Rüdiger Kessel */ -$lang['save_mode'] = 'Asciidoctor save mode (see https://docs.asciidoctor.org/asciidoctor/latest/safe-modes/)'; +$lang['safe_mode'] = 'Asciidoctor safe mode (see https://docs.asciidoctor.org/asciidoctor/latest/safe-modes/)'; $lang['adoc2html'] = 'Processing of the asciidoc to html conversion'; $lang['exec_node'] = 'node.js executable'; $lang['use_kroki'] = 'Use Kroki Extension for AsciiDoctor (see https://github.com/ggrossetie/asciidoctor-kroki)'; diff --git a/plugin.info.txt b/plugin.info.txt index 20727b8..9b9fdec 100644 --- a/plugin.info.txt +++ b/plugin.info.txt @@ -3,5 +3,5 @@ author Rüdiger Kessel email ruediger.kessel@gmail.com date 2023-09-23 name asciidocjs plugin -desc Us asciidoc in Dokuwiki +desc Use asciidoc in Dokuwiki url https://www.dokuwiki.org/plugin:asciidocjs diff --git a/remote.php b/remote.php new file mode 100644 index 0000000..d314512 --- /dev/null +++ b/remote.php @@ -0,0 +1,33 @@ + [ + 'args' => ['string','int','int'], + 'return' => 'string' + ], + 'test' => [ + 'args' => [], + 'return' => 'string' + ] + ]; + } + + public function getMediaToken($id, $w, $h) { + return media_get_token($id, $w, $h); + } + public function test() { + return 'Test'; + } +} + + diff --git a/syntax/base.php b/syntax/base.php index daf9f4e..c1badfc 100644 --- a/syntax/base.php +++ b/syntax/base.php @@ -57,7 +57,8 @@ public function getSort() *

* @param $aNode String Path to the node.js exe. * @param $aAscdoc String The asciidoc text to convert. - * @param $aSave_mode String AsciiDoctor save mode for the conversion. + * @param $extensions array List of extensions. + * @param $params array Conversion parameters. */ public function runAsciidoctor($node, $ascdoc, $extensions, $params) { @@ -108,7 +109,7 @@ public function getExtensions() } public function getParams() { - $params = array("safe" => $this->getConf('save_mode'), + $params = array("safe" => $this->getConf('safe_mode'), "header_footer" => false, "attributes" => array( "DOKUWIKI_BASE" => DOKU_BASE,