summaryrefslogtreecommitdiff
path: root/includes/specials/SpecialDeletedContributions.php
diff options
context:
space:
mode:
Diffstat (limited to 'includes/specials/SpecialDeletedContributions.php')
-rw-r--r--includes/specials/SpecialDeletedContributions.php31
1 files changed, 15 insertions, 16 deletions
diff --git a/includes/specials/SpecialDeletedContributions.php b/includes/specials/SpecialDeletedContributions.php
index 92e22586..65858482 100644
--- a/includes/specials/SpecialDeletedContributions.php
+++ b/includes/specials/SpecialDeletedContributions.php
@@ -55,7 +55,7 @@ class DeletedContribsPager extends IndexPager {
// Paranoia: avoid brute force searches (bug 17792)
if( !$wgUser->isAllowed( 'deletedhistory' ) ) {
$conds[] = $this->mDb->bitAnd('ar_deleted',Revision::DELETED_USER) . ' = 0';
- } else if( !$wgUser->isAllowed( 'suppressrevision' ) ) {
+ } elseif( !$wgUser->isAllowed( 'suppressrevision' ) ) {
$conds[] = $this->mDb->bitAnd('ar_deleted',Revision::SUPPRESSED_USER) .
' != ' . Revision::SUPPRESSED_USER;
}
@@ -211,7 +211,7 @@ class DeletedContribsPager extends IndexPager {
} else {
$mflag = '';
}
-
+
// Revision delete link
$canHide = $wgUser->isAllowed( 'deleterevision' );
if( $canHide || ($rev->getVisibility() && $wgUser->isAllowed('deletedhistory')) ) {
@@ -234,9 +234,9 @@ class DeletedContribsPager extends IndexPager {
array( 'class' => 'mw-deletedcontribs-tools' ),
wfMsg( 'parentheses', $wgLang->pipeList( array( $last, $dellog, $reviewlink ) ) )
);
-
+
$ret = "{$del}{$link} {$tools} . . {$mflag} {$pagelink} {$comment}";
-
+
# Denote if username is redacted for this edit
if( $rev->isDeleted( Revision::DELETED_USER ) ) {
$ret .= " <strong>" . wfMsgHtml('rev-deleted-user-contribs') . "</strong>";
@@ -325,7 +325,8 @@ class DeletedContributionsPage extends SpecialPage {
}
# Show a message about slave lag, if applicable
- if( ( $lag = $pager->getDatabase()->getLag() ) > 0 )
+ $lag = wfGetLB()->safeGetLag( $pager->getDatabase() );
+ if( $lag > 0 )
$wgOut->showLagWarning( $lag );
$wgOut->addHTML(
@@ -340,9 +341,7 @@ class DeletedContributionsPage extends SpecialPage {
? 'sp-contributions-footer-anon'
: 'sp-contributions-footer';
-
- $text = wfMsgNoTrans( $message, $target );
- if( !wfEmptyMsg( $message, $text ) && $text != '-' ) {
+ if( !wfMessage( $message )->isDisabled() ) {
$wgOut->wrapWikiMsg( "<div class='mw-contributions-footer'>\n$1\n</div>", array( $message, $target ) );
}
}
@@ -353,12 +352,12 @@ class DeletedContributionsPage extends SpecialPage {
* @param $nt Title object for the target
* @param $id Integer: User ID for the target
* @return String: appropriately-escaped HTML to be output literally
- * @todo Fixme: almost the same as contributionsSub in SpecialContributions.php. Could be combined.
+ * @todo FIXME: Almost the same as contributionsSub in SpecialContributions.php. Could be combined.
*/
function getSubTitle( $nt, $id ) {
- global $wgSysopUserBans, $wgLang, $wgUser, $wgOut;
+ global $wgLang, $wgUser, $wgOut;
- $sk = $wgUser->getSkin();
+ $sk = $this->getSkin();
if ( $id === null ) {
$user = htmlspecialchars( $nt->getText() );
@@ -370,11 +369,11 @@ class DeletedContributionsPage extends SpecialPage {
if( $talk ) {
# Talk page link
$tools[] = $sk->link( $talk, wfMsgHtml( 'sp-contributions-talk' ) );
- if( ( $id !== null && $wgSysopUserBans ) || ( $id === null && IP::isIPAddress( $nt->getText() ) ) ) {
+ if( ( $id !== null ) || ( $id === null && IP::isIPAddress( $nt->getText() ) ) ) {
if( $wgUser->isAllowed( 'block' ) ) { # Block / Change block / Unblock links
if ( $userObj->isBlocked() ) {
$tools[] = $sk->linkKnown( # Change block link
- SpecialPage::getTitleFor( 'Blockip', $nt->getDBkey() ),
+ SpecialPage::getTitleFor( 'Block', $nt->getDBkey() ),
wfMsgHtml( 'change-blocklink' )
);
$tools[] = $sk->linkKnown( # Unblock link
@@ -383,13 +382,13 @@ class DeletedContributionsPage extends SpecialPage {
array(),
array(
'action' => 'unblock',
- 'ip' => $nt->getDBkey()
+ 'ip' => $nt->getDBkey()
)
);
}
else { # User is not blocked
$tools[] = $sk->linkKnown( # Block link
- SpecialPage::getTitleFor( 'Blockip', $nt->getDBkey() ),
+ SpecialPage::getTitleFor( 'Block', $nt->getDBkey() ),
wfMsgHtml( 'blocklink' )
);
}
@@ -455,7 +454,7 @@ class DeletedContributionsPage extends SpecialPage {
// languages that want to put the "for" bit right after $user but before
// $links. If 'contribsub' is around, use it for reverse compatibility,
// otherwise use 'contribsub2'.
- if( wfEmptyMsg( 'contribsub', wfMsg( 'contribsub' ) ) ) {
+ if( wfEmptyMsg( 'contribsub' ) ) {
return wfMsgHtml( 'contribsub2', $user, $links );
} else {
return wfMsgHtml( 'contribsub', "$user ($links)" );