From 70559aca5b1d24beab46147f901f59f9d8561ab6 Mon Sep 17 00:00:00 2001 From: Raimond Spekking Date: Thu, 22 Jan 2009 12:57:09 +0000 Subject: [PATCH] * Wrap 'cascadeprotectedwarning'/'titleprotectedwarning' messages into a div with own classes --- includes/EditPage.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index 946a596df0..123e927569 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1242,17 +1242,19 @@ class EditPage { 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 = "
$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 .= '
'; + $wgOut->wrapWikiMsg( $notice, array( 'cascadeprotectedwarning', $cascadeSourcesCount ) ); } if ( !$this->mTitle->exists() && $this->mTitle->getRestrictions( 'create' ) ) { - $wgOut->addWikiMsg( 'titleprotectedwarning' ); + $wgOut->wrapWikiMsg( '
$1
', 'titleprotectedwarning' ); } if ( $this->kblength === false ) { -- 2.20.1