Index: trunk/phase3/includes/Pager.php |
— | — | @@ -234,6 +234,13 @@ |
235 | 235 | } |
236 | 236 | |
237 | 237 | /** |
| 238 | + * Get some text to go in brackets in the "function name" part of the SQL comment |
| 239 | + */ |
| 240 | + function getSqlComment() { |
| 241 | + return get_class( $this ); |
| 242 | + } |
| 243 | + |
| 244 | + /** |
238 | 245 | * Do a query with specified parameters, rather than using the object |
239 | 246 | * context |
240 | 247 | * |
— | — | @@ -243,7 +250,7 @@ |
244 | 251 | * @return ResultWrapper |
245 | 252 | */ |
246 | 253 | function reallyDoQuery( $offset, $limit, $descending ) { |
247 | | - $fname = __METHOD__ . ' (' . get_class( $this ) . ')'; |
| 254 | + $fname = __METHOD__ . ' (' . $this->getSqlComment() . ')'; |
248 | 255 | $info = $this->getQueryInfo(); |
249 | 256 | $tables = $info['tables']; |
250 | 257 | $fields = $info['fields']; |
Index: trunk/phase3/includes/HistoryPage.php |
— | — | @@ -129,23 +129,14 @@ |
130 | 130 | $tagSelector = ChangeTags::buildTagFilterSelector( $tagFilter ); |
131 | 131 | /** |
132 | 132 | * Option to show only revisions that have been (partially) hidden via RevisionDelete |
133 | | - * Note that this can run a *long* time if there are many revisions to look at. |
134 | | - * We use "isBigDeletion" to determine if the history is too big to go through. |
135 | | - * Additionally, only users with 'deleterevision' right can filter for deleted edits. |
136 | 133 | */ |
137 | | - if ( $this->title->userCan( 'deleterevision' ) |
138 | | - && ( !$this->article->isBigDeletion() || $this->title->userCan( 'bigdelete' ) ) ) |
139 | | - { |
140 | | - $conds = ( $wgRequest->getBool( 'deleted' ) ) |
141 | | - ? array("rev_deleted != '0'") |
142 | | - : array(); |
143 | | - $checkDeleted = Xml::checkLabel( wfMsg( 'history-show-deleted' ), |
144 | | - 'deleted', 'mw-show-deleted-only', $wgRequest->getBool( 'deleted' ) ) . "\n"; |
145 | | - } |
146 | | - else { # Don't filter and don't add the checkbox for filtering |
| 134 | + if ( $wgRequest->getBool( 'deleted' ) ) { |
| 135 | + $conds = array("rev_deleted != '0'"); |
| 136 | + } else { |
147 | 137 | $conds = array(); |
148 | | - $checkDeleted = ''; |
149 | 138 | } |
| 139 | + $checkDeleted = Xml::checkLabel( wfMsg( 'history-show-deleted' ), |
| 140 | + 'deleted', 'mw-show-deleted-only', $wgRequest->getBool( 'deleted' ) ) . "\n"; |
150 | 141 | |
151 | 142 | $action = htmlspecialchars( $wgScript ); |
152 | 143 | $wgOut->addHTML( |
— | — | @@ -325,6 +316,14 @@ |
326 | 317 | return $this->historyPage->getArticle(); |
327 | 318 | } |
328 | 319 | |
| 320 | + function getSqlComment() { |
| 321 | + if ( $this->conds ) { |
| 322 | + return 'history page filtered'; // potentially slow, see CR r58153 |
| 323 | + } else { |
| 324 | + return 'history page unfiltered'; |
| 325 | + } |
| 326 | + } |
| 327 | + |
329 | 328 | function getQueryInfo() { |
330 | 329 | $queryInfo = array( |
331 | 330 | 'tables' => array('revision'), |