From: Raimond Spekking Date: Thu, 22 Jan 2009 12:57:09 +0000 (+0000) Subject: * Wrap 'cascadeprotectedwarning'/'titleprotectedwarning' messages into a div with... X-Git-Tag: 1.31.0-rc.0~43310 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22sites_tous%22%29%20.%20%22?a=commitdiff_plain;h=70559aca5b1d24beab46147f901f59f9d8561ab6;p=lhc%2Fweb%2Fwiklou.git * Wrap 'cascadeprotectedwarning'/'titleprotectedwarning' messages into a div with own classes --- 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 ) {