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 ) {