From 16a26dbd1659951b23474e834195ed85ae42ecb6 Mon Sep 17 00:00:00 2001 From: Brion Vibber Date: Sun, 16 Jul 2006 21:43:23 +0000 Subject: [PATCH] Revert 15644; extensions need to remain self-contained --- Cite.php | 9 ++++----- SpecialCite.php | 9 ++++----- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/Cite.php b/Cite.php index af7be8f8f..3a2cf6709 100644 --- a/Cite.php +++ b/Cite.php @@ -56,15 +56,14 @@ for ( $i = 0; $i < count( $wgCiteErrors['user'] ); ++$i ) define( $wgCiteErrors['user'][$i], $i + 1 ); # Internationalisation file -if ( !function_exists( 'extAddMessages' ) ) { - require( dirname(__FILE__) . '/../ExtensionFunctions.php' ); -} require_once( 'Cite.i18n.php' ); function wfCite() { # Add messages - global $wgCiteMessages; - extAddMessages( $wgCiteMessages ); + global $wgMessageCache, $wgCiteMessages; + foreach( $wgCiteMessages as $key => $value ) { + $wgMessageCache->addMessages( $wgCiteMessages[$key], $key ); + } class Cite { /**#@+ diff --git a/SpecialCite.php b/SpecialCite.php index 4add98305..399362eb7 100644 --- a/SpecialCite.php +++ b/SpecialCite.php @@ -23,9 +23,6 @@ $wgExtensionCredits['specialpage'][] = array( ); # Internationalisation file -if ( !function_exists( 'extAddMessages' ) ) { - require( dirname(__FILE__) . '/../ExtensionFunctions.php' ); -} require_once( 'SpecialCite.i18n.php' ); $wgHooks['SkinTemplateBuildNavUrlsNav_urlsAfterPermalink'][] = 'wfSpecialCiteNav'; @@ -38,8 +35,10 @@ extAddSpecialPage( dirname(__FILE__) . '/SpecialCite_body.php', 'Cite', 'Special function wfSpecialCite() { # Add messages - global $wgSpecialCiteMessages; - extAddMessages( $wgSpecialCiteMessages ); + global $wgMessageCache, $wgSpecialCiteMessages; + foreach( $wgSpecialCiteMessages as $key => $value ) { + $wgMessageCache->addMessages( $wgSpecialCiteMessages[$key], $key ); + } } function wfSpecialCiteNav( &$skintemplate, &$nav_urls, &$oldid, &$revid ) {