ParserOptions: added comment regarding editsections usage.
authordaniel <daniel.kinzler@wikimedia.de>
Thu, 26 Feb 2015 21:35:18 +0000 (22:35 +0100)
committerDaniel Kinzler <daniel.kinzler@wikimedia.de>
Thu, 3 Sep 2015 11:58:27 +0000 (11:58 +0000)
// @note: as of Feb 2015, core never sets the editsection flag, since it uses
// <mw:editsection> tags to inject editsections on the fly. However, extensions
// may be using it by calling ParserOption::optionUsed resp. ParserOutput::registerOption
// directly. At least Wikibase does at this point in time.

Change-Id: Ief95ecb3ae1f5699b788dd3dad0eaf1aa6cc163c

includes/parser/ParserOptions.php

index 4459047..1073aed 100644 (file)
@@ -802,6 +802,10 @@ class ParserOptions {
 
                $confstr .= $wgRenderHashAppend;
 
+               // @note: as of Feb 2015, core never sets the editsection flag, since it uses
+               // <mw:editsection> tags to inject editsections on the fly. However, extensions
+               // may be using it by calling ParserOption::optionUsed resp. ParserOutput::registerOption
+               // directly. At least Wikibase does at this point in time.
                if ( !in_array( 'editsection', $forOptions ) ) {
                        $confstr .= '!*';
                } elseif ( !$this->mEditSection ) {