Index: trunk/phase3/includes/GlobalFunctions.php |
— | — | @@ -1390,6 +1390,28 @@ |
1391 | 1391 | return $notice; |
1392 | 1392 | } |
1393 | 1393 | |
| 1394 | +function wfGetNamespaceNotice() { |
| 1395 | + global $wgTitle; |
| 1396 | + |
| 1397 | + # Paranoia |
| 1398 | + if ( !isset( $wgTitle ) || !is_object( $wgTitle ) ) |
| 1399 | + return ""; |
| 1400 | + |
| 1401 | + $fname = 'wfGetNamespaceNotice'; |
| 1402 | + wfProfileIn( $fname ); |
| 1403 | + |
| 1404 | + $key = "namespacenotice-" . $wgTitle->getNsText(); |
| 1405 | + $namespaceNotice = wfGetCachedNotice( $key ); |
| 1406 | + if ( $namespaceNotice && substr ( $namespaceNotice , 0 ,7 ) != "<p><" ) { |
| 1407 | + $namespaceNotice = '<div id="namespacebanner">' . $namespaceNotice . "</div>"; |
| 1408 | + } else { |
| 1409 | + $namespaceNotice = ""; |
| 1410 | + } |
| 1411 | + |
| 1412 | + wfProfileOut( $fname ); |
| 1413 | + return $namespaceNotice; |
| 1414 | +} |
| 1415 | + |
1394 | 1416 | function wfGetSiteNotice() { |
1395 | 1417 | global $wgUser, $wgSiteNotice; |
1396 | 1418 | $fname = 'wfGetSiteNotice'; |
— | — | @@ -1407,6 +1429,7 @@ |
1408 | 1430 | $siteNotice = $anonNotice; |
1409 | 1431 | } |
1410 | 1432 | } |
| 1433 | + $siteNotice .= wfGetNamespaceNotice(); |
1411 | 1434 | |
1412 | 1435 | wfProfileOut( $fname ); |
1413 | 1436 | return( $siteNotice ); |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -578,8 +578,10 @@ |
579 | 579 | * Use revision rate for ETA in dump generation; it tends to be more stable |
580 | 580 | than the per-page count for full-history dumps. |
581 | 581 | * Include timestamp in wfDebugLog breakouts |
| 582 | +* (bug 4469) Namespace-specific notice to be displayed below site-notice |
| 583 | + Edit messages like "MediaWiki:Namespacenotice-" plus namespace name |
| 584 | + which is blank for main namespace, or like e.g. "User_talk" |
582 | 585 | |
583 | | - |
584 | 586 | === Caveats === |
585 | 587 | |
586 | 588 | Some output, particularly involving user-supplied inline HTML, may not |