bdf09125c4
Under some circumstances it is useful to know if the current parsing process is running in a page context or not. One of the examples is the struct plugin's use of the PARSER_HANDLER_DONE event to automatically inject its own output instruction. Currently this instruction is injected in each and every processing and only on rendering is decided if there is anything to output. This patch injects a page hint into the Handler when the handler was created from our p_wiki_xhtml() method (and only then). Plugins can use the getPage() method to check the context if needed. Note: currently p_wiki_xhtml() also modifies the global $ID variable which might also used as context hint (but will also be set during on-the-fly renders, eg. the preview intro text). It would probably be a good idea to check if it would be better when all handle methods rely on getPage() instead of global $ID instead. This would be a major change in parsing though and needs serious testing while this addition has basically no consequences currently. |
||
---|---|---|
.github/workflows | ||
_test | ||
bin | ||
conf | ||
data | ||
inc | ||
lib | ||
vendor | ||
.editorconfig | ||
.gitattributes | ||
.gitignore | ||
.htaccess.dist | ||
.travis.yml | ||
COPYING | ||
README | ||
appveyor.yml | ||
composer.json | ||
composer.lock | ||
doku.php | ||
feed.php | ||
index.php | ||
install.php |
README
All documentation for DokuWiki is available online at https://www.dokuwiki.org/ For Installation Instructions see https://www.dokuwiki.org/install DokuWiki - 2004-2020 (c) Andreas Gohr <andi@splitbrain.org> and the DokuWiki Community See COPYING and file headers for license info