From d894b94916a4dbf7db0fe57506e0d9d029aefa9c Mon Sep 17 00:00:00 2001 From: Brian Wolff Date: Wed, 21 Sep 2011 00:19:09 +0000 Subject: [PATCH] Make per page edit notices work in namespaces without subpages enabled. --- RELEASE-NOTES-1.19 | 1 + includes/EditPage.php | 7 +++++++ 2 files changed, 8 insertions(+) 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, -- 2.20.1