Index: branches/wmf/1.18wmf1/includes/job/RefreshLinksJob.php |
— | — | @@ -115,6 +115,22 @@ |
116 | 116 | $options = new ParserOptions; |
117 | 117 | $parserOutput = $wgParser->parse( $revision->getText(), $title, $options, true, true, $revision->getId() ); |
118 | 118 | wfProfileOut( __METHOD__.'-parse' ); |
| 119 | + |
| 120 | + // HACK for debugging bug 31576 --Roan |
| 121 | + $templates = $parserOutput->getTemplates(); |
| 122 | + if ( isset( $templates[NS_TEMPLATE] ) ) { |
| 123 | + $badStuff = array_intersect( array( 'NAMESPACE', 'PAGENAME', 'SERVER', 'CONTENTLANGUAGE', 'PAGENAMEE' ), array_keys( $templates[NS_TEMPLATE] ) ); |
| 124 | + if ( $badStuff !== array() ) { |
| 125 | + $hostname = wfHostname(); |
| 126 | + $wiki = wfWikiID(); |
| 127 | + $bad = implode( ', ', $badStuff ); |
| 128 | + $parsedPage = $title->getPrefixedText(); |
| 129 | + $jobPage = $this->title->getPrefixedText(); |
| 130 | + wfErrorLog( "JOB QUEUE bad templates: $bad when parsing [[$parsedPage]] on $wiki by $hostname job for [[$jobPage]]\n", 'udp://10.0.5.8:8420/bug31576jq' ); |
| 131 | + } |
| 132 | + } |
| 133 | + |
| 134 | + |
119 | 135 | wfProfileIn( __METHOD__.'-update' ); |
120 | 136 | $update = new LinksUpdate( $title, $parserOutput, false ); |
121 | 137 | $update->doUpdate(); |