$tagSelector = ChangeTags::buildTagFilterSelector( $tagFilter );
/**
* Option to show only revisions that have been (partially) hidden via RevisionDelete
- * Note that this can run a *long* time if there are many revisions to look at.
- * We use "isBigDeletion" to determine if the history is too big to go through.
- * Additionally, only users with 'deleterevision' right can filter for deleted edits.
*/
- if ( $this->title->userCan( 'deleterevision' )
- && ( !$this->article->isBigDeletion() || $this->title->userCan( 'bigdelete' ) ) )
- {
- $conds = ( $wgRequest->getBool( 'deleted' ) )
- ? array("rev_deleted != '0'")
- : array();
- $checkDeleted = Xml::checkLabel( wfMsg( 'history-show-deleted' ),
- 'deleted', 'mw-show-deleted-only', $wgRequest->getBool( 'deleted' ) ) . "\n";
- }
- else { # Don't filter and don't add the checkbox for filtering
+ if ( $wgRequest->getBool( 'deleted' ) ) {
+ $conds = array("rev_deleted != '0'");
+ } else {
$conds = array();
- $checkDeleted = '';
}
+ $checkDeleted = Xml::checkLabel( wfMsg( 'history-show-deleted' ),
+ 'deleted', 'mw-show-deleted-only', $wgRequest->getBool( 'deleted' ) ) . "\n";
$action = htmlspecialchars( $wgScript );
$wgOut->addHTML(
return $this->historyPage->getArticle();
}
+ function getSqlComment() {
+ if ( $this->conds ) {
+ return 'history page filtered'; // potentially slow, see CR r58153
+ } else {
+ return 'history page unfiltered';
+ }
+ }
+
function getQueryInfo() {
$queryInfo = array(
'tables' => array('revision'),
}
}
+ /**
+ * Get some text to go in brackets in the "function name" part of the SQL comment
+ */
+ function getSqlComment() {
+ return get_class( $this );
+ }
+
/**
* Do a query with specified parameters, rather than using the object
* context
* @return ResultWrapper
*/
function reallyDoQuery( $offset, $limit, $descending ) {
- $fname = __METHOD__ . ' (' . get_class( $this ) . ')';
+ $fname = __METHOD__ . ' (' . $this->getSqlComment() . ')';
$info = $this->getQueryInfo();
$tables = $info['tables'];
$fields = $info['fields'];