* Added $wgShowDBErrorBacktrace, to allow users to easily gather backtraces for
database connection and query errors.
* (bug 19646) New hook: ImgAuthBeforeStream for tests and functionality before file is streamed to user, but only when using img_auth
+* Show change block / unblock link on Special:Contributions if user is blocked
=== Bug fixes in 1.16 ===
# Talk page link
$tools[] = $sk->link( $talk, wfMsgHtml( 'sp-contributions-talk' ) );
if( ( $id != 0 && $wgSysopUserBans ) || ( $id == 0 && IP::isIPAddress( $nt->getText() ) ) ) {
- # Block link
- if( $wgUser->isAllowed( 'block' ) )
- $tools[] = $sk->linkKnown(
- SpecialPage::getTitleFor( 'Blockip', $nt->getDBkey() ),
- wfMsgHtml( 'blocklink' )
- );
+ if( $wgUser->isAllowed( 'block' ) ) { # Block / Change block / Unblock links
+ if ( $wgUser->isBlocked() ) {
+ $tools[] = $sk->linkKnown( # Change block link
+ SpecialPage::getTitleFor( 'Blockip', $nt->getDBkey() ),
+ wfMsgHtml( 'change-blocklink' )
+ );
+ $tools[] = $sk->linkKnown( # Unblock link
+ SpecialPage::getTitleFor( 'BlockList' ),
+ wfMsgHtml( 'unblocklink' ),
+ array(),
+ array(
+ 'action' => 'unblock',
+ 'ip' => $nt->getDBkey()
+ ),
+ array( 'known' )
+ );
+ }
+ else { # User is not blocked
+ $tools[] = $sk->linkKnown( # Block link
+ SpecialPage::getTitleFor( 'Blockip', $nt->getDBkey() ),
+ wfMsgHtml( 'blocklink' )
+ );
+ }
+ }
# Block log link
$tools[] = $sk->linkKnown(
SpecialPage::getTitleFor( 'Log' ),