/**
* Generates and outputs the result of this query based upon the provided parameters.
*
- * @param ApiPageSet $resultPageSet
+ * @param ApiPageSet|null $resultPageSet
*/
public function run( $resultPageSet = null ) {
$user = $this->getUser();
}
}
+ $title = $params['title'];
+ if ( !is_null( $title ) ) {
+ $titleObj = Title::newFromText( $title );
+ if ( is_null( $titleObj ) ) {
+ $this->dieWithError( [ 'apierror-invalidtitle', wfEscapeWikiText( $title ) ] );
+ }
+ $this->addWhereFld( 'rc_namespace', $titleObj->getNamespace() );
+ $this->addWhereFld( 'rc_title', $titleObj->getDBkey() );
+ }
+
if ( !is_null( $params['show'] ) ) {
$show = array_flip( $params['show'] );
ApiBase::PARAM_TYPE => RecentChange::getChangeTypes()
],
'toponly' => false,
+ 'title' => null,
'continue' => [
ApiBase::PARAM_HELP_MSG => 'api-help-param-continue',
],