From 48993f18f923ae06b27496a272798813e4e5a7bd Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 6 Feb 2009 14:42:50 +0000 Subject: [PATCH] Hide title if DELETED_ACTION is on, but don't worry about type/action, which isn't what we're worried about --- includes/api/ApiQueryLogEvents.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/includes/api/ApiQueryLogEvents.php b/includes/api/ApiQueryLogEvents.php index 6e2975276f..6f6e39a185 100644 --- a/includes/api/ApiQueryLogEvents.php +++ b/includes/api/ApiQueryLogEvents.php @@ -118,7 +118,7 @@ class ApiQueryLogEvents extends ApiQueryBase { $this->addOption( 'USE INDEX', array( 'logging' => $index ) ); } // Paranoia: avoid brute force searches (bug 17342) - if (!is_null($title) || !is_null($params['type'])) { + if (!is_null($title)) { $this->addWhere('log_deleted & ' . LogPage::DELETED_ACTION . ' = 0'); } if (!is_null($user)) { @@ -200,19 +200,19 @@ class ApiQueryLogEvents extends ApiQueryBase { } if ($this->fld_title) { - $title = Title :: makeTitle($row->log_namespace, $row->log_title); - ApiQueryBase :: addTitleInfo($vals, $title); - } - - if ($this->fld_type) { if (LogEventsList::isDeleted($row, LogPage::DELETED_ACTION)) { $vals['actionhidden'] = ''; } else { - $vals['type'] = $row->log_type; - $vals['action'] = $row->log_action; + $title = Title :: makeTitle($row->log_namespace, $row->log_title); + ApiQueryBase :: addTitleInfo($vals, $title); } } + if ($this->fld_type) { + $vals['type'] = $row->log_type; + $vals['action'] = $row->log_action; + } + if ($this->fld_details && $row->log_params !== '') { if (LogEventsList::isDeleted($row, LogPage::DELETED_ACTION)) { $vals['actionhidden'] = ''; -- 2.20.1