devel:releases:refactor2
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revision | ||
devel:releases:refactor2 [2020-09-03 15:11] – [Only new events with dokuwiki\Form\Form from DokuWiki] s-sahara | devel:releases:refactor2 [2021-12-19 16:09] (current) – moved to [[devel:releases:refactor2021]] Klap-in | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Refactoring ====== | ||
- | Suggestions for development version (August 2020 and later) of Dokuwiki. | ||
- | [[devel: | ||
- | |||
- | ===== Refactored UI elements using Form\Form class ===== | ||
- | |||
- | Implemented by [[pr> | ||
- | |||
- | ==== Only new events with dokuwiki\Form\Form from DokuWiki ==== | ||
- | |||
- | DokuWiki used before this release '' | ||
- | |||
- | :!: To enable your actions again, the new event handlers have to be implemented as well. The new events should pass the new '' | ||
- | |||
- | |||
- | Changes to the '' | ||
- | <code diff> | ||
- | - Event:: | ||
- | - return $searchForm-> | ||
- | + return $searchForm-> | ||
- | </ | ||
- | |||
- | See for the description of the events: | ||
- | | New |[[devel: | ||
- | | Old |[[devel: | ||
- | |||
- | ==== Removed, deprecated and changed functions ==== | ||
- | |||
- | |||
- | **Removed** functions: [[codesearch> | ||
- | <code diff> | ||
- | - $html = @preg_replace_callback("/ | ||
- | + $html = @preg_replace_callback("/ | ||
- | + | ||
- | + if (!isset($match[2])) { | ||
- | + | ||
- | + } | ||
- | + | ||
- | + }, $html); | ||
- | </ | ||
- | |||
- | <code diff> | ||
- | // if you use only the callback ' | ||
- | - $html = html_buildlist($data, | ||
- | + $html = html_buildlist($data, | ||
- | |||
- | // if you wrote your own buildlist function: | ||
- | - function html_your_buildlist($data, | ||
- | + function html_your_buildlist($data, | ||
- | ... | ||
- | + // set callback function to build the <li> tag, formerly defined as html_li_default() | ||
- | + if (!is_callable($lifunc)) { | ||
- | + $lifunc = function ($item) { | ||
- | + return '< | ||
- | + }; | ||
- | + } | ||
- | </ | ||
- | |||
- | Not visible anymore: | ||
- | <code diff> | ||
- | - $html = html_insert_softbreaks($diffhtml) | ||
- | // See the protected function dokuwiki\Ui\Diff:: | ||
- | </ | ||
- | |||
- | Moved functions: | ||
- | <code diff> | ||
- | - html_edit_form($data) | ||
- | + (new dokuwiki\Ui\Editor)-> | ||
- | |||
- | - $elem = html_minoredit() | ||
- | // See dokuwiki\UI\Editor:: | ||
- | // its code is now inlined: | ||
- | // adds a checkbox for minor edits for logged in users | ||
- | if ($conf[' | ||
- | $form-> | ||
- | $form-> | ||
- | } | ||
- | </ | ||
- | |||
- | |||
- | |||
- | Deprecated functions: [[codesearch> | ||
- | |||
- | Deprecated and only used in DokuWiki: [[codesearch> | ||
- | |||
- | |||
- | <code diff> | ||
- | - html_login($svg) | ||
- | + (new dokuwiki\Ui\Login($svg))-> | ||
- | |||
- | - html_denied() | ||
- | + // see \dokuwiki\Action\Denied:: | ||
- | |||
- | - html_showrev() | ||
- | + (new dokuwiki\Ui\PageView)-> | ||
- | |||
- | - html_show($txt) | ||
- | + (new dokuwiki\Ui\PageView($txt))-> | ||
- | |||
- | - html_draft() | ||
- | + (new Ui\PageDraft)-> | ||
- | |||
- | - html_locked() | ||
- | + // see inc/ | ||
- | |||
- | - html_revisions($first, | ||
- | + (new dokuwiki\Ui\Revisions($first, | ||
- | |||
- | - html_recent($first, | ||
- | + (new dokuwiki\Ui\Recent($first, | ||
- | |||
- | - html_index($ns) | ||
- | + (new dokuwiki\Ui\Index($ns))-> | ||
- | |||
- | - $html = html_list_index($item) | ||
- | + $html = (new dokuwiki\Ui\Index)-> | ||
- | |||
- | - $html = html_li_index($item) { | ||
- | + $html = (new dokuwiki\Ui\Index)-> | ||
- | |||
- | - $html = html_buildlist($data, | ||
- | + $html = (new Ui\Index)-> | ||
- | // Note: html_list_index() and html_li_index() are replaced by | ||
- | // [$this,' | ||
- | // [(new dokuwiki\Ui\Index),' | ||
- | CHECK: IS THIS LAST LINE CORRECT?? | ||
- | |||
- | // The general function is still available | ||
- | $html = html_buildlist($data, | ||
- | |||
- | - html_backlinks() { | ||
- | + (new dokuwiki\Ui\Backlinks)-> | ||
- | |||
- | - $html = html_diff_head($l_rev, | ||
- | + $html = (new dokuwiki\Ui\Diff)-> | ||
- | |||
- | - html_diff($text, | ||
- | + (new dokuwiki\Ui\Diff($text, | ||
- | |||
- | - html_conflict($text, | ||
- | + (new dokuwiki\Ui\Conflict($text, | ||
- | |||
- | $text = con($PRE, $TEXT, $SUF); | ||
- | - html_conflict($text, | ||
- | - html_diff($text, | ||
- | + (new Ui\PageConflict($text, | ||
- | |||
- | - html_register() | ||
- | + (new dokuwiki\Ui\UserRegister)-> | ||
- | |||
- | - html_updateprofile() | ||
- | + (new dokuwiki\Ui\UserProfile)-> | ||
- | |||
- | - html_edit() | ||
- | + (new dokuwiki\Ui\Editor)-> | ||
- | |||
- | - html_resendpwd() | ||
- | + (new dokuwiki\Ui\UserResendPwd)-> | ||
- | </ | ||
- | |||
- | <code diff> | ||
- | - tpl_subscribe() | ||
- | + (new \dokuwiki\Ui\Subscribe)-> | ||
- | </ | ||
- | |||
- | Changed function: [[codesearch> | ||
- | <code diff> | ||
- | - html_sizechange($sizechange, | ||
- | + $html = html_sizechange($sizechange) | ||
- | </ | ||
- | ===== Sort with collator ===== | ||
- | |||
- | [[pr> | ||
- | |||
- | Improved sort in different languages. Not backward compatible. Maybe include library with exist check? | ||
- | |||
- | |||
- | ===== Refactor fulltext search functions and class Doku_Indexer ===== | ||
- | |||
- | |||
- | [[pr> |
devel/releases/refactor2.1599138672.txt.gz · Last modified: 2020-09-03 15:11 by s-sahara