Index: trunk/phase3/includes/specials/SpecialContributions.php |
— | — | @@ -161,12 +161,30 @@ |
162 | 162 | # Talk page link |
163 | 163 | $tools[] = $sk->link( $talk, wfMsgHtml( 'sp-contributions-talk' ) ); |
164 | 164 | if( ( $id != 0 && $wgSysopUserBans ) || ( $id == 0 && IP::isIPAddress( $nt->getText() ) ) ) { |
165 | | - # Block link |
166 | | - if( $wgUser->isAllowed( 'block' ) ) |
167 | | - $tools[] = $sk->linkKnown( |
168 | | - SpecialPage::getTitleFor( 'Blockip', $nt->getDBkey() ), |
169 | | - wfMsgHtml( 'blocklink' ) |
170 | | - ); |
| 165 | + if( $wgUser->isAllowed( 'block' ) ) { # Block / Change block / Unblock links |
| 166 | + if ( $wgUser->isBlocked() ) { |
| 167 | + $tools[] = $sk->linkKnown( # Change block link |
| 168 | + SpecialPage::getTitleFor( 'Blockip', $nt->getDBkey() ), |
| 169 | + wfMsgHtml( 'change-blocklink' ) |
| 170 | + ); |
| 171 | + $tools[] = $sk->linkKnown( # Unblock link |
| 172 | + SpecialPage::getTitleFor( 'BlockList' ), |
| 173 | + wfMsgHtml( 'unblocklink' ), |
| 174 | + array(), |
| 175 | + array( |
| 176 | + 'action' => 'unblock', |
| 177 | + 'ip' => $nt->getDBkey() |
| 178 | + ), |
| 179 | + array( 'known' ) |
| 180 | + ); |
| 181 | + } |
| 182 | + else { # User is not blocked |
| 183 | + $tools[] = $sk->linkKnown( # Block link |
| 184 | + SpecialPage::getTitleFor( 'Blockip', $nt->getDBkey() ), |
| 185 | + wfMsgHtml( 'blocklink' ) |
| 186 | + ); |
| 187 | + } |
| 188 | + } |
171 | 189 | # Block log link |
172 | 190 | $tools[] = $sk->linkKnown( |
173 | 191 | SpecialPage::getTitleFor( 'Log' ), |
Index: trunk/phase3/RELEASE-NOTES |
— | — | @@ -207,6 +207,7 @@ |
208 | 208 | * Added $wgShowDBErrorBacktrace, to allow users to easily gather backtraces for |
209 | 209 | database connection and query errors. |
210 | 210 | * (bug 19646) New hook: ImgAuthBeforeStream for tests and functionality before file is streamed to user, but only when using img_auth |
| 211 | +* Show change block / unblock link on Special:Contributions if user is blocked |
211 | 212 | |
212 | 213 | === Bug fixes in 1.16 === |
213 | 214 | |