From 268bc3ca8de22f761e86bd1297225314c7bb8db6 Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Thu, 5 Jun 2008 17:33:31 +0000 Subject: [PATCH] * (Bug 13828) Split parameter $1 (combines title and revision numbers) of MediaWiki:Missingarticle into $1 (=title) and $2 (=revision numbers) for prettier output. --- RELEASE-NOTES | 2 ++ includes/Article.php | 10 ++++------ includes/DifferenceEngine.php | 12 +++++++----- languages/messages/MessagesDe.php | 2 +- languages/messages/MessagesDe_formal.php | 2 +- languages/messages/MessagesEn.php | 2 +- maintenance/language/messages.inc | 2 +- 7 files changed, 17 insertions(+), 15 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 3ae945a529..898af8c360 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -341,6 +341,8 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN * (bug 10080) Users can now modify an existing block without unblocking first. * (bug 12859) $wgRateLimitsExcludedGroups has been deprecated in favor of $wgGroupPermissions[]['noratelimit']. +* (Bug 13828) Split parameter $1 of MediaWiki:Missingarticle into $1 (=title) + and $2 (=revision numbers) === API changes in 1.13 === diff --git a/includes/Article.php b/includes/Article.php index 773e3aa5a3..d709f62730 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -395,10 +395,8 @@ class Article { # Pre-fill content with error message so that if something # fails we'll have something telling us what we intended. $t = $this->mTitle->getPrefixedText(); - if( $oldid ) { - $t .= ' ' . wfMsgExt( 'missingarticle-rev', array( 'escape' ), $oldid ); - } - $this->mContent = wfMsg( 'missingarticle', $t ) ; + $d = $oldid ? wfMsgExt( 'missingarticle-rev', array( 'escape' ), $oldid ) : ''; + $this->mContent = wfMsg( 'missing-article', $t, $d ) ; if( $oldid ) { $revision = Revision::newFromId( $oldid ); @@ -803,8 +801,8 @@ class Article { # Failed to load, replace text with error message $t = $this->mTitle->getPrefixedText(); if( $oldid ) { - $t .= ' ' . wfMsgExt( 'missingarticle-rev', array( 'escape' ), $oldid ); - $text = wfMsg( 'missingarticle', $t ); + $d = wfMsgExt( 'missingarticle-rev', array( 'escape' ), $oldid ); + $text = wfMsg( 'missing-article', $t, $d ); } else { $text = wfMsg( 'noarticletext' ); } diff --git a/includes/DifferenceEngine.php b/includes/DifferenceEngine.php index 02a978effd..1affe45165 100644 --- a/includes/DifferenceEngine.php +++ b/includes/DifferenceEngine.php @@ -112,9 +112,10 @@ CONTROL; $wgOut->setArticleFlag( false ); if ( ! $this->loadRevisionData() ) { - $t = $this->mTitle->getPrefixedText() . ' ' . wfMsgExt( 'missingarticle-diff', array( 'escape' ), $this->mOldid, $this->mNewid ); + $t = $this->mTitle->getPrefixedText(); + $d = wfMsgExt( 'missingarticle-diff', array( 'escape' ), $this->mOldid, $this->mNewid ); $wgOut->setPagetitle( wfMsg( 'errorpagetitle' ) ); - $wgOut->addWikiMsg( 'missingarticle', "$t" ); + $wgOut->addWikiMsg( 'missing-article', "$t", $d ); wfProfileOut( __METHOD__ ); return; } @@ -333,9 +334,10 @@ CONTROL; # Get article text from the DB # if ( ! $this->loadNewText() ) { - $t = $this->mTitle->getPrefixedText() . ' ' . wfMsgExt( 'missingarticle-diff', array( 'escape' ), $this->mOldid, $this->mNewid ); + $t = $this->mTitle->getPrefixedText(); + $d = wfMsgExt( 'missingarticle-diff', array( 'escape' ), $this->mOldid, $this->mNewid ); $wgOut->setPagetitle( wfMsg( 'errorpagetitle' ) ); - $wgOut->addWikiMsg( 'missingarticle', "$t" ); + $wgOut->addWikiMsg( 'missing-article', "$t", $d ); wfProfileOut( __METHOD__ ); return; } @@ -378,7 +380,7 @@ CONTROL; global $wgOut; $diff = $this->getDiff( $otitle, $ntitle ); if ( $diff === false ) { - $wgOut->addWikiMsg( 'missingarticle', "(fixme, bug)" ); + $wgOut->addWikiMsg( 'missing-article', "(fixme, bug)", '' ); return false; } else { $this->showDiffStyle(); diff --git a/languages/messages/MessagesDe.php b/languages/messages/MessagesDe.php index ccd1ca9616..cfa1d5260a 100644 --- a/languages/messages/MessagesDe.php +++ b/languages/messages/MessagesDe.php @@ -479,7 +479,7 @@ MySQL meldete den Fehler: „$3: $4“.', 'readonlytext' => 'Die Datenbank ist vorübergehend für Neueinträge und Änderungen gesperrt. Bitte versuche es später noch einmal. Grund der Sperrung: $1', -'missingarticle' => 'Der Text für „$1“ wurde nicht in der Datenbank gefunden. +'missing-article' => 'Der Text für „$1“ $2 wurde nicht in der Datenbank gefunden. Die Seite ist möglicherweise gelöscht oder verschoben worden. diff --git a/languages/messages/MessagesDe_formal.php b/languages/messages/MessagesDe_formal.php index 87d784b381..529f655b21 100644 --- a/languages/messages/MessagesDe_formal.php +++ b/languages/messages/MessagesDe_formal.php @@ -34,7 +34,7 @@ $messages = array( 'readonlytext' => 'Die Datenbank ist vorübergehend für Neueinträge und Änderungen gesperrt. Bitte versuchen Sie es später noch einmal. Grund der Sperrung: $1', -'missingarticle' => 'Der Text für „$1“ wurde nicht in der Datenbank gefunden. +'missing-article' => 'Der Text für „$1“ $2 wurde nicht in der Datenbank gefunden. Die Seite ist möglicherweise gelöscht oder verschoben worden. diff --git a/languages/messages/MessagesEn.php b/languages/messages/MessagesEn.php index 70c195b334..3ecea9d79d 100644 --- a/languages/messages/MessagesEn.php +++ b/languages/messages/MessagesEn.php @@ -785,7 +785,7 @@ $1', 'readonlytext' => 'The database is currently locked to new entries and other modifications, probably for routine database maintenance, after which it will be back to normal. The administrator who locked it offered this explanation: $1', -'missingarticle' => 'The database did not find the text of a page that it should have found, named "$1". +'missing-article' => 'The database did not find the text of a page that it should have found, named "$1" $2. This is usually caused by following an outdated diff or history link to a page that has been deleted. diff --git a/maintenance/language/messages.inc b/maintenance/language/messages.inc index 5b22545506..bfec724f57 100644 --- a/maintenance/language/messages.inc +++ b/maintenance/language/messages.inc @@ -319,7 +319,7 @@ $wgMessageStructure = array( 'readonly', 'enterlockreason', 'readonlytext', - 'missingarticle', + 'missing-article', 'missingarticle-rev', 'missingarticle-diff', 'readonly_lag', -- 2.20.1