* (bug 24089) Logevents causes PHP Notice if leprop=title isn't supplied

Patch by John Du Hart

Add a couple of missing braces
This commit is contained in:
Sam Reed 2010-06-23 12:34:59 +00:00
parent e3644ae2c4
commit 19d004fa66
3 changed files with 9 additions and 4 deletions

View file

@ -88,6 +88,7 @@ following names for their contribution to the product.
* Jeremy Baron
* Jidanni
* Jimmy Xu
* John Du Hart
* Karun Dambietz
* Kim Hyun-Joon
* Lee Worden

View file

@ -240,6 +240,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
* (bug 24016) API: Handle parameters specified in simple string syntax
( 'paramname' => 'defaultval' ) correctly when outputting help
* (bug 19910) Headings of the form ===+\s+ are now displayed as valid headings
* (bug 24089) Logevents causes PHP Notice if leprop=title isn't supplied
=== Languages updated in 1.17 ===

View file

@ -85,8 +85,8 @@ class ApiQueryLogEvents extends ApiQueryBase {
$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,9 @@ class ApiQueryLogEvents extends ApiQueryBase {
$vals['pageid'] = intval( $row->page_id );
}
$title = Title::makeTitle( $row->log_namespace, $row->log_title );
if( $this->fld_title || $this->fld_parsedcomment ) {
$title = Title::makeTitle( $row->log_namespace, $row->log_title );
}
if ( $this->fld_title ) {
if ( LogEventsList::isDeleted( $row, LogPage::DELETED_ACTION ) ) {
@ -263,8 +265,9 @@ class ApiQueryLogEvents extends ApiQueryBase {
$vals['userhidden'] = '';
} else {
$vals['user'] = $row->user_name;
if ( !$row->log_user )
if ( !$row->log_user ) {
$vals['anon'] = '';
}
}
}
if ( $this->fld_timestamp ) {