From 3ba030bc63ef5c34e7077cb462b506fbb0e508d2 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sat, 17 Dec 2005 06:26:27 +0000 Subject: [PATCH] * Use $wgOut->parse() in wfGetSiteNotice() instead of creating a new parser instance. This allows use of extension hooks if required. --- RELEASE-NOTES | 2 ++ includes/GlobalFunctions.php | 4 +--- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 95b3f3e87a..ef29a8833b 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -332,6 +332,8 @@ fully support the editing toolbar, but was found to be too confusing. * (bug 3493) Mark edits patrolled when they are reverted patch by Leon Planken * Add a hook for additional user creation throttle / limiter extensions +* Use $wgOut->parse() in wfGetSiteNotice() instead of creating a new parser + instance. This allows use of extension hooks if required. === Caveats === diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index 45e1e0c8a4..8b97d8d8ad 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -1298,9 +1298,7 @@ function wfGetSiteNotice() { $notice = $wgSiteNotice; } if($notice != '-' && $notice != '') { - $specialparser = new Parser(); - $parserOutput = $specialparser->parse( $notice, $wgTitle, $wgOut->mParserOptions, false ); - $notice = $parserOutput->getText(); + $notice = $wgOut->parse( $notice ); } wfProfileOut( $fname ); return $notice; -- 2.20.1