Index: trunk/phase3/includes/parser/Parser.php |
— | — | @@ -2855,12 +2855,6 @@ |
2856 | 2856 | if($wgContLang->hasVariants() && $title->getArticleID() == 0){ |
2857 | 2857 | $wgContLang->findVariantLink( $part1, $title, true ); |
2858 | 2858 | } |
2859 | | - # Do infinite loop check |
2860 | | - if ( !$frame->loopCheck( $title ) ) { |
2861 | | - $found = true; |
2862 | | - $text = '<span class="error">' . wfMsgForContent( 'parser-template-loop-warning', $titleText ) . '</span>'; |
2863 | | - wfDebug( __METHOD__.": template loop broken at '$titleText'\n" ); |
2864 | | - } |
2865 | 2859 | # Do recursion depth check |
2866 | 2860 | $limit = $this->mOptions->getMaxTemplateDepth(); |
2867 | 2861 | if ( $frame->depth >= $limit ) { |
— | — | @@ -2910,6 +2904,14 @@ |
2911 | 2905 | } |
2912 | 2906 | $found = true; |
2913 | 2907 | } |
| 2908 | + |
| 2909 | + # Do infinite loop check |
| 2910 | + # This has to be done after redirect resolution to avoid infinite loops via redirects |
| 2911 | + if ( !$frame->loopCheck( $title ) ) { |
| 2912 | + $found = true; |
| 2913 | + $text = '<span class="error">' . wfMsgForContent( 'parser-template-loop-warning', $titleText ) . '</span>'; |
| 2914 | + wfDebug( __METHOD__.": template loop broken at '$titleText'\n" ); |
| 2915 | + } |
2914 | 2916 | wfProfileOut( __METHOD__ . '-loadtpl' ); |
2915 | 2917 | } |
2916 | 2918 | |