Index: trunk/phase3/maintenance/language/messages.inc |
— | — | @@ -1807,6 +1807,7 @@ |
1808 | 1808 | 'ipblocklist-no-results', |
1809 | 1809 | 'blocklink', |
1810 | 1810 | 'unblocklink', |
| 1811 | + 'change-blocklink', |
1811 | 1812 | 'contribslink', |
1812 | 1813 | 'autoblocker', |
1813 | 1814 | 'blocklogpage', |
Index: trunk/phase3/includes/LogEventsList.php |
— | — | @@ -38,7 +38,7 @@ |
39 | 39 | private function preCacheMessages() { |
40 | 40 | // Precache various messages |
41 | 41 | if( !isset( $this->message ) ) { |
42 | | - $messages = 'revertmerge protect_change unblocklink revertmove undeletelink revdel-restore rev-delundel hist'; |
| 42 | + $messages = 'revertmerge protect_change unblocklink change-blocklink revertmove undeletelink revdel-restore rev-delundel hist'; |
43 | 43 | foreach( explode( ' ', $messages ) as $msg ) { |
44 | 44 | $this->message[$msg] = wfMsgExt( $msg, array( 'escape') ); |
45 | 45 | } |
— | — | @@ -267,11 +267,19 @@ |
268 | 268 | } else if( self::typeAction($row,array('delete','suppress'),'delete') && $wgUser->isAllowed( 'delete' ) ) { |
269 | 269 | $revert = '(' . $this->skin->makeKnownLinkObj( SpecialPage::getTitleFor( 'Undelete' ), |
270 | 270 | $this->message['undeletelink'], 'target='. urlencode( $title->getPrefixedDBkey() ) ) . ')'; |
271 | | - // Show unblock link |
272 | | - } else if( self::typeAction($row,array('block','suppress'),'block') && $wgUser->isAllowed( 'block' ) ) { |
273 | | - $revert = '(' . $this->skin->makeKnownLinkObj( SpecialPage::getTitleFor( 'Ipblocklist' ), |
274 | | - $this->message['unblocklink'], |
275 | | - 'action=unblock&ip=' . urlencode( $row->log_title ) ) . ')'; |
| 271 | + // Show unblock/change block link |
| 272 | + } else if( self::typeAction( $row, array( 'block', 'suppress' ), 'block' ) && $wgUser->isAllowed( 'block' ) ) { |
| 273 | + $revert = '(' . |
| 274 | + $this->skin->link( SpecialPage::getTitleFor( 'Ipblocklist' ), |
| 275 | + $this->message['unblocklink'], |
| 276 | + array(), |
| 277 | + array( 'action' => 'unblock', 'ip' => urlencode( $row->log_title ) ), |
| 278 | + 'known' ) |
| 279 | + . ' ' . wfMsg( 'pipe-separator' ) . ' ' . |
| 280 | + $this->skin->link( SpecialPage::getTitleFor( 'BlockIP/' . htmlspecialchars( $row->log_title ) ), |
| 281 | + $this->message['change-blocklink'], |
| 282 | + array(), array(), 'known' ) . |
| 283 | + ')'; |
276 | 284 | // Show change protection link |
277 | 285 | } else if( self::typeAction($row,'protect',array('modify','protect','unprotect')) ) { |
278 | 286 | $revert .= ' (' . $this->skin->makeKnownLinkObj( $title, $this->message['hist'], |
Index: trunk/phase3/includes/specials/SpecialIpblocklist.php |
— | — | @@ -374,7 +374,7 @@ |
375 | 375 | $sk = $wgUser->getSkin(); |
376 | 376 | if( is_null( $msg ) ) { |
377 | 377 | $msg = array(); |
378 | | - $keys = array( 'infiniteblock', 'expiringblock', 'unblocklink', |
| 378 | + $keys = array( 'infiniteblock', 'expiringblock', 'unblocklink', 'change-blocklink', |
379 | 379 | 'anononlyblock', 'createaccountblock', 'noautoblockblock', 'emailblock', 'blocklist-nousertalk' ); |
380 | 380 | foreach( $keys as $key ) { |
381 | 381 | $msg[$key] = wfMsgHtml( $key ); |
— | — | @@ -423,9 +423,22 @@ |
424 | 424 | $line = wfMsgReplaceArgs( $msg['blocklistline'], array( $formattedTime, $blocker, $target, $properties ) ); |
425 | 425 | |
426 | 426 | $unblocklink = ''; |
427 | | - if ( $wgUser->isAllowed('block') ) { |
428 | | - $titleObj = SpecialPage::getTitleFor( "Ipblocklist" ); |
429 | | - $unblocklink = ' (' . $sk->makeKnownLinkObj($titleObj, $msg['unblocklink'], 'action=unblock&id=' . urlencode( $block->mId ) ) . ')'; |
| 427 | + $changeblocklink = ''; |
| 428 | + if ( $wgUser->isAllowed( 'block' ) ) { |
| 429 | + $unblocklink = $sk->link( SpecialPage::getTitleFor( 'Ipblocklist' ), |
| 430 | + $msg['unblocklink'], |
| 431 | + array(), |
| 432 | + array( 'action' => 'unblock', 'id' => urlencode( $block->mId ) ), |
| 433 | + 'known' ); |
| 434 | + |
| 435 | + # Create changeblocklink for all blocks with exception of autoblocks |
| 436 | + if( !$block->mAuto ) { |
| 437 | + $changeblocklink = ' ' . wfMsg( 'pipe-separator' ) . ' ' . |
| 438 | + $sk->link( SpecialPage::getTitleFor( 'BlockIP/' . htmlspecialchars( $block->mAddress ) ), |
| 439 | + $msg['change-blocklink'], |
| 440 | + array(), array(), 'known' ); |
| 441 | + } |
| 442 | + $toolLinks = "($unblocklink$changeblocklink)"; |
430 | 443 | } |
431 | 444 | |
432 | 445 | $comment = $sk->commentBlock( $block->mReason ); |
— | — | @@ -435,7 +448,7 @@ |
436 | 449 | $s = '<span class="history-deleted">' . $s . '</span>'; |
437 | 450 | |
438 | 451 | wfProfileOut( __METHOD__ ); |
439 | | - return "<li>$s $unblocklink</li>\n"; |
| 452 | + return "<li>$s $toolLinks</li>\n"; |
440 | 453 | } |
441 | 454 | } |
442 | 455 | |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -2616,6 +2616,7 @@ |
2617 | 2617 | 'ipblocklist-no-results' => 'The requested IP address or username is not blocked.', |
2618 | 2618 | 'blocklink' => 'block', |
2619 | 2619 | 'unblocklink' => 'unblock', |
| 2620 | +'change-blocklink' => 'change block', |
2620 | 2621 | 'contribslink' => 'contribs', |
2621 | 2622 | 'autoblocker' => 'Autoblocked because your IP address has been recently used by "[[User:$1|$1]]". |
2622 | 2623 | The reason given for $1\'s block is: "$2"', |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -232,6 +232,7 @@ |
233 | 233 | * File objects returned by wfFindFile() are now cached by default |
234 | 234 | * (bug 7492) Rights can now be assigned to specific IP addresses and ranges by |
235 | 235 | using $wgAutopromote (new defines: APCOND_ISIP and APCOND_IPINRANGE) |
| 236 | +* Add a 'change block' link to Special:IPBlockList und Special:Log |
236 | 237 | |
237 | 238 | === Bug fixes in 1.14 === |
238 | 239 | |