if ( !is_null( $params['type'] ) ) {
try {
$this->addWhereFld( 'rc_type', RecentChange::parseToRCType( $params['type'] ) );
- } catch ( MWException $e ) {
+ } catch ( Exception $e ) {
ApiBase::dieDebug( __METHOD__, $e->getMessage() );
}
}
$vals['logid'] = intval( $row->rc_logid );
$vals['logtype'] = $row->rc_log_type;
$vals['logaction'] = $row->rc_log_action;
- $logEntry = DatabaseLogEntry::newFromRow( (array)$row );
+ $logEntry = DatabaseLogEntry::newFromRow( $row );
ApiQueryLogEvents::addLogParams(
$this->getResult(),
$vals,
$logEntry->getParameters(),
$logEntry->getType(),
$logEntry->getSubtype(),
- $logEntry->getTimestamp()
+ $logEntry->getTimestamp(),
+ $logEntry->isLegacy()
);
}
}
)
),
'type' => array(
+ ApiBase::PARAM_DFLT => 'edit|new|log',
ApiBase::PARAM_ISMULTI => true,
ApiBase::PARAM_TYPE => array(
'edit',
);
}
- public function getExamplesMessages() {
+ protected function getExamplesMessages() {
return array(
'action=query&list=watchlist'
=> 'apihelp-query+watchlist-example-simple',