From 42d0998f397f32be8e4beecb57f471289c80ec07 Mon Sep 17 00:00:00 2001 From: Alexandre Emsenhuber Date: Tue, 9 Sep 2008 19:53:06 +0000 Subject: [PATCH] Add the list of restrictions to the "titleprotectedwarning" message. For now, there should be one and only one item in that array. --- includes/EditPage.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/includes/EditPage.php b/includes/EditPage.php index 61cac92417..794e500674 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1221,8 +1221,8 @@ class EditPage { } $wgOut->wrapWikiMsg( $notice, array( 'cascadeprotectedwarning', count($cascadeSources) ) ); } - if( !$this->mTitle->exists() && $this->mTitle->getRestrictions( 'create' ) != array() ){ - $wgOut->addWikiMsg( 'titleprotectedwarning' ); + if( !$this->mTitle->exists() && ( $createRestrictions = $this->mTitle->getRestrictions( 'create' ) ) != array() ){ + $wgOut->addWikiMsgArray( 'titleprotectedwarning', $createRestrictions ); } if( $this->kblength === false ) { -- 2.20.1