http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97686

Revision: 97686
Author:   bawolff
Date:     2011-09-21 00:19:09 +0000 (Wed, 21 Sep 2011)
Log Message:
-----------
Make per page edit notices work in namespaces without subpages enabled.

Modified Paths:
--------------
    trunk/phase3/RELEASE-NOTES-1.19
    trunk/phase3/includes/EditPage.php

Modified: trunk/phase3/RELEASE-NOTES-1.19
===================================================================
--- trunk/phase3/RELEASE-NOTES-1.19     2011-09-20 23:47:20 UTC (rev 97685)
+++ trunk/phase3/RELEASE-NOTES-1.19     2011-09-21 00:19:09 UTC (rev 97686)
@@ -94,6 +94,7 @@
 * (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.

Modified: trunk/phase3/includes/EditPage.php
===================================================================
--- trunk/phase3/includes/EditPage.php  2011-09-20 23:47:20 UTC (rev 97685)
+++ trunk/phase3/includes/EditPage.php  2011-09-21 00:19:09 UTC (rev 97686)
@@ -467,6 +467,13 @@
                                        $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,


_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to