Hide title if DELETED_ACTION is on, but don't worry about type/action, which isn...
authorAaron Schulz <aaron@users.mediawiki.org>
Fri, 6 Feb 2009 14:42:50 +0000 (14:42 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Fri, 6 Feb 2009 14:42:50 +0000 (14:42 +0000)
includes/api/ApiQueryLogEvents.php

index 6e29752..6f6e39a 100644 (file)
@@ -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'] = '';