From ce7434f70880a14835611a1faade8f1292cee6d0 Mon Sep 17 00:00:00 2001 From: Roan Kattouw Date: Thu, 19 May 2011 19:48:50 +0000 Subject: [PATCH] (bug 29036) For cascade-protected pages, the mw-textarea-cprotected class is added to the textarea on the edit form. Patch by Erwin Dokter --- CREDITS | 1 + RELEASE-NOTES-1.19 | 2 ++ includes/EditPage.php | 4 ++++ 3 files changed, 7 insertions(+) diff --git a/CREDITS b/CREDITS index e81d6eba59..df73c8e07c 100644 --- a/CREDITS +++ b/CREDITS @@ -91,6 +91,7 @@ following names for their contribution to the product. * Dan Nessett * Daniel Arnold * Denny Vrandecic +* Erwin Dokter * FunPika * Harry Burt * Ireas diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index 7de373b6b7..4f165d4c02 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -34,6 +34,8 @@ production. class that extends PageArchive. * (bug 28915) Implement QUnit test suite for MediaWiki JavaScript. Also built-in support for distribution through a TestSwarm instance. +* (bug 29036) For cascade-protected pages, the mw-textarea-cprotected class is + added to the textarea on the edit form. === Bug fixes in 1.19 === * (bug 10154) Don't allow user to specify days beyond $wgRCMaxAge. diff --git a/includes/EditPage.php b/includes/EditPage.php index cee2496382..48dd3172c5 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -1723,6 +1723,10 @@ HTML # Then it must be protected based on static groups (regular) $classes[] = 'mw-textarea-protected'; } + # Is the title cascade-protected? + if ( $this->mTitle->isCascadeProtected() ) { + $classes[] = 'mw-textarea-cprotected'; + } } $attribs = array( 'tabindex' => 1 ); if ( is_array($customAttribs) ) -- 2.20.1