$this->requireMaxOneParameter( $params, 'timestamp', 'torevid', 'newerthanrevid' );
$pageSet = $this->getPageSet();
- $args = array_merge( array( $params, 'entirewatchlist' ), array_keys( $pageSet->getAllowedParams() ) );
- call_user_func_array( array( $this, 'requireOnlyOneParameter' ), $args );
+ if ( $params['entirewatchlist'] && $pageSet->getDataSource() !== null ) {
+ $this->dieUsage( "Cannot use 'entirewatchlist' at the same time as '{$pageSet->getDataSource()}'", 'multisource' );
+ }
$dbw = wfGetDB( DB_MASTER, 'api' );
}
// Now, put the valid titles into the result
+ /** @var $title Title */
foreach ( $pageSet->getTitles() as $title ) {
$ns = $title->getNamespace();
$dbkey = $title->getDBkey();
public function getDescription() {
return array( 'Update the notification timestamp for watched pages.',
'This affects the highlighting of changed pages in the watchlist and history,',
- 'and the sending of email when the "E-mail me when a page on my watchlist is',
+ 'and the sending of email when the "Email me when a page on my watchlist is',
'changed" preference is enabled.'
);
}
public function getExamples() {
return array(
- 'api.php?action=setnotificationtimestamp&entirewatchlist=&token=ABC123' => 'Reset the notification status for the entire watchlist',
- 'api.php?action=setnotificationtimestamp&titles=Main_page&token=ABC123' => 'Reset the notification status for "Main page"',
- 'api.php?action=setnotificationtimestamp&titles=Main_page×tamp=2012-01-01T00:00:00Z&token=ABC123' => 'Set the notification timestamp for "Main page" so all edits since 1 January 2012 are unviewed',
+ 'api.php?action=setnotificationtimestamp&entirewatchlist=&token=123ABC' => 'Reset the notification status for the entire watchlist',
+ 'api.php?action=setnotificationtimestamp&titles=Main_page&token=123ABC' => 'Reset the notification status for "Main page"',
+ 'api.php?action=setnotificationtimestamp&titles=Main_page×tamp=2012-01-01T00:00:00Z&token=123ABC' => 'Set the notification timestamp for "Main page" so all edits since 1 January 2012 are unviewed',
);
}