From 10a02241999428f7a866f1d38743172ecfc435a0 Mon Sep 17 00:00:00 2001 From: Rob Church Date: Wed, 12 Apr 2006 02:49:14 +0000 Subject: [PATCH] Don't force edit summaries when a user is editing their own user/talk page --- RELEASE-NOTES | 1 + includes/EditPage.php | 11 +++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/RELEASE-NOTES b/RELEASE-NOTES index 976e1d9696..c5454d8938 100644 --- a/RELEASE-NOTES +++ b/RELEASE-NOTES @@ -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 == diff --git a/includes/EditPage.php b/includes/EditPage.php index 19a15b7eec..6de9d1ef0f 100644 --- a/includes/EditPage.php +++ b/includes/EditPage.php @@ -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. -- 2.20.1