r13596 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r13595‎ | r13596 | r13597 >
Date:02:49, 12 April 2006
Author:robchurch
Status:old
Tags:
Comment:
Don't force edit summaries when a user is editing their own user/talk page
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/EditPage.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/EditPage.php
@@ -327,7 +327,7 @@
328328 * @todo document
329329 */
330330 function importFormData( &$request ) {
331 - global $wgLang ;
 331+ global $wgLang, $wgUser;
332332 $fname = 'EditPage::importFormData';
333333 wfProfileIn( $fname );
334334
@@ -384,7 +384,14 @@
385385
386386 $this->minoredit = $request->getCheck( 'wpMinoredit' );
387387 $this->watchthis = $request->getCheck( 'wpWatchthis' );
388 - $this->allowBlankSummary = $request->getBool( 'wpIgnoreBlankSummary' );
 388+
 389+ # Don't force edit summaries when a user is editing their own user or talk page
 390+ if( ( $this->mTitle->mNamespace == NS_USER || $this->mTitle->mNamespace == NS_USER_TALK ) && $this->mTitle->getText() == $wgUser->getName() ) {
 391+ $this->allowBlankSummary = true;
 392+ } else {
 393+ $this->allowBlankSummary = $request->getBool( 'wpIgnoreBlankSummary' );
 394+ }
 395+
389396 $this->autoSumm = $request->getText( 'wpAutoSummary' );
390397 } else {
391398 # Not a posted form? Start with nothing.
Index: trunk/phase3/RELEASE-NOTES
@@ -50,6 +50,7 @@
5151 * (bug 5544) Fix redirect arrow in Special:Listredirects for right-to-left languages
5252 * Replace "doubleredirectsarrow" with a content language check that picks the appropriate arrow
5353 * (bug 5537) Add stub language file for Samogitian (bat-smg); inherits Lithuanian (lt)
 54+* Don't force edit summaries when a user is editing their own user/talk page
5455
5556 == Compatibility ==
5657

Status & tagging log