Make per page edit notices work in namespaces without subpages enabled.
authorBrian Wolff <bawolff@users.mediawiki.org>
Wed, 21 Sep 2011 00:19:09 +0000 (00:19 +0000)
committerBrian Wolff <bawolff@users.mediawiki.org>
Wed, 21 Sep 2011 00:19:09 +0000 (00:19 +0000)
RELEASE-NOTES-1.19
includes/EditPage.php

index 9246d36..a416aec 100644 (file)
@@ -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.
index 300c9d1..77b1bbf 100644 (file)
@@ -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,