From: Brian Wolff Date: Wed, 21 Sep 2011 00:19:09 +0000 (+0000) Subject: Make per page edit notices work in namespaces without subpages enabled. X-Git-Tag: 1.31.0-rc.0~27511 X-Git-Url: http://git.cyclocoop.org/%22%20.%20generer_url_ecrire%28%22lang_raccourcis%22%2C%22module=%24nom_module%22%29%20.%20%22?a=commitdiff_plain;h=d894b94916a4dbf7db0fe57506e0d9d029aefa9c;p=lhc%2Fweb%2Fwiklou.git Make per page edit notices work in namespaces without subpages enabled. --- diff --git a/RELEASE-NOTES-1.19 b/RELEASE-NOTES-1.19 index 9246d361e9..a416aecdb5 100644 --- a/RELEASE-NOTES-1.19 +++ b/RELEASE-NOTES-1.19 @@ -94,6 +94,7 @@ production. * (bug 30907) Special:Unusedcategories should sort ascendingly. * (bug 18424) Special:Prefixindex and Special:Allpages paging links are really small, and somewhat inconsistent with each other. +* Per page edit-notices now work in namespaces without subpages enabled. === API changes in 1.19 === * (bug 19838) siprop=interwikimap can now use the interwiki cache. diff --git a/includes/EditPage.php b/includes/EditPage.php index 300c9d1481..77b1bbfc9c 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -467,6 +467,13 @@ class EditPage { $wgOut->addWikiText( $editnotice_base_msg->plain() ); } } + } else { + # Even if there are no subpages in namespace, we still don't want / in MW ns. + $editnoticeText = $editnotice_ns . '-' . str_replace( '/', '-', $this->mTitle->getDBkey() ); + $editnoticeMsg = wfMessage( $editnoticeText )->inContentLanguage(); + if ( $editnoticeMsg->exists() ) { + $wgOut->addWikiText( $editnoticeMsg->plain() ); + } } # Attempt submission here. This will check for edit conflicts,