Revision: 46018
Author: raymond
Date: 2009-01-22 12:57:09 +0000 (Thu, 22 Jan 2009)
Log Message:
-----------
* Wrap 'cascadeprotectedwarning'/'titleprotectedwarning' messages into a div
with own classes
Modified Paths:
--------------
trunk/phase3/includes/EditPage.php
Modified: trunk/phase3/includes/EditPage.php
===================================================================
--- trunk/phase3/includes/EditPage.php 2009-01-22 12:23:03 UTC (rev 46017)
+++ trunk/phase3/includes/EditPage.php 2009-01-22 12:57:09 UTC (rev 46018)
@@ -1242,17 +1242,19 @@
if ( $this->mTitle->isCascadeProtected() ) {
# Is this page under cascading protection from some
source pages?
list($cascadeSources, /* $restrictions */) =
$this->mTitle->getCascadeProtectionSources();
- $notice = "$1\n";
- if ( count($cascadeSources) > 0 ) {
+ $notice = "<div
class='mw-cascadeprotectedwarning'>$1\n";
+ $cascadeSourcesCount = count( $cascadeSources );
+ if ( $cascadeSourcesCount > 0 ) {
# Explain, and list the titles responsible
foreach( $cascadeSources as $page ) {
$notice .= '* [[:' .
$page->getPrefixedText() . "]]\n";
}
}
- $wgOut->wrapWikiMsg( $notice, array(
'cascadeprotectedwarning', count($cascadeSources) ) );
+ $notice .= '</div>';
+ $wgOut->wrapWikiMsg( $notice, array(
'cascadeprotectedwarning', $cascadeSourcesCount ) );
}
if ( !$this->mTitle->exists() &&
$this->mTitle->getRestrictions( 'create' ) ) {
- $wgOut->addWikiMsg( 'titleprotectedwarning' );
+ $wgOut->wrapWikiMsg( '<div
class="mw-titleprotectedwarning">$1</div>', 'titleprotectedwarning' );
}
if ( $this->kblength === false ) {
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs