diff options
author | Pierre Schmitz <pierre@archlinux.de> | 2009-06-10 13:00:47 +0200 |
---|---|---|
committer | Pierre Schmitz <pierre@archlinux.de> | 2009-06-10 13:00:47 +0200 |
commit | 72e90545454c0e014318fa3c81658e035aac58c1 (patch) | |
tree | 9212e3f46868989c4d57ae9a5c8a1a80e4dc0702 /includes/specials/SpecialDeletedContributions.php | |
parent | 565a0ccc371ec1a2a0e9b39487cbac18e6f60e25 (diff) |
applying patch to version 1.15.0
Diffstat (limited to 'includes/specials/SpecialDeletedContributions.php')
-rw-r--r-- | includes/specials/SpecialDeletedContributions.php | 20 |
1 files changed, 14 insertions, 6 deletions
diff --git a/includes/specials/SpecialDeletedContributions.php b/includes/specials/SpecialDeletedContributions.php index 513d25e2..67b05ca1 100644 --- a/includes/specials/SpecialDeletedContributions.php +++ b/includes/specials/SpecialDeletedContributions.php @@ -26,9 +26,13 @@ class DeletedContribsPager extends IndexPager { } function getQueryInfo() { + global $wgUser; list( $index, $userCond ) = $this->getUserCond(); $conds = array_merge( $userCond, $this->getNamespaceCond() ); - + // Paranoia: avoid brute force searches (bug 17792) + if( !$wgUser->isAllowed( 'suppressrevision' ) ) { + $conds[] = 'ar_deleted & ' . Revision::DELETED_USER . ' = 0'; + } return array( 'tables' => array( 'archive' ), 'fields' => array( @@ -36,7 +40,7 @@ class DeletedContribsPager extends IndexPager { 'ar_user', 'ar_user_text', 'ar_deleted' ), 'conds' => $conds, - 'options' => array( 'FORCE INDEX' => $index ) + 'options' => array( 'USE INDEX' => $index ) ); } @@ -62,6 +66,8 @@ class DeletedContribsPager extends IndexPager { } function getNavigationBar() { + global $wgLang; + if ( isset( $this->mNavigationBar ) ) { return $this->mNavigationBar; } @@ -74,9 +80,9 @@ class DeletedContribsPager extends IndexPager { $pagingLinks = $this->getPagingLinks( $linkTexts ); $limitLinks = $this->getLimitLinks(); - $limits = implode( ' | ', $limitLinks ); + $limits = $wgLang->pipeList( $limitLinks ); - $this->mNavigationBar = "({$pagingLinks['first']} | {$pagingLinks['last']}) " . + $this->mNavigationBar = "(" . $wgLang->pipeList( array( $pagingLinks['first'], $pagingLinks['last'] ) ) . ") " . wfMsgExt( 'viewprevnext', array( 'parsemag' ), $pagingLinks['prev'], $pagingLinks['next'], $limits ); return $this->mNavigationBar; } @@ -113,7 +119,7 @@ class DeletedContribsPager extends IndexPager { 'user_text' => $row->ar_user_text, 'timestamp' => $row->ar_timestamp, 'minor_edit' => $row->ar_minor_edit, - 'rev_deleted' => $row->ar_deleted, + 'deleted' => $row->ar_deleted, ) ); $page = Title::makeTitle( $row->ar_namespace, $row->ar_title ); @@ -204,6 +210,8 @@ class DeletedContributionsPage extends SpecialPage { global $wgUser, $wgOut, $wgLang, $wgRequest; + $wgOut->setPageTitle( wfMsgExt( 'deletedcontributions-title', array( 'parsemag' ) ) ); + $options = array(); if ( isset( $par ) ) { @@ -306,7 +314,7 @@ class DeletedContributionsPage extends SpecialPage { wfRunHooks( 'ContributionsToolLinks', array( $id, $nt, &$tools ) ); - $links = implode( ' | ', $tools ); + $links = $wgLang->pipeList( $tools ); } // Old message 'contribsub' had one parameter, but that doesn't work for |