Index: includes/api/ApiQueryLogEvents.php =================================================================== --- includes/api/ApiQueryLogEvents.php (revision 68353) +++ includes/api/ApiQueryLogEvents.php (revision ) @@ -85,8 +85,8 @@ $this->addFieldsIf( 'page_id', $this->fld_ids ); $this->addFieldsIf( 'log_user', $this->fld_user ); $this->addFieldsIf( 'user_name', $this->fld_user ); - $this->addFieldsIf( 'log_namespace', $this->fld_title ); - $this->addFieldsIf( 'log_title', $this->fld_title ); + $this->addFieldsIf( 'log_namespace', $this->fld_title || $this->fld_parsedcomment ); + $this->addFieldsIf( 'log_title', $this->fld_title || $this->fld_parsedcomment ); $this->addFieldsIf( 'log_comment', $this->fld_comment || $this->fld_parsedcomment ); $this->addFieldsIf( 'log_params', $this->fld_details ); @@ -231,7 +231,10 @@ $vals['pageid'] = intval( $row->page_id ); } + if( $this->fld_title || $this->fld_parsedcomment ) + { - $title = Title::makeTitle( $row->log_namespace, $row->log_title ); + $title = Title::makeTitle( $row->log_namespace, $row->log_title ); + } if ( $this->fld_title ) { if ( LogEventsList::isDeleted( $row, LogPage::DELETED_ACTION ) ) {