r45862 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r45861‎ | r45862 | r45863 >
Date:02:57, 18 January 2009
Author:mrzman
Status:resolved (Comments)
Tags:
Comment:
(bug 17045) Prefill the block form with the options of the existing block when modifying an existing block
Modified paths:
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/specials/SpecialBlockip.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/specials/SpecialBlockip.php
@@ -106,6 +106,15 @@
107107 ( $currentBlock->mAddress == $this->BlockAddress ) ) ) {
108108 $wgOut->addWikiMsg( 'ipb-needreblock', $this->BlockAddress );
109109 $alreadyBlocked = true;
 110+ # Set the block form settings to the existing block
 111+ $this->BlockAnonOnly = $currentBlock->mAnonOnly;
 112+ $this->BlockCreateAccount = $currentBlock->mCreateAccount;
 113+ $this->BlockEnableAutoblock = $currentBlock->mEnableAutoblock;
 114+ $this->BlockEmail = $currentBlock->mBlockEmail;
 115+ $this->BlockHideName = $currentBlock->mHideName;
 116+ $this->BlockAllowUsertalk = $currentBlock->mAllowUsertalk;
 117+ $this->BlockOther = wfTimestamp( TS_RFC2822, $currentBlock->mExpiry );
 118+ $this->BlockReason = $currentBlock->mReason;
110119 }
111120 }
112121
Index: trunk/phase3/RELEASE-NOTES
@@ -39,6 +39,8 @@
4040 of Service page, for example
4141 * Add new hook 'UserLoadFromDatabase' that is called while loading a user
4242 from the database.
 43+* (bug 17045) Options on the block form are prefilled with the options of the
 44+ existing block when modifying an existing block.
4345
4446 === Bug fixes in 1.15 ===
4547 * (bug 16968) Special:Upload no longer throws useless warnings.

Follow-up revisions

RevisionCommit summaryAuthorDate
r45948Fix for r45862, handle indefinite blocks correctly (and use a less anglo-cent...mrzman03:50, 21 January 2009

Comments

#Comment by Brion VIBBER (talk | contribs)   03:18, 21 January 2009

This is broken with infinite block lengths -- the modify form comes up with the current time as the expiry.

#Comment by Brion VIBBER (talk | contribs)   04:29, 21 January 2009

Fixed in r45948

Status & tagging log