* Clone title so page_id is not 0 at log time.
* Change ApiQueryLogEvents to provide log_page as logpage (for all
rows, not just deletions) if ids are requested.
Bug: 26122
Change-Id: I1c7f3a84f10df05d6b37dccbad4c8232edf51580
* action=query&meta=siteinfo&siprop=interwikimap returns a new "protorel"
field which is true iff protocol-relative urls can be used to access
a particular interwiki map entry.
+* ApiQueryLogEvents now provides logpage, which is the page ID from the
+ logging table, if ids are requested and the user has the permissions.
=== Languages updated in 1.24 ===
$dbw->delete( 'revision', array( 'rev_page' => $id ), __METHOD__ );
}
+ // Clone the title, so we have the information we need when we log
+ $logTitle = clone $this->mTitle;
+
$this->doDeleteUpdates( $id, $content );
// Log the deletion, if the page was suppressed, log it at Oversight instead
$logEntry = new ManualLogEntry( $logtype, 'delete' );
$logEntry->setPerformer( $user );
- $logEntry->setTarget( $this->mTitle );
+ $logEntry->setTarget( $logTitle );
$logEntry->setComment( $reason );
$logid = $logEntry->insert();
$logEntry->publish( $logid );
) );
$this->addFieldsIf( 'page_id', $this->fld_ids );
+ // log_page is the page_id saved at log time, whereas page_id is from a
+ // join at query time. This leads to different results in various
+ // scenarios, e.g. deletion, recreation.
+ $this->addFieldsIf( 'log_page', $this->fld_ids );
$this->addFieldsIf( array( 'log_user', 'log_user_text', 'user_name' ), $this->fld_user );
$this->addFieldsIf( 'log_user', $this->fld_userid );
$this->addFieldsIf(
}
if ( $this->fld_ids ) {
$vals['pageid'] = intval( $row->page_id );
+ $vals['logpage'] = intval( $row->log_page );
}
if ( $this->fld_details && $row->log_params !== '' ) {
self::addLogParams(