From: Aaron Schulz Date: Fri, 6 Feb 2009 14:42:50 +0000 (+0000) Subject: Hide title if DELETED_ACTION is on, but don't worry about type/action, which isn... X-Git-Tag: 1.31.0-rc.0~43003 X-Git-Url: http://git.cyclocoop.org/%7B%24admin_url%7Dmes_infos.php?a=commitdiff_plain;h=48993f18f923ae06b27496a272798813e4e5a7bd;p=lhc%2Fweb%2Fwiklou.git Hide title if DELETED_ACTION is on, but don't worry about type/action, which isn't what we're worried about --- 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'] = '';