Lines Matching +full:dokuwiki +full:- +full:release

4  * DokuWiki Action component of DiffPreview Plugin
6 * @license GPL-2.0-or-later (http://www.gnu.org/licenses/gpl.html)
14 * Register its handlers with the DokuWiki's event controller
18 …$controller->register_hook('HTML_EDITFORM_OUTPUT', 'BEFORE', $this, '_edit_form'); // release Hogf…
19 …$controller->register_hook('FORM_EDIT_OUTPUT', 'BEFORE', $this, '_edit_form'); // release Igor and…
21 … $controller->register_hook('ACTION_ACT_PREPROCESS', 'BEFORE', $this, '_action_act_preprocess');
22 $controller->register_hook('TPL_ACT_UNKNOWN', 'BEFORE', $this, '_tpl_act_changes');
30 $form = $event->data;
32 /* Check the DokuWiki release */
33 if (is_a($form, \dokuwiki\Form\Form::class)) {
34 /* release Igor and above */
36 $pos = $form->findPositionByAttribute('id', 'edbtn__preview');
38 $form->addButton('do[changes]', $this->getLang('changes'), $pos+1)
39 ->attr('type', 'submit')
40 ->attrs(['accesskey' => 'c', 'tabindex' => '5'])
41 ->id('edbtn__changes');
45 /* release Hogfather and below */
47 $preview = $form->findElementById('edbtn__preview');
49 $form->insertElement($preview+1,
50 form_makeButton('submit', 'changes', $this->getLang('changes'),
63 $action =& $event->data;
71 /* We check the DokuWiki release */
72 if (class_exists('\\dokuwiki\\ActionRouter', false)) {
73 /* release Greebo and above */
75 /* See ActionRouter->setupAction() and Action\Preview */
77 $ae = new dokuwiki\Action\Edit();
78 $ae->checkPreconditions();
79 $this->savedraft();
80 $ae->preProcess();
82 $event->stopPropagation();
83 $event->preventDefault();
86 /* release Frusterick Manners and below */
95 $event->stopPropagation();
96 $event->preventDefault();
116 if ('changes' != $event->data) return;
118 /* Check the DokuWiki release */
121 spl_autoload('\\dokuwiki\\Ui\\Editor');
123 if (class_exists('\\dokuwiki\\Ui\\Editor', false)) {
124 /* release Igor and above */
125 (new helper_plugin_diffpreview_changes)->tplContent();
127 /* release Hogfather and below */
133 $event->preventDefault();
140 * Copied from dokuwiki\Action\Preview (inc/Action/Preview.php)
148 if (class_exists('\\dokuwiki\\Draft', false)) {
149 /* Release Hogfather (and above) */
151 $draft = new \dokuwiki\Draft($ID, $INFO['client']);
152 if (!$draft->saveDraft()) {
153 $errors = $draft->getErrors();
155 msg(hsc($error), -1);
160 /* Release Greebo and below */
163 if (!$INPUT->post->has('wikitext')) return;
171 'prefix' => substr($INPUT->post->str('prefix'), 0, -1),
172 'text' => $INPUT->post->str('wikitext'),
173 'suffix' => $INPUT->post->str('suffix'),
174 'date' => $INPUT->post->int('date'),