X-Git-Url: https://git.cyclocoop.org/admin/?a=blobdiff_plain;f=includes%2Fparser%2FParser.php;h=0f57d571b2190104020fff7ab7898cfe1dbf0633;hb=2e17030282b861fe0cf6895ab36b3ae91a3d32b1;hp=02f29cf6f1763f4e131e450890e7f7d953f406ba;hpb=86097376ccba6fa40b4a1c7e62f43c00eb5aaca9;p=lhc%2Fweb%2Fwiklou.git
diff --git a/includes/parser/Parser.php b/includes/parser/Parser.php
index 02f29cf6f1..0f57d571b2 100644
--- a/includes/parser/Parser.php
+++ b/includes/parser/Parser.php
@@ -2855,12 +2855,6 @@ class Parser
if($wgContLang->hasVariants() && $title->getArticleID() == 0){
$wgContLang->findVariantLink( $part1, $title, true );
}
- # Do infinite loop check
- if ( !$frame->loopCheck( $title ) ) {
- $found = true;
- $text = '' . wfMsgForContent( 'parser-template-loop-warning', $titleText ) . '';
- wfDebug( __METHOD__.": template loop broken at '$titleText'\n" );
- }
# Do recursion depth check
$limit = $this->mOptions->getMaxTemplateDepth();
if ( $frame->depth >= $limit ) {
@@ -2910,6 +2904,14 @@ class Parser
}
$found = true;
}
+
+ # Do infinite loop check
+ # This has to be done after redirect resolution to avoid infinite loops via redirects
+ if ( !$frame->loopCheck( $title ) ) {
+ $found = true;
+ $text = '' . wfMsgForContent( 'parser-template-loop-warning', $titleText ) . '';
+ wfDebug( __METHOD__.": template loop broken at '$titleText'\n" );
+ }
wfProfileOut( __METHOD__ . '-loadtpl' );
}