dokuwiki/inc
Andreas Gohr bdf09125c4 set page context in Handler
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.
2020-09-28 16:59:46 +02:00
..
Action use correct class for Sitemap generation. fixes #3134 2020-06-04 13:35:21 +02:00
Cache remove calls to deprecated methods and classes 2020-05-01 23:30:25 +02:00
ChangeLog PSR2 style fixes 2019-02-24 09:29:27 +01:00
Debug better deprecation messages for self required plugin base files 2020-08-13 13:40:39 +02:00
Extension fallback to auth_login check when trustExternal returns null 2020-03-09 20:10:54 -04:00
Form Fix curly brace syntax. PHP 7.3 deprecations in inc/ directory. 2019-10-31 13:24:50 +01:00
HTTP Update HTTPClient.php 2020-06-14 02:33:52 +02:00
Input adjusted the Input clases for PSR2 2019-02-19 20:39:13 +01:00
Menu relax Revert permission to EDIT from manager 2020-03-02 21:39:16 -05:00
Parsing Public access to patterns in external link parser 2020-08-12 09:53:38 +02:00
Remote Merge pull request #3115 from moisesbr-dw/sort-with-collator 2020-08-26 10:06:20 +02:00
Search Fixed inconsistent handling of falsy values on fperm setting 2020-02-18 19:29:53 +01:00
Sitemap First go at moving the plugin classes into their own namespace 2019-04-20 21:33:23 +02:00
Subscriptions check if user is empty in userSubscription, fixes #2003 2020-03-25 16:00:30 -04:00
Ui wrap sorting functions into their own class 2020-08-11 14:06:33 +02:00
Utf8 Merge pull request #3115 from moisesbr-dw/sort-with-collator 2020-08-26 10:06:20 +02:00
lang translation update 2020-09-03 01:15:52 +02:00
parser set page context in Handler 2020-09-28 16:59:46 +02:00
.htaccess Fix .htaccess files for Apache 2.4 (and 2.2) 2018-06-17 16:48:11 +02:00
ActionRouter.php Fix typo in error message 2020-06-07 11:45:15 +02:00
Ajax.php Merge pull request #3115 from moisesbr-dw/sort-with-collator 2020-08-26 10:06:20 +02:00
DifferenceEngine.php remove string argument in assert - DiffEngine 2017-12-27 07:14:10 +08:00
Draft.php First go at moving the plugin classes into their own namespace 2019-04-20 21:33:23 +02:00
FeedParser.php PSR2 cleanup for the feedparser override 2019-02-24 09:27:58 +01:00
FeedParserFile.php Rename HTTPClient namespace to HTTP 2019-03-26 22:05:09 +01:00
IXR_Library.php Fix #2883 2019-10-17 06:26:20 +02:00
JpegMeta.php Fix curly brace syntax. PHP 7.3 deprecations in inc/ directory. 2019-10-31 13:24:50 +01:00
Mailer.class.php Checks for PHP mail in install.php and warns if mail used after install (#3056) 2020-05-16 23:24:21 -04:00
Manifest.php deprecated trigger_event() in favor of a static method on Event 2019-04-20 21:48:53 +02:00
PassHash.php fix typo in phpdoc comment 2020-03-07 12:17:04 -05:00
SafeFN.class.php replaced deprecated utf8 functions 2019-06-10 16:12:59 +02:00
StyleUtils.php Merge branch 'master' into psr2 2019-10-10 09:22:24 +02:00
TaskRunner.php remove calls to deprecated methods and classes 2020-05-01 23:30:25 +02:00
actions.php deprecated trigger_event() in favor of a static method on Event 2019-04-20 21:48:53 +02:00
auth.php Move defines to their own file 2020-06-04 08:22:16 +02:00
cache.php deprecated trigger_event() in favor of a static method on Event 2019-04-20 21:48:53 +02:00
changelog.php Move defines to their own file 2020-06-04 08:22:16 +02:00
cli.php Fix curly brace syntax. PHP 7.3 deprecations in inc/ directory. 2019-10-31 13:24:50 +01:00
common.php Move defines to their own file 2020-06-04 08:22:16 +02:00
compatibility.php Checks for PHP mail in install.php and warns if mail used after install (#3056) 2020-05-16 23:24:21 -04:00
config_cascade.php Use config cascade for style.ini files 2019-02-28 13:45:19 +01:00
confutils.php remove jQuery Migrate as outlined in #1546 2020-05-02 11:54:12 +02:00
defines.php Move defines to their own file 2020-06-04 08:22:16 +02:00
deprecated.php Extract dokuwiki\Search\Indexer class 2020-01-06 19:59:09 +01:00
farm.php line lengths shortened 2018-04-27 19:07:43 +02:00
fetch.functions.php fixed some line length errors 2019-07-14 21:18:21 +02:00
form.php ignore PSR2 in the old form class 2019-07-14 21:04:31 +02:00
fulltext.php wrap sorting functions into their own class 2020-08-11 14:06:33 +02:00
html.php Remove obsolete attributes at <script> tag 2020-03-02 10:03:06 -05:00
httputils.php streamline zlib checking #1410 2015-11-27 09:29:01 +01:00
indexer.php Extract dokuwiki\Search\Indexer class 2020-01-06 19:59:09 +01:00
infoutils.php increase minimum PHP version to 7.2 2020-08-12 17:39:37 +02:00
init.php Respect fmode config setting 2020-02-18 21:46:31 +01:00
io.php Fixed inconsistent handling of falsy values on fperm setting 2020-02-18 19:29:53 +01:00
legacy.php First go at moving the plugin classes into their own namespace 2019-04-20 21:33:23 +02:00
load.php wrap sorting functions into their own class 2020-08-11 14:06:33 +02:00
mail.php removed deprecated mail_send() 2020-05-01 23:40:32 +02:00
media.php Merge pull request #3115 from moisesbr-dw/sort-with-collator 2020-08-26 10:06:20 +02:00
pageutils.php fix hierarchical breadcrumbs #3114 2020-06-02 11:14:18 +02:00
parserutils.php set page context in Handler 2020-09-28 16:59:46 +02:00
pluginutils.php remove calls to deprecated methods and classes 2020-05-01 23:30:25 +02:00
preload.php.dist improved comments, added link to farm.php 2012-07-08 15:14:53 +01:00
search.php wrap sorting functions into their own class 2020-08-11 14:06:33 +02:00
template.php fix formatting errors in template.php 2020-06-02 10:33:20 +02:00
toolbar.php fix slash regression in toolbar signature #3045 2020-04-13 22:49:50 -04:00
utf8.php Merge branch 'master' into psr2 2019-10-10 09:22:24 +02:00