r68451 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r68450‎ | r68451 | r68452 >
Date:12:34, 23 June 2010
Author:reedy
Status:ok
Tags:
Comment:
* (bug 24089) Logevents causes PHP Notice if leprop=title isn't supplied

Patch by John Du Hart

Add a couple of missing braces
Modified paths:
  • /trunk/phase3/CREDITS (modified) (history)
  • /trunk/phase3/RELEASE-NOTES (modified) (history)
  • /trunk/phase3/includes/api/ApiQueryLogEvents.php (modified) (history)

Diff [purge]

Index: trunk/phase3/CREDITS
@@ -88,6 +88,7 @@
8989 * Jeremy Baron
9090 * Jidanni
9191 * Jimmy Xu
 92+* John Du Hart
9293 * Karun Dambietz
9394 * Kim Hyun-Joon
9495 * Lee Worden
Index: trunk/phase3/includes/api/ApiQueryLogEvents.php
@@ -85,8 +85,8 @@
8686 $this->addFieldsIf( 'page_id', $this->fld_ids );
8787 $this->addFieldsIf( 'log_user', $this->fld_user );
8888 $this->addFieldsIf( 'user_name', $this->fld_user );
89 - $this->addFieldsIf( 'log_namespace', $this->fld_title );
90 - $this->addFieldsIf( 'log_title', $this->fld_title );
 89+ $this->addFieldsIf( 'log_namespace', $this->fld_title || $this->fld_parsedcomment );
 90+ $this->addFieldsIf( 'log_title', $this->fld_title || $this->fld_parsedcomment );
9191 $this->addFieldsIf( 'log_comment', $this->fld_comment || $this->fld_parsedcomment );
9292 $this->addFieldsIf( 'log_params', $this->fld_details );
9393
@@ -231,7 +231,9 @@
232232 $vals['pageid'] = intval( $row->page_id );
233233 }
234234
235 - $title = Title::makeTitle( $row->log_namespace, $row->log_title );
 235+ if( $this->fld_title || $this->fld_parsedcomment ) {
 236+ $title = Title::makeTitle( $row->log_namespace, $row->log_title );
 237+ }
236238
237239 if ( $this->fld_title ) {
238240 if ( LogEventsList::isDeleted( $row, LogPage::DELETED_ACTION ) ) {
@@ -263,8 +265,9 @@
264266 $vals['userhidden'] = '';
265267 } else {
266268 $vals['user'] = $row->user_name;
267 - if ( !$row->log_user )
 269+ if ( !$row->log_user ) {
268270 $vals['anon'] = '';
 271+ }
269272 }
270273 }
271274 if ( $this->fld_timestamp ) {
Index: trunk/phase3/RELEASE-NOTES
@@ -240,6 +240,7 @@
241241 * (bug 24016) API: Handle parameters specified in simple string syntax
242242 ( 'paramname' => 'defaultval' ) correctly when outputting help
243243 * (bug 19910) Headings of the form ===+\s+ are now displayed as valid headings
 244+* (bug 24089) Logevents causes PHP Notice if leprop=title isn't supplied
244245
245246 === Languages updated in 1.17 ===
246247

Status & tagging log