r12531 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r12530‎ | r12531 | r12532 >
Date:19:53, 8 January 2006
Author:magnus_manske
Status:old
Tags:
Comment:
Fix for bug 4469: Implement MediaWiki:<namespace>:Sitenotice
MediaWiki:Namespacebanner contains the "base name", to which the name of the namespace is appended, like "basename-namespace". By default the base name is also "Namespacebanner" to add confusion. In namespace names, spaces are replaced by "-" (due to some weird message handling bug).
So the namespace-specific notice messages loke like:
"Namespacebanner-" (main namespace)
"Namespacebanner-Talk" (Talk namespace)
"Namespacebanner-MediaWiki-talk" (for MediaWiki_talk)
Modified paths:
  • /trunk/phase3/includes/GlobalFunctions.php (modified) (history)
  • /trunk/phase3/languages/Language.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/GlobalFunctions.php
@@ -1367,6 +1367,18 @@
13681368 }
13691369 }
13701370 }
 1371+
 1372+ # Namespacebanner
 1373+ $key = wfMsg('namespacebanner') ;
 1374+ $ns = $wgTitle->getNsText() . '-' ;
 1375+ if ( $ns != "" ) {
 1376+ $key .= str_replace ( '_' , '-' , $ns ) ;
 1377+ }
 1378+ $nsbanner = wfMsg ( $key ) ;
 1379+ if ( $nsbanner != "&lt;".$key."&gt;" ) {
 1380+ $notice .= '<div id="namespacebanner">' . $nsbanner . "</div>" ;
 1381+ }
 1382+
13711383 wfProfileOut( $fname );
13721384 return $notice;
13731385 }
Index: trunk/phase3/languages/Language.php
@@ -505,6 +505,7 @@
506506 'restorelink' => '$1 deleted edits',
507507 'feedlinks' => 'Feed:',
508508 'sitenotice' => '-', # the equivalent to wgSiteNotice
 509+'namespacebanner' => 'Namespacebanner',
509510
510511 # Short words for each namespace, by default used in the 'article' tab in monobook
511512 'nstab-main' => 'Article',

Follow-up revisions

RevisionCommit summaryAuthorDate
r12898Namespace notice (fix for bug 4469) is back:...magnus_manske17:36, 28 January 2006

Status & tagging log