Don't force edit summaries when a user is editing their own user/talk page
authorRob Church <robchurch@users.mediawiki.org>
Wed, 12 Apr 2006 02:49:14 +0000 (02:49 +0000)
committerRob Church <robchurch@users.mediawiki.org>
Wed, 12 Apr 2006 02:49:14 +0000 (02:49 +0000)
RELEASE-NOTES
includes/EditPage.php

index 976e1d9..c5454d8 100644 (file)
@@ -50,6 +50,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 5544) Fix redirect arrow in Special:Listredirects for right-to-left languages
 * Replace "doubleredirectsarrow" with a content language check that picks the appropriate arrow
 * (bug 5537) Add stub language file for Samogitian (bat-smg); inherits Lithuanian (lt)
+* Don't force edit summaries when a user is editing their own user/talk page
 
 == Compatibility ==
 
index 19a15b7..6de9d1e 100644 (file)
@@ -327,7 +327,7 @@ class EditPage {
         * @todo document
         */
        function importFormData( &$request ) {
-               global $wgLang ;
+               global $wgLang, $wgUser;
                $fname = 'EditPage::importFormData';
                wfProfileIn( $fname );
 
@@ -384,7 +384,14 @@ class EditPage {
 
                        $this->minoredit = $request->getCheck( 'wpMinoredit' );
                        $this->watchthis = $request->getCheck( 'wpWatchthis' );
-                       $this->allowBlankSummary = $request->getBool( 'wpIgnoreBlankSummary' );
+
+                       # Don't force edit summaries when a user is editing their own user or talk page
+                       if( ( $this->mTitle->mNamespace == NS_USER || $this->mTitle->mNamespace == NS_USER_TALK ) && $this->mTitle->getText() == $wgUser->getName() ) {
+                               $this->allowBlankSummary = true;
+                       } else {
+                               $this->allowBlankSummary = $request->getBool( 'wpIgnoreBlankSummary' );
+                       }
+       
                        $this->autoSumm = $request->getText( 'wpAutoSummary' );                 
                } else {
                        # Not a posted form? Start with nothing.