r38035 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r38034‎ | r38035 | r38036 >
Date:15:39, 25 July 2008
Author:eloy
Status:old
Tags:
Comment:
avoid php FATAL error when Parser_OldPP is used
Modified paths:
  • /trunk/phase3/maintenance/refreshLinks.inc (modified) (history)

Diff [purge]

Index: trunk/phase3/maintenance/refreshLinks.inc
@@ -17,7 +17,9 @@
1818 $wgUser->setOption('math', MW_MATH_SOURCE);
1919
2020 # Don't generate extension images (e.g. Timeline)
21 - $wgParser->clearTagHooks();
 21+ if( method_exists( $wgParser, "clearTagHooks" ) ) {
 22+ $wgParser->clearTagHooks();
 23+ }
2224
2325 # Don't use HTML tidy
2426 $wgUseTidy = false;
@@ -110,13 +112,13 @@
111113
112114 function fixLinksFromArticle( $id ) {
113115 global $wgTitle, $wgParser;
114 -
 116+
115117 $wgTitle = Title::newFromID( $id );
116118 $dbw = wfGetDB( DB_MASTER );
117119
118120 $linkCache =& LinkCache::singleton();
119121 $linkCache->clear();
120 -
 122+
121123 if ( is_null( $wgTitle ) ) {
122124 return;
123125 }

Status & tagging log