mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Cite
synced 2024-11-28 00:40:12 +00:00
Revert 15644; extensions need to remain self-contained
This commit is contained in:
parent
b3a6f399c7
commit
16a26dbd16
9
Cite.php
9
Cite.php
|
@ -56,15 +56,14 @@ for ( $i = 0; $i < count( $wgCiteErrors['user'] ); ++$i )
|
||||||
define( $wgCiteErrors['user'][$i], $i + 1 );
|
define( $wgCiteErrors['user'][$i], $i + 1 );
|
||||||
|
|
||||||
# Internationalisation file
|
# Internationalisation file
|
||||||
if ( !function_exists( 'extAddMessages' ) ) {
|
|
||||||
require( dirname(__FILE__) . '/../ExtensionFunctions.php' );
|
|
||||||
}
|
|
||||||
require_once( 'Cite.i18n.php' );
|
require_once( 'Cite.i18n.php' );
|
||||||
|
|
||||||
function wfCite() {
|
function wfCite() {
|
||||||
# Add messages
|
# Add messages
|
||||||
global $wgCiteMessages;
|
global $wgMessageCache, $wgCiteMessages;
|
||||||
extAddMessages( $wgCiteMessages );
|
foreach( $wgCiteMessages as $key => $value ) {
|
||||||
|
$wgMessageCache->addMessages( $wgCiteMessages[$key], $key );
|
||||||
|
}
|
||||||
|
|
||||||
class Cite {
|
class Cite {
|
||||||
/**#@+
|
/**#@+
|
||||||
|
|
|
@ -23,9 +23,6 @@ $wgExtensionCredits['specialpage'][] = array(
|
||||||
);
|
);
|
||||||
|
|
||||||
# Internationalisation file
|
# Internationalisation file
|
||||||
if ( !function_exists( 'extAddMessages' ) ) {
|
|
||||||
require( dirname(__FILE__) . '/../ExtensionFunctions.php' );
|
|
||||||
}
|
|
||||||
require_once( 'SpecialCite.i18n.php' );
|
require_once( 'SpecialCite.i18n.php' );
|
||||||
|
|
||||||
$wgHooks['SkinTemplateBuildNavUrlsNav_urlsAfterPermalink'][] = 'wfSpecialCiteNav';
|
$wgHooks['SkinTemplateBuildNavUrlsNav_urlsAfterPermalink'][] = 'wfSpecialCiteNav';
|
||||||
|
@ -38,8 +35,10 @@ extAddSpecialPage( dirname(__FILE__) . '/SpecialCite_body.php', 'Cite', 'Special
|
||||||
|
|
||||||
function wfSpecialCite() {
|
function wfSpecialCite() {
|
||||||
# Add messages
|
# Add messages
|
||||||
global $wgSpecialCiteMessages;
|
global $wgMessageCache, $wgSpecialCiteMessages;
|
||||||
extAddMessages( $wgSpecialCiteMessages );
|
foreach( $wgSpecialCiteMessages as $key => $value ) {
|
||||||
|
$wgMessageCache->addMessages( $wgSpecialCiteMessages[$key], $key );
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
function wfSpecialCiteNav( &$skintemplate, &$nav_urls, &$oldid, &$revid ) {
|
function wfSpecialCiteNav( &$skintemplate, &$nav_urls, &$oldid, &$revid ) {
|
||||||
|
|
Loading…
Reference in a new issue