From: Krzysztof Krzyzaniak Date: Fri, 25 Jul 2008 15:39:12 +0000 (+0000) Subject: avoid php FATAL error when Parser_OldPP is used X-Git-Tag: 1.31.0-rc.0~46374 X-Git-Url: http://git.cyclocoop.org/%28?a=commitdiff_plain;h=1017ca7346f543de94f99a9f4be8368e4375dc1c;p=lhc%2Fweb%2Fwiklou.git avoid php FATAL error when Parser_OldPP is used --- diff --git a/maintenance/refreshLinks.inc b/maintenance/refreshLinks.inc index 6d68e27782..036d4109c8 100644 --- a/maintenance/refreshLinks.inc +++ b/maintenance/refreshLinks.inc @@ -17,7 +17,9 @@ function refreshLinks( $start, $newOnly = false, $maxLag = false, $end = 0, $red $wgUser->setOption('math', MW_MATH_SOURCE); # Don't generate extension images (e.g. Timeline) - $wgParser->clearTagHooks(); + if( method_exists( $wgParser, "clearTagHooks" ) ) { + $wgParser->clearTagHooks(); + } # Don't use HTML tidy $wgUseTidy = false; @@ -110,13 +112,13 @@ function fixRedirect( $id ){ function fixLinksFromArticle( $id ) { global $wgTitle, $wgParser; - + $wgTitle = Title::newFromID( $id ); $dbw = wfGetDB( DB_MASTER ); $linkCache =& LinkCache::singleton(); $linkCache->clear(); - + if ( is_null( $wgTitle ) ) { return; }