Index: trunk/phase3/includes/specials/SpecialBlockip.php |
— | — | @@ -479,13 +479,25 @@ |
480 | 480 | private function getConvenienceLinks() { |
481 | 481 | global $wgUser; |
482 | 482 | $skin = $wgUser->getSkin(); |
483 | | - $contribsPage = SpecialPage::getTitleFor( 'Contributions', $this->BlockAddress ); |
484 | | - $links[] = $skin->link( $contribsPage, wfMsgHtml( 'ipb-blocklist-contribs', $this->BlockAddress ) ); |
| 483 | + if( $this->BlockAddress ) |
| 484 | + $links[] = $this->getContribsLink( $skin ); |
485 | 485 | $links[] = $this->getUnblockLink( $skin ); |
486 | 486 | $links[] = $this->getBlockListLink( $skin ); |
487 | 487 | $links[] = $skin->makeLink ( 'MediaWiki:Ipbreason-dropdown', wfMsgHtml( 'ipb-edit-dropdown' ) ); |
488 | 488 | return '<p class="mw-ipb-conveniencelinks">' . implode( ' | ', $links ) . '</p>'; |
489 | 489 | } |
| 490 | + |
| 491 | + /** |
| 492 | + * Build a convenient link to a user or IP's contribs |
| 493 | + * form |
| 494 | + * |
| 495 | + * @param $skin Skin to use |
| 496 | + * @return string |
| 497 | + */ |
| 498 | + private function getContribsLink( $skin ) { |
| 499 | + $contribsPage = SpecialPage::getTitleFor( 'Contributions', $this->BlockAddress ); |
| 500 | + return $skin->link( $contribsPage, wfMsgHtml( 'ipb-blocklist-contribs', $this->BlockAddress ) ); |
| 501 | + } |
490 | 502 | |
491 | 503 | /** |
492 | 504 | * Build a convenient link to unblock the given username or IP |