Mglaser has uploaded a new change for review. (
https://gerrit.wikimedia.org/r/364200 )
Change subject: Checklist: Fixed recursive parser bug
......................................................................
Checklist: Fixed recursive parser bug
Calling the parser during a parse session seems to be problematic.
Using heuristics instead. @RV, internal API call also causes the
error.
Change-Id: If0e7ede9018239281725b953320a899dcc97abf8
---
M Checklist/Checklist.class.php
1 file changed, 5 insertions(+), 1 deletion(-)
git pull
ssh://gerrit.wikimedia.org:29418/mediawiki/extensions/BlueSpiceExtensions
refs/changes/00/364200/1
diff --git a/Checklist/Checklist.class.php b/Checklist/Checklist.class.php
index d404b81..44c1528 100644
--- a/Checklist/Checklist.class.php
+++ b/Checklist/Checklist.class.php
@@ -104,7 +104,11 @@
if ( is_object( $oTitle ) ) {
$oWikiPage = WikiPage::newFromID(
$oTitle->getArticleID() );
if ( is_object( $oWikiPage ) ) {
- $sContent =
$oWikiPage->getContent()->preloadTransform( $oWikiPage->getTitle(), new
ParserOptions() )->getNativeData();
+ $sContent =
$oWikiPage->getContent()->getNativeData();
+ // Noinclude handling
+ // See
https://github.com/wikimedia/mediawiki-extensions-ExternalData/blob/master/ED_GetData.php
+ $sContent = StringUtils::delimiterReplace(
'<noinclude>', '</noinclude>', '', $sContent );
+ $sContent = strtr( $sContent, array(
'<includeonly>' => '', '</includeonly>' => '' ) );
$aLines = explode( "\n", trim( $sContent ) );
foreach ( $aLines as $sLine ) {
if ( strpos( $sLine, '*' ) !== 0 )
return array();
--
To view, visit https://gerrit.wikimedia.org/r/364200
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings
Gerrit-MessageType: newchange
Gerrit-Change-Id: If0e7ede9018239281725b953320a899dcc97abf8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/extensions/BlueSpiceExtensions
Gerrit-Branch: master
Gerrit-Owner: Mglaser <[email protected]>
_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits