mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/CiteThisPage
synced 2025-01-06 11:14:06 +00:00
Revert r66934 (Removing wfLoadExtensionMessages() from everything). I disagree on principle...we branch extensions for this very reason. But people want trunk extensions compatible for several versions back, meh.
This commit is contained in:
parent
695d3db96e
commit
8889add2cf
|
@ -152,6 +152,7 @@ class Cite {
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function ref( $str, $argv, $parser ) {
|
function ref( $str, $argv, $parser ) {
|
||||||
|
wfLoadExtensionMessages( 'Cite' );
|
||||||
if ( $this->mInCite ) {
|
if ( $this->mInCite ) {
|
||||||
return htmlspecialchars( "<ref>$str</ref>" );
|
return htmlspecialchars( "<ref>$str</ref>" );
|
||||||
} else {
|
} else {
|
||||||
|
@ -452,6 +453,7 @@ class Cite {
|
||||||
* @return string
|
* @return string
|
||||||
*/
|
*/
|
||||||
function references( $str, $argv, $parser ) {
|
function references( $str, $argv, $parser ) {
|
||||||
|
wfLoadExtensionMessages( 'Cite' );
|
||||||
if ( $this->mInCite || $this->mInReferences ) {
|
if ( $this->mInCite || $this->mInReferences ) {
|
||||||
if ( is_null( $str ) ) {
|
if ( is_null( $str ) ) {
|
||||||
return htmlspecialchars( "<references/>" );
|
return htmlspecialchars( "<references/>" );
|
||||||
|
|
|
@ -33,6 +33,7 @@ $wgSpecialPages['Cite'] = 'SpecialCite';
|
||||||
$wgAutoloadClasses['SpecialCite'] = $dir . 'SpecialCite_body.php';
|
$wgAutoloadClasses['SpecialCite'] = $dir . 'SpecialCite_body.php';
|
||||||
|
|
||||||
function wfSpecialCiteNav( &$skintemplate, &$nav_urls, &$oldid, &$revid ) {
|
function wfSpecialCiteNav( &$skintemplate, &$nav_urls, &$oldid, &$revid ) {
|
||||||
|
wfLoadExtensionMessages( 'SpecialCite' );
|
||||||
// check whether we’re in the right namespace, the $revid has the correct type and is not empty
|
// check whether we’re in the right namespace, the $revid has the correct type and is not empty
|
||||||
// (what would mean that the current page doesn’t exist)
|
// (what would mean that the current page doesn’t exist)
|
||||||
if ( $skintemplate->mTitle->isContentPage() && $revid !== 0 && !empty( $revid ) )
|
if ( $skintemplate->mTitle->isContentPage() && $revid !== 0 && !empty( $revid ) )
|
||||||
|
@ -50,6 +51,7 @@ function wfSpecialCiteToolbox( &$skin ) {
|
||||||
global $wgUser;
|
global $wgUser;
|
||||||
|
|
||||||
if ( isset( $skin->data['nav_urls']['cite'] ) ) {
|
if ( isset( $skin->data['nav_urls']['cite'] ) ) {
|
||||||
|
wfLoadExtensionMessages( 'SpecialCite' );
|
||||||
echo Html::rawElement(
|
echo Html::rawElement(
|
||||||
'li',
|
'li',
|
||||||
array( 'id' => 't-cite' ),
|
array( 'id' => 't-cite' ),
|
||||||
|
|
|
@ -15,6 +15,7 @@ class SpecialCite extends SpecialPage {
|
||||||
|
|
||||||
function execute( $par ) {
|
function execute( $par ) {
|
||||||
global $wgOut, $wgRequest, $wgUseTidy;
|
global $wgOut, $wgRequest, $wgUseTidy;
|
||||||
|
wfLoadExtensionMessages( 'SpecialCite' );
|
||||||
|
|
||||||
// Having tidy on causes whitespace and <pre> tags to
|
// Having tidy on causes whitespace and <pre> tags to
|
||||||
// be generated around the output of the CiteOutput
|
// be generated around the output of the CiteOutput
|
||||||
|
|
Loading…
Reference in a new issue