From 958aa1aef8ad785ff8b7327430707de84e6baf32 Mon Sep 17 00:00:00 2001 From: Rob Church Date: Sat, 24 Jun 2006 21:17:05 +0000 Subject: [PATCH] * (bug 5903) When requesting the raw source of a non-existent message page, return blank content (as opposed to the message key) * Improve default blank content of MediaWiki:Common.css and MediaWiki:Monobook.css --- RELEASE-NOTES | 3 +++ includes/RawPage.php | 6 +++++- languages/Messages.php | 4 ++-- 3 files changed, 10 insertions(+), 3 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index c0abbc02b1..9e37d62414 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -557,6 +557,9 @@ Some default configuration options have changed: * (bug 6428) Incorrect form action URL on Special:Newimages with hidebots = 0 set * (bug 4990) Show page source to blocked users on edits, or their modified version if blocked during an edit +* (bug 5903) When requesting the raw source of a non-existent message page, + return blank content (as opposed to the message key) +* Improve default blank content of MediaWiki:Common.css and MediaWiki:Monobook.css == Compatibility == diff --git a/includes/RawPage.php b/includes/RawPage.php index 252ab3206f..3cdabfd991 100644 --- a/includes/RawPage.php +++ b/includes/RawPage.php @@ -153,7 +153,11 @@ class RawPage { if( $this->mTitle ) { // If it's a MediaWiki message we can just hit the message cache if ( $this->mTitle->getNamespace() == NS_MEDIAWIKI ) { - $text = wfMsgForContentNoTrans( $this->mTitle->getDbkey() ); + $key = $this->mTitle->getDBkey(); + $text = wfMsgForContentNoTrans( $key ); + # If the message doesn't exist, return a blank + if( $text == '<' . $key . '>' ) + $text = ''; $found = true; } else { // Get it from the DB diff --git a/languages/Messages.php b/languages/Messages.php index d13d41f192..8e4f2195cf 100644 --- a/languages/Messages.php +++ b/languages/Messages.php @@ -1484,8 +1484,8 @@ In the latter case you can also use a link, e.g. [[{{ns:Special}}:Export/{{int:m 'tooltip-watch' => 'Add this page to your watchlist [alt-w]', # stylesheets -'Monobook.css' => '/* edit this file to customize the monobook skin for the entire site */', -#'Monobook.js' => '/* edit this file to change js things in the monobook skin */', +'Common.css' => '/** CSS placed here will be applied to all skins */', +'Monobook.css' => '/* CSS placed here will affect users of the Monobook skin */', # Metadata 'nodublincore' => 'Dublin Core RDF metadata disabled for this server.', -- 2.20.1