Add script 'get-openssl-version.sh'.

This commit is contained in:
2023-06-21 11:09:08 +02:00
parent 0a7a61049a
commit 14056b44dd
5032 changed files with 340126 additions and 0 deletions

View File

@ -0,0 +1,47 @@
<?php
namespace dokuwiki\Action;
use dokuwiki\Ui;
/**
* Class Preview
*
* preview during editing
*
* @package dokuwiki\Action
*/
class Preview extends Edit
{
/** @inheritdoc */
public function preProcess()
{
header('X-XSS-Protection: 0');
$this->savedraft();
parent::preProcess();
}
/** @inheritdoc */
public function tplContent()
{
global $TEXT;
(new Ui\Editor)->show();
(new Ui\PageView($TEXT))->show();
}
/**
* Saves a draft on preview
*/
protected function savedraft()
{
global $ID, $INFO;
$draft = new \dokuwiki\Draft($ID, $INFO['client']);
if (!$draft->saveDraft()) {
$errors = $draft->getErrors();
foreach ($errors as $error) {
msg(hsc($error), -1);
}
}
}
}