re-declare deprecated functions for backward compatibility
`dbg_deprecated()` is called in `html_diff_head()`, `html_diff_navigation()`, `html_diff_navigationlink()`, and following functions: * `html_denied()` is not used any plugins, but added fallback just in case. * `html_locked()` is used by one third-party plugin (AjaxEdit), fallback should be added. * `html_insert_softbreaks()` is used by one third-party plugin (TOS, terms of service), fallback should be added.
This commit is contained in:
parent
87f229e8ab
commit
a215faf2fc
|
@ -36,7 +36,7 @@ class Denied extends AbstractAclAction
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function showBanner()
|
||||
public function showBanner()
|
||||
{
|
||||
// print intro
|
||||
print p_locale_xhtml('denied');
|
||||
|
|
|
@ -33,7 +33,7 @@ class Locked extends AbstractAction
|
|||
*
|
||||
* @return void
|
||||
*/
|
||||
protected function showBanner()
|
||||
public function showBanner()
|
||||
{
|
||||
global $ID;
|
||||
global $conf;
|
||||
|
|
|
@ -477,7 +477,7 @@ class Diff extends Ui
|
|||
* @param string $diffhtml
|
||||
* @return string
|
||||
*/
|
||||
protected function insertSoftbreaks($diffhtml)
|
||||
public function insertSoftbreaks($diffhtml)
|
||||
{
|
||||
// search the diff html string for both:
|
||||
// - html tags, so these can be ignored
|
||||
|
|
72
inc/html.php
72
inc/html.php
|
@ -56,7 +56,8 @@ function html_login($svg = false) {
|
|||
* @deprecated 2020-07-18 not called anymore, see inc/Action/Denied::tplContent()
|
||||
*/
|
||||
function html_denied() {
|
||||
dbg_deprecated('see '. \dokuwiki\Action\Denied::class);
|
||||
dbg_deprecated(\dokuwiki\Action\Denied::class .'::showBanner()');
|
||||
(new dokuwiki\Action\Denied())->showBanner();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -284,7 +285,8 @@ function html_hilight($html, $phrases) {
|
|||
* @deprecated 2020-07-18 not called anymore, see inc/Action/Locked::tplContent()
|
||||
*/
|
||||
function html_locked() {
|
||||
dbg_deprecated('see '. \dokuwiki\Action\Locked::class);
|
||||
dbg_deprecated(\dokuwiki\Action\Locked::class .'::showBanner()');
|
||||
(new dokuwiki\Action\Locked())->showBanner();
|
||||
}
|
||||
|
||||
/**
|
||||
|
@ -467,6 +469,21 @@ function html_backlinks() {
|
|||
(new dokuwiki\Ui\Backlinks)->show();
|
||||
}
|
||||
|
||||
/**
|
||||
* Get header of diff HTML
|
||||
*
|
||||
* @param string $l_rev Left revisions
|
||||
* @param string $r_rev Right revision
|
||||
* @param string $id Page id, if null $ID is used
|
||||
* @param bool $media If it is for media files
|
||||
* @param bool $inline Return the header on a single line
|
||||
* @return string[] HTML snippets for diff header
|
||||
* @deprecated 2020-07-18
|
||||
*/
|
||||
function html_diff_head($l_rev, $r_rev, $id = null, $media = false, $inline = false) {
|
||||
dbg_deprecated('see '. \dokuwiki\Ui\Diff::class .'::diffHead()');
|
||||
}
|
||||
|
||||
/**
|
||||
* Show diff
|
||||
* between current page version and provided $text
|
||||
|
@ -483,6 +500,57 @@ function html_diff($text = '', $intro = true, $type = null) {
|
|||
(new dokuwiki\Ui\Diff($text, $intro, $type))->show();
|
||||
}
|
||||
|
||||
/**
|
||||
* Create html for revision navigation
|
||||
*
|
||||
* @param PageChangeLog $pagelog changelog object of current page
|
||||
* @param string $type inline vs sidebyside
|
||||
* @param int $l_rev left revision timestamp
|
||||
* @param int $r_rev right revision timestamp
|
||||
* @return string[] html of left and right navigation elements
|
||||
* @deprecated 2020-07-18
|
||||
*/
|
||||
function html_diff_navigation($pagelog, $type, $l_rev, $r_rev) {
|
||||
dbg_deprecated('see '. \dokuwiki\Ui\Diff::class .'::diffNavigation()');
|
||||
}
|
||||
|
||||
/**
|
||||
* Create html link to a diff defined by two revisions
|
||||
*
|
||||
* @param string $difftype display type
|
||||
* @param string $linktype
|
||||
* @param int $lrev oldest revision
|
||||
* @param int $rrev newest revision or null for diff with current revision
|
||||
* @return string html of link to a diff
|
||||
* @deprecated 2020-07-18
|
||||
*/
|
||||
function html_diff_navigationlink($difftype, $linktype, $lrev, $rrev = null) {
|
||||
dbg_deprecated('see '. \dokuwiki\Ui\Diff::class .'::diffViewlink()');
|
||||
}
|
||||
|
||||
/**
|
||||
* Insert soft breaks in diff html
|
||||
*
|
||||
* @param string $diffhtml
|
||||
* @return string
|
||||
* @deprecated 2020-07-18
|
||||
*/
|
||||
function html_insert_softbreaks($diffhtml) {
|
||||
dbg_deprecated(\dokuwiki\Ui\Diff::class .'::insertSoftbreaks()');
|
||||
(new dokuwiki\Ui\Diff())->insertSoftbreaks($diffhtml);
|
||||
}
|
||||
|
||||
/**
|
||||
* callback which adds softbreaks
|
||||
*
|
||||
* @param array $match array with first the complete match
|
||||
* @return string the replacement
|
||||
* @deprecated 2020-07-18
|
||||
*/
|
||||
function html_softbreak_callback($match){
|
||||
dbg_deprecated('integrated into '. \dokuwiki\Ui\Diff::class .'::insertSoftbreaks()');
|
||||
}
|
||||
|
||||
/**
|
||||
* show warning on conflict detection
|
||||
*
|
||||
|
|
Loading…
Reference in New Issue