* File objects returned by wfFindFile() are now cached by default
* (bug 7492) Rights can now be assigned to specific IP addresses and ranges by
using $wgAutopromote (new defines: APCOND_ISIP and APCOND_IPINRANGE)
+* Add a 'change block' link to Special:IPBlockList und Special:Log
=== Bug fixes in 1.14 ===
private function preCacheMessages() {
// Precache various messages
if( !isset( $this->message ) ) {
- $messages = 'revertmerge protect_change unblocklink revertmove undeletelink revdel-restore rev-delundel hist';
+ $messages = 'revertmerge protect_change unblocklink change-blocklink revertmove undeletelink revdel-restore rev-delundel hist';
foreach( explode( ' ', $messages ) as $msg ) {
$this->message[$msg] = wfMsgExt( $msg, array( 'escape') );
}
} else if( self::typeAction($row,array('delete','suppress'),'delete') && $wgUser->isAllowed( 'delete' ) ) {
$revert = '(' . $this->skin->makeKnownLinkObj( SpecialPage::getTitleFor( 'Undelete' ),
$this->message['undeletelink'], 'target='. urlencode( $title->getPrefixedDBkey() ) ) . ')';
- // Show unblock link
- } else if( self::typeAction($row,array('block','suppress'),'block') && $wgUser->isAllowed( 'block' ) ) {
- $revert = '(' . $this->skin->makeKnownLinkObj( SpecialPage::getTitleFor( 'Ipblocklist' ),
- $this->message['unblocklink'],
- 'action=unblock&ip=' . urlencode( $row->log_title ) ) . ')';
+ // Show unblock/change block link
+ } else if( self::typeAction( $row, array( 'block', 'suppress' ), 'block' ) && $wgUser->isAllowed( 'block' ) ) {
+ $revert = '(' .
+ $this->skin->link( SpecialPage::getTitleFor( 'Ipblocklist' ),
+ $this->message['unblocklink'],
+ array(),
+ array( 'action' => 'unblock', 'ip' => urlencode( $row->log_title ) ),
+ 'known' )
+ . ' ' . wfMsg( 'pipe-separator' ) . ' ' .
+ $this->skin->link( SpecialPage::getTitleFor( 'BlockIP/' . htmlspecialchars( $row->log_title ) ),
+ $this->message['change-blocklink'],
+ array(), array(), 'known' ) .
+ ')';
// Show change protection link
} else if( self::typeAction($row,'protect',array('modify','protect','unprotect')) ) {
$revert .= ' (' . $this->skin->makeKnownLinkObj( $title, $this->message['hist'],
$sk = $wgUser->getSkin();
if( is_null( $msg ) ) {
$msg = array();
- $keys = array( 'infiniteblock', 'expiringblock', 'unblocklink',
+ $keys = array( 'infiniteblock', 'expiringblock', 'unblocklink', 'change-blocklink',
'anononlyblock', 'createaccountblock', 'noautoblockblock', 'emailblock', 'blocklist-nousertalk' );
foreach( $keys as $key ) {
$msg[$key] = wfMsgHtml( $key );
$line = wfMsgReplaceArgs( $msg['blocklistline'], array( $formattedTime, $blocker, $target, $properties ) );
$unblocklink = '';
- if ( $wgUser->isAllowed('block') ) {
- $titleObj = SpecialPage::getTitleFor( "Ipblocklist" );
- $unblocklink = ' (' . $sk->makeKnownLinkObj($titleObj, $msg['unblocklink'], 'action=unblock&id=' . urlencode( $block->mId ) ) . ')';
+ $changeblocklink = '';
+ if ( $wgUser->isAllowed( 'block' ) ) {
+ $unblocklink = $sk->link( SpecialPage::getTitleFor( 'Ipblocklist' ),
+ $msg['unblocklink'],
+ array(),
+ array( 'action' => 'unblock', 'id' => urlencode( $block->mId ) ),
+ 'known' );
+
+ # Create changeblocklink for all blocks with exception of autoblocks
+ if( !$block->mAuto ) {
+ $changeblocklink = ' ' . wfMsg( 'pipe-separator' ) . ' ' .
+ $sk->link( SpecialPage::getTitleFor( 'BlockIP/' . htmlspecialchars( $block->mAddress ) ),
+ $msg['change-blocklink'],
+ array(), array(), 'known' );
+ }
+ $toolLinks = "($unblocklink$changeblocklink)";
}
$comment = $sk->commentBlock( $block->mReason );
$s = '<span class="history-deleted">' . $s . '</span>';
wfProfileOut( __METHOD__ );
- return "<li>$s $unblocklink</li>\n";
+ return "<li>$s $toolLinks</li>\n";
}
}
'ipblocklist-no-results' => 'The requested IP address or username is not blocked.',
'blocklink' => 'block',
'unblocklink' => 'unblock',
+'change-blocklink' => 'change block',
'contribslink' => 'contribs',
'autoblocker' => 'Autoblocked because your IP address has been recently used by "[[User:$1|$1]]".
The reason given for $1\'s block is: "$2"',
'ipblocklist-no-results',
'blocklink',
'unblocklink',
+ 'change-blocklink',
'contribslink',
'autoblocker',
'blocklogpage',