r46917 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r46916‎ | r46917 | r46918 >
Date:14:42, 6 February 2009
Author:aaron
Status:deferred
Tags:
Comment:
Hide title if DELETED_ACTION is on, but don't worry about type/action, which isn't what we're worried about
Modified paths:
  • /trunk/phase3/includes/api/ApiQueryLogEvents.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/api/ApiQueryLogEvents.php
@@ -118,7 +118,7 @@
119119 $this->addOption( 'USE INDEX', array( 'logging' => $index ) );
120120 }
121121 // Paranoia: avoid brute force searches (bug 17342)
122 - if (!is_null($title) || !is_null($params['type'])) {
 122+ if (!is_null($title)) {
123123 $this->addWhere('log_deleted & ' . LogPage::DELETED_ACTION . ' = 0');
124124 }
125125 if (!is_null($user)) {
@@ -200,19 +200,19 @@
201201 }
202202
203203 if ($this->fld_title) {
204 - $title = Title :: makeTitle($row->log_namespace, $row->log_title);
205 - ApiQueryBase :: addTitleInfo($vals, $title);
206 - }
207 -
208 - if ($this->fld_type) {
209204 if (LogEventsList::isDeleted($row, LogPage::DELETED_ACTION)) {
210205 $vals['actionhidden'] = '';
211206 } else {
212 - $vals['type'] = $row->log_type;
213 - $vals['action'] = $row->log_action;
 207+ $title = Title :: makeTitle($row->log_namespace, $row->log_title);
 208+ ApiQueryBase :: addTitleInfo($vals, $title);
214209 }
215210 }
216211
 212+ if ($this->fld_type) {
 213+ $vals['type'] = $row->log_type;
 214+ $vals['action'] = $row->log_action;
 215+ }
 216+
217217 if ($this->fld_details && $row->log_params !== '') {
218218 if (LogEventsList::isDeleted($row, LogPage::DELETED_ACTION)) {
219219 $vals['actionhidden'] = '';

Status & tagging log