* (bug 23458) Add support for pageid parameter to action=parse requests
* (bug 23460) Parse action should have a section option
* (bug 21346) Make deleted images searchable by hash
+* (bug 23461) Normalise usage of parameter names in parameter descriptions
=== Languages updated in 1.17 ===
public function getDescription() {
return array(
- 'Block a user.'
+ 'Block a user'
);
}
}
public function getParamDescription() {
+ $p = $this->getModulePrefix();
return array(
- 'title' => 'Title of the page you want to delete. Cannot be used together with pageid',
- 'pageid' => 'Page ID of the page you want to delete. Cannot be used together with title',
+ 'title' => "Title of the page you want to delete. Cannot be used together with {$p}pageid",
+ 'pageid' => "Page ID of the page you want to delete. Cannot be used together with {$p}title",
'token' => 'A delete token previously retrieved through prop=info',
- 'reason' => 'Reason for the deletion. If not set, an automatically generated reason will be used.',
+ 'reason' => 'Reason for the deletion. If not set, an automatically generated reason will be used',
'watch' => 'Add the page to your watchlist',
'watchlist' => 'Unconditionally add or remove the page from your watchlist, use preferences or do not change watch',
'unwatch' => 'Remove the page from your watchlist',
public function getDescription() {
return array(
- 'Delete a page.'
+ 'Delete a page'
);
}
public function getDescription() {
return array(
- 'This module has been disabled.'
+ 'This module has been disabled'
);
}
}
protected function getParamDescription() {
+ $p = $this->getModulePrefix();
return array(
'title' => 'Page title',
'section' => 'Section number. 0 for the top section, \'new\' for a new section',
'Used to detect edit conflicts; leave unset to ignore conflicts.'
),
'starttimestamp' => array( 'Timestamp when you obtained the edit token.',
- 'Used to detect edit conflicts; leave unset to ignore conflicts.'
+ 'Used to detect edit conflicts; leave unset to ignore conflicts'
),
'recreate' => 'Override any errors about the article having been deleted in the meantime',
'createonly' => 'Don\'t edit the page if it exists already',
'watchlist' => 'Unconditionally add or remove the page from your watchlist, use preferences or do not change watch',
'captchaid' => 'CAPTCHA ID from previous request',
'captchaword' => 'Answer to the CAPTCHA',
- 'md5' => array( 'The MD5 hash of the text parameter, or the prependtext and appendtext parameters concatenated.',
+ 'md5' => array( "The MD5 hash of the {$p}text parameter, or the {$p}prependtext and {$p}appendtext parameters concatenated.",
'If set, the edit won\'t be done unless the hash is correct' ),
- 'prependtext' => 'Add this text to the beginning of the page. Overrides text.',
- 'appendtext' => 'Add this text to the end of the page. Overrides text',
- 'undo' => 'Undo this revision. Overrides text, prependtext and appendtext',
+ 'prependtext' => "Add this text to the beginning of the page. Overrides {$p}text",
+ 'appendtext' => "Add this text to the end of the page. Overrides {$p}text",
+ 'undo' => "Undo this revision. Overrides {$p}text, {$p}prependtext and {$p}appendtext",
'undoafter' => 'Undo all revisions from undo to this one. If not set, just undo one revision',
);
}
}
/**
+ * API Module to facilitate sending of emails to users
* @ingroup API
*/
class ApiEmailUser extends ApiBase {
return array(
'feedformat' => 'The format of the feed',
'hours' => 'List pages modified within this many hours from now',
- 'allrev' => 'Include multiple revisions of the same page within given timeframe.',
- 'wlowner' => "The user whose watchlist you want (must be accompanied by wltoken if it's not you)",
+ 'allrev' => 'Include multiple revisions of the same page within given timeframe',
+ 'wlowner' => "The user whose watchlist you want (must be accompanied by {$this->getModulePrefix()}token if it's not you)",
'wltoken' => 'Security token that requested user set in their preferences'
);
}
}
/**
+ * API PHP's var_export() output formatter
* @ingroup API
*/
class ApiFormatDbg extends ApiFormatBase {
}
/**
+ * API JSON output formatter
* @ingroup API
*/
class ApiFormatJson extends ApiFormatBase {
}
/**
+ * API Serialized PHP output formatter
* @ingroup API
*/
class ApiFormatPhp extends ApiFormatBase {
}
/**
+ * API Text output formatter
* @ingroup API
*/
class ApiFormatTxt extends ApiFormatBase {
}
/**
+ * API WDDX output formatter
* @ingroup API
*/
class ApiFormatWddx extends ApiFormatBase {
}
/**
+ * API XML output formatter
* @ingroup API
*/
class ApiFormatXml extends ApiFormatBase {
public function getParamDescription() {
return array(
- 'xmldoublequote' => 'If specified, double quotes all attributes and content.',
+ 'xmldoublequote' => 'If specified, double quotes all attributes and content',
'xslt' => 'If specified, adds <xslt> as stylesheet',
);
}
}
/**
+ * API YAML output formatter
* @ingroup API
*/
class ApiFormatYaml extends ApiFormatBase {
* @ingroup API
*/
class ApiGo extends ApiBase {
-
- /**
- * Std ctor.
- */
public function __construct( $main, $action ) {
parent::__construct( $main, $action );
}
'In the event of a successful log-in, a cookie will be attached',
'to your session. In the event of a failed log-in, you will not ',
'be able to attempt another log-in through this method for 5 seconds.',
- 'This is to prevent password guessing by automated password crackers.'
+ 'This is to prevent password guessing by automated password crackers'
);
}
'',
'Status: All features shown on this page should be working, but the API',
' is still in active development, and may change at any time.',
- ' Make sure to monitor our mailing list for any updates.',
+ ' Make sure to monitor our mailing list for any updates',
'',
'Documentation: http://www.mediawiki.org/wiki/API',
'Mailing list: http://lists.wikimedia.org/mailman/listinfo/mediawiki-api',
}
/**
+ * API Module to move pages
* @ingroup API
*/
class ApiMove extends ApiBase {
}
public function getParamDescription() {
+ $p = $this->getModulePrefix();
return array(
- 'from' => 'Title of the page you want to move. Cannot be used together with fromid.',
- 'fromid' => 'Page ID of the page you want to move. Cannot be used together with from.',
- 'to' => 'Title you want to rename the page to.',
+ 'from' => "Title of the page you want to move. Cannot be used together with {$p}fromid",
+ 'fromid' => "Page ID of the page you want to move. Cannot be used together with {$p}from",
+ 'to' => 'Title you want to rename the page to',
'token' => 'A move token previously retrieved through prop=info',
- 'reason' => 'Reason for the move (optional).',
- 'movetalk' => 'Move the talk page, if it exists.',
+ 'reason' => 'Reason for the move (optional)',
+ 'movetalk' => 'Move the talk page, if it exists',
'movesubpages' => 'Move subpages, if applicable',
'noredirect' => 'Don\'t create a redirect',
'watch' => 'Add the page and the redirect to your watchlist',
public function getDescription() {
return array(
- 'Move a page.'
+ 'Move a page'
);
}
}
public function getParamDescription() {
+ $p = $this->getModulePrefix();
return array(
- 'text' => 'Wikitext to parse.',
- 'summary' => 'Summary to parse.',
- 'redirects' => 'If the page parameter is set to a redirect, resolve it.',
- 'title' => 'Title of page the text belongs to.',
- 'page' => 'Parse the content of this page. Cannot be used together with text and title.',
- 'pageid' => 'Parse the content of this page. Overrides page.',
- 'oldid' => 'Parse the content of this revision. Overrides page and pageid.',
- 'prop' => array( 'Which pieces of information to get.',
- 'NOTE: Section tree is only generated if there are more than 4 sections, or if the __TOC__ keyword is present.'
+ 'text' => 'Wikitext to parse',
+ 'summary' => 'Summary to parse',
+ 'redirects' => "If the {$p}page parameter is set to a redirect, resolve it",
+ 'title' => 'Title of page the text belongs to',
+ 'page' => "Parse the content of this page. Cannot be used together with {$p}text and {$p}title",
+ 'pageid' => "Parse the content of this page. Overrides {$p}page",
+ 'oldid' => "Parse the content of this revision. Overrides {$p}page and {$p}pageid",
+ 'prop' => array( 'Which pieces of information to get',
+ 'NOTE: Section tree is only generated if there are more than 4 sections, or if the __TOC__ keyword is present'
),
- 'pst' => array( 'Do a pre-save transform on the input before parsing it.',
- 'Ignored if page, pageid or oldid is used.'
+ 'pst' => array( 'Do a pre-save transform on the input before parsing it',
+ 'Ignored if page, pageid or oldid is used'
),
- 'onlypst' => array( 'Do a pre-save transform (PST) on the input, but don\'t parse it.',
- 'Returns the same wikitext, after a PST has been applied. Ignored if page, pageid or oldid is used.'
+ 'onlypst' => array( 'Do a pre-save transform (PST) on the input, but don\'t parse it',
+ 'Returns the same wikitext, after a PST has been applied. Ignored if page, pageid or oldid is used'
),
- 'uselang' => 'Which language to parse the request in.',
+ 'uselang' => 'Which language to parse the request in',
'section' => 'Only retrieve the content of this section number',
);
}
public function getDescription() {
return array(
- 'Patrol a page or revision. '
+ 'Patrol a page or revision'
);
}
public function getParamDescription() {
return array(
- 'title' => 'Title of the page you want to (un)protect.',
+ 'title' => 'Title of the page you want to (un)protect',
'token' => 'A protect token previously retrieved through prop=info',
'protections' => 'Pipe-separated list of protection levels, formatted action=group (e.g. edit=sysop)',
'expiry' => array( 'Expiry timestamps. If only one timestamp is set, it\'ll be used for all protections.',
public function getDescription() {
return array(
- 'Change the protection level of a page.'
+ 'Change the protection level of a page'
);
}
public function getDescription() {
return array(
- 'Purge the cache for the given titles.'
+ 'Purge the cache for the given titles'
);
}
'generator' => array( 'Use the output of a list as the input for other prop/list/meta items',
'NOTE: generator parameter names must be prefixed with a \'g\', see examples.' ),
'redirects' => 'Automatically resolve redirects',
- 'indexpageids' => 'Include an additional pageids section listing all returned page IDs.',
+ 'indexpageids' => 'Include an additional pageids section listing all returned page IDs',
'export' => 'Export the current revisions of all given or generated pages',
'exportnowrap' => 'Return the export XML without wrapping it in an XML result (same format as Special:Export). Can only be used with export',
);
return array(
'Query API module allows applications to get needed pieces of data from the MediaWiki databases,',
'and is loosely based on the old query.php interface.',
- 'All data modifications will first have to use query to acquire a token to prevent abuse from malicious sites.'
+ 'All data modifications will first have to use query to acquire a token to prevent abuse from malicious sites'
);
}
public function getParamDescription() {
return array(
- 'from' => 'The category to start enumerating from.',
- 'prefix' => 'Search for all category titles that begin with this value.',
- 'dir' => 'Direction to sort in.',
- 'limit' => 'How many categories to return.',
+ 'from' => 'The category to start enumerating from',
+ 'prefix' => 'Search for all category titles that begin with this value',
+ 'dir' => 'Direction to sort in',
+ 'limit' => 'How many categories to return',
'prop' => 'Which properties to get',
);
}
public function getParamDescription() {
return array(
- 'from' => 'The page title to start enumerating from.',
- 'prefix' => 'Search for all page titles that begin with this value.',
- 'unique' => 'Only show unique links. Cannot be used with generator or prop=ids',
+ 'from' => 'The page title to start enumerating from',
+ 'prefix' => 'Search for all page titles that begin with this value',
+ 'unique' => "Only show unique links. Cannot be used with generator or {$this->getModulePrefix()}prop=ids",
'prop' => 'What pieces of information to include',
- 'namespace' => 'The namespace to enumerate.',
- 'limit' => 'How many total links to return.',
- 'continue' => 'When more results are available, use this to continue.',
+ 'namespace' => 'The namespace to enumerate',
+ 'limit' => 'How many total links to return',
+ 'continue' => 'When more results are available, use this to continue',
);
}
public function getParamDescription() {
return array(
- 'from' => 'The user name to start enumerating from.',
- 'prefix' => 'Search for all page titles that begin with this value.',
+ 'from' => 'The user name to start enumerating from',
+ 'prefix' => 'Search for all page titles that begin with this value',
'group' => 'Limit users to a given group name',
'prop' => array(
'What pieces of information to include.',
- '`groups` property uses more server resources and may return fewer results than the limit.' ),
- 'limit' => 'How many total user names to return.',
+ '`groups` property uses more server resources and may return fewer results than the limit' ),
+ 'limit' => 'How many total user names to return',
'witheditsonly' => 'Only list users who have made edits',
);
}
public function getParamDescription() {
return array(
- 'from' => 'The image title to start enumerating from.',
- 'prefix' => 'Search for all image titles that begin with this value.',
+ 'from' => 'The image title to start enumerating from',
+ 'prefix' => 'Search for all image titles that begin with this value',
'dir' => 'The direction in which to list',
'minsize' => 'Limit to images with at least this many bytes',
'maxsize' => 'Limit to images with at most this many bytes',
- 'limit' => 'How many total images to return.',
- 'sha1' => 'SHA1 hash of image. Overrides sha1base36',
+ 'limit' => 'How many images in total to return',
+ 'sha1' => "SHA1 hash of image. Overrides {$this->getModulePrefix()}sha1base36",
'sha1base36' => 'SHA1 hash of image in base 36 (used in MediaWiki)',
'prop' => 'Which properties to get',
);
}
public function getDescription() {
- return 'Return messages from this site.';
+ return 'Return messages from this site';
}
protected function getExamples() {
}
public function getParamDescription() {
+ $p = $this->getModulePrefix();
return array(
- 'from' => 'The page title to start enumerating from.',
- 'prefix' => 'Search for all page titles that begin with this value.',
- 'namespace' => 'The namespace to enumerate.',
- 'filterredir' => 'Which pages to list.',
+ 'from' => 'The page title to start enumerating from',
+ 'prefix' => 'Search for all page titles that begin with this value',
+ 'namespace' => 'The namespace to enumerate',
+ 'filterredir' => 'Which pages to list',
'dir' => 'The direction in which to list',
'minsize' => 'Limit to pages with at least this many bytes',
'maxsize' => 'Limit to pages with at most this many bytes',
'prtype' => 'Limit to protected pages only',
- 'prlevel' => 'The protection level (must be used with apprtype= parameter)',
- 'prfiltercascade' => 'Filter protections based on cascadingness (ignored when apprtype isn\'t set)',
+ 'prlevel' => "The protection level (must be used with {$p}prtype= parameter)",
+ 'prfiltercascade' => "Filter protections based on cascadingness (ignored when {$p}prtype isn't set)",
'filterlanglinks' => 'Filter based on whether a page has langlinks',
'limit' => 'How many total pages to return.'
);
public function getParamDescription() {
$retval = array(
- 'title' => 'Title to search.',
- 'continue' => 'When more results are available, use this to continue.',
- 'namespace' => 'The namespace to enumerate.',
+ 'title' => 'Title to search',
+ 'continue' => 'When more results are available, use this to continue',
+ 'namespace' => 'The namespace to enumerate',
);
if ( $this->getModuleName() != 'embeddedin' ) {
return array_merge( $retval, array(
}
return array_merge( $retval, array(
'filterredir' => 'How to filter for redirects',
- 'limit' => 'How many total pages to return.'
+ 'limit' => 'How many total pages to return'
) );
}
'ids' => 'Pipe-separated list of block IDs to list (optional)',
'users' => 'Pipe-separated list of users to search for (optional)',
'ip' => array( 'Get all blocks applying to this IP or CIDR range, including range blocks.',
- 'Cannot be used together with bkusers. CIDR ranges broader than /16 are not accepted.' ),
+ 'Cannot be used together with bkusers. CIDR ranges broader than /16 are not accepted' ),
'limit' => 'The maximum amount of blocks to list',
'prop' => 'Which properties to get',
);
}
public function getDescription() {
- return 'List all blocked users and IP addresses.';
+ return 'List all blocked users and IP addresses';
}
public function getPossibleErrors() {
public function getParamDescription() {
return array(
- 'prop' => 'Which additional properties to get for each category.',
+ 'prop' => 'Which additional properties to get for each category',
'limit' => 'How many categories to return',
'show' => 'Which kind of categories to show',
'continue' => 'When more results are available, use this to continue',
public function getParamDescription() {
global $wgMiserMode;
+ $p = $this->getModulePrefix();
$desc = array(
'title' => 'Which category to enumerate (required). Must include Category: prefix',
'prop' => 'What pieces of information to include',
'namespace' => 'Only include pages in these namespaces',
'sort' => 'Property to sort by',
'dir' => 'In which direction to sort',
- 'start' => 'Timestamp to start listing from. Can only be used with cmsort=timestamp',
- 'end' => 'Timestamp to end listing at. Can only be used with cmsort=timestamp',
- 'startsortkey' => 'Sortkey to start listing from. Can only be used with cmsort=sortkey',
- 'endsortkey' => 'Sortkey to end listing at. Can only be used with cmsort=sortkey',
+ 'start' => "Timestamp to start listing from. Can only be used with {$p}sort=timestamp",
+ 'end' => "Timestamp to end listing at. Can only be used with {$p}sort=timestamp",
+ 'startsortkey' => "Sortkey to start listing from. Can only be used with {$p}sort=sortkey",
+ 'endsortkey' => "Sortkey to end listing at. Can only be used with {$p}sort=sortkey",
'continue' => 'For large categories, give the value retured from previous query',
'limit' => 'The maximum number of pages to return.',
);
$desc['namespace'] = array(
$desc['namespace'],
'NOTE: Due to $wgMiserMode, using this may result in fewer than "limit" results',
- 'returned before continuing; in extreme cases, zero results may be returned.',
+ 'returned before continuing; in extreme cases, zero results may be returned',
);
}
return $desc;
public function getParamDescription() {
return array(
- 'start' => 'The timestamp to start enumerating from. (1,2)',
- 'end' => 'The timestamp to stop enumerating at. (1,2)',
- 'dir' => 'The direction in which to enumerate. (1,2)',
+ 'start' => 'The timestamp to start enumerating from (1,2)',
+ 'end' => 'The timestamp to stop enumerating at (1,2)',
+ 'dir' => 'The direction in which to enumerate (1,2)',
'limit' => 'The maximum amount of revisions to list',
'prop' => 'Which properties to get',
'namespace' => 'Only list pages in this namespace (3)',
'2) List deleted contributions for the given user, sorted by timestamp (no titles specified)',
'3) List all deleted revisions in the given namespace, sorted by title and timestamp (no titles specified, druser not set)',
'Certain parameters only apply to some modes and are ignored in others.',
- 'For instance, a parameter marked (1) only applies to mode 1 and is ignored in modes 2 and 3.',
+ 'For instance, a parameter marked (1) only applies to mode 1 and is ignored in modes 2 and 3',
);
}
}
public function getDescription() {
- return 'List all files that are duplicates of the given file(s).';
+ return 'List all files that are duplicates of the given file(s)';
}
public function getPossibleErrors() {
}
public function getParamDescription() {
+ $p = $this->getModulePrefix();
return array(
'prop' => 'What pieces of information to include',
'offset' => 'Used for paging. Use the value returned for "continue"',
'protocol' => array(
- 'Protocol of the url. If empty and euquery set, the protocol is http.',
- 'Leave both this and euquery empty to list all external links'
+ "Protocol of the url. If empty and {$p}query set, the protocol is http.",
+ "Leave both this and {$p}query empty to list all external links"
),
'query' => 'Search string without protocol. See [[Special:LinkSearch]]. Leave empty to list all external links',
'namespace' => 'The page namespace(s) to enumerate.',
public function getParamDescription() {
return array(
- 'from' => 'The image title to start enumerating from.',
- 'prefix' => 'Search for all image titles that begin with this value.',
+ 'from' => 'The image title to start enumerating from',
+ 'prefix' => 'Search for all image titles that begin with this value',
'dir' => 'The direction in which to list',
'minsize' => 'Limit to images with at least this many bytes',
'maxsize' => 'Limit to images with at most this many bytes',
- 'limit' => 'How many total images to return.',
- 'sha1' => 'SHA1 hash of image. Overrides sha1base36',
+ 'limit' => 'How many total images to return',
+ 'sha1' => "SHA1 hash of image. Overrides {$this->getModulePrefix()}sha1base36",
'sha1base36' => 'SHA1 hash of image in base 36 (used in MediaWiki)',
'prop' => 'Which properties to get',
);
}
public function getParamDescription() {
+ $p = $this->getModulePrefix();
return array(
- 'prop' => 'What image information to get.',
+ 'prop' => 'What image information to get',
'limit' => 'How many image revisions to return',
'start' => 'Timestamp to start listing from',
'end' => 'Timestamp to stop listing at',
- 'urlwidth' => array( 'If iiprop=url is set, a URL to an image scaled to this width will be returned.',
- 'Only the current version of the image can be scaled.' ),
- 'urlheight' => 'Similar to iiurlwidth. Cannot be used without iiurlwidth',
+ 'urlwidth' => array( "If {$p}prop=url is set, a URL to an image scaled to this width will be returned.",
+ 'Only the current version of the image can be scaled' ),
+ 'urlheight' => "Similar to {$p}urlwidth. Cannot be used without {$p}urlwidth",
'continue' => 'When more results are available, use this to continue',
);
}
}
public function getParamDescription() {
+ $desc = $this->description;
return array(
- 'namespace' => "Show {$this->description}s in this namespace(s) only",
- 'limit' => "How many {$this->description}s to return",
+ 'namespace' => "Show {$desc}s in this namespace(s) only",
+ 'limit' => "How many {$desc}s to return",
'continue' => 'When more results are available, use this to continue',
);
}
'prop' => 'Which properties to get',
'type' => 'Filter log entries to only this type(s)',
'action' => "Filter log actions to only this type. Overrides {$this->getModulePrefix()}type",
- 'start' => 'The timestamp to start enumerating from.',
- 'end' => 'The timestamp to end enumerating.',
- 'dir' => 'In which direction to enumerate.',
- 'user' => 'Filter entries to those made by the given user.',
- 'title' => 'Filter entries to those related to a page.',
- 'limit' => 'How many total event entries to return.',
- 'tag' => 'Only list event entries tagged with this tag.',
+ 'start' => 'The timestamp to start enumerating from',
+ 'end' => 'The timestamp to end enumerating',
+ 'dir' => 'In which direction to enumerate',
+ 'user' => 'Filter entries to those made by the given user',
+ 'title' => 'Filter entries to those related to a page',
+ 'limit' => 'How many total event entries to return',
+ 'tag' => 'Only list event entries tagged with this tag',
);
}
public function getDescription() {
- return 'Get events from logs.';
+ return 'Get events from logs';
}
public function getPossibleErrors() {
'start' => 'Start listing at this protection timestamp',
'end' => 'Stop listing at this protection timestamp',
'dir' => 'The direction in which to list',
- 'limit' => 'How many total pages to return.',
+ 'limit' => 'How many total pages to return',
'prop' => 'Which properties to get',
'level' => 'Only list titles with these protection levels',
);
return array(
'Get a set of random pages',
'NOTE: Pages are listed in a fixed sequence, only the starting point is random. This means that if, for example, "Main Page" is the first ',
- ' random page on your list, "List of fictional monkeys" will *always* be second, "List of people on stamps of Vanuatu" third, etc.',
- 'NOTE: If the number of pages in the namespace is lower than rnlimit, you will get fewer pages. You will not get the same page twice.'
+ ' random page on your list, "List of fictional monkeys" will *always* be second, "List of people on stamps of Vanuatu" third, etc',
+ 'NOTE: If the number of pages in the namespace is lower than rnlimit, you will get fewer pages. You will not get the same page twice'
);
}
public function getParamDescription() {
return array(
- 'start' => 'The timestamp to start enumerating from.',
- 'end' => 'The timestamp to end enumerating.',
- 'dir' => 'In which direction to enumerate.',
+ 'start' => 'The timestamp to start enumerating from',
+ 'end' => 'The timestamp to end enumerating',
+ 'dir' => 'In which direction to enumerate',
'namespace' => 'Filter log entries to only this namespace(s)',
'user' => 'Only list changes by this user',
'excludeuser' => 'Don\'t list changes by this user',
'token' => 'Which tokens to obtain for each change',
'show' => array(
'Show only items that meet this criteria.',
- 'For example, to see only minor edits done by logged-in users, set show=minor|!anon'
+ "For example, to see only minor edits done by logged-in users, set {$this->getModulePrefix()}show=minor|!anon"
),
- 'type' => 'Which types of changes to show.',
- 'limit' => 'How many total changes to return.',
- 'tag' => 'Only list changes tagged with this tag.',
+ 'type' => 'Which types of changes to show',
+ 'limit' => 'How many total changes to return',
+ 'tag' => 'Only list changes tagged with this tag',
);
}
}
public function getParamDescription() {
+ $p = $this->getModulePrefix();
return array(
- 'prop' => 'Which properties to get for each revision.',
+ 'prop' => 'Which properties to get for each revision',
'limit' => 'Limit how many revisions will be returned (enum)',
'startid' => 'From which revision id to start enumeration (enum)',
'endid' => 'Stop revision enumeration on this revid (enum)',
'token' => 'Which tokens to obtain for each revision',
'continue' => 'When more results are available, use this to continue',
'diffto' => array( 'Revision ID to diff each revision to.',
- 'Use "prev", "next" and "cur" for the previous, next and current revision respectively.' ),
+ 'Use "prev", "next" and "cur" for the previous, next and current revision respectively' ),
'difftotext' => array( 'Text to diff each revision to. Only diffs a limited number of revisions.',
- 'Overrides diffto. If rvsection is set, only that section will be diffed against this text.' ),
+ "Overrides {$p}diffto. If {$p}section is set, only that section will be diffed against this text" ),
'tag' => 'Only list revisions tagged with this tag',
);
}
public function getDescription() {
return array(
- 'Get revision information.',
+ 'Get revision information',
'This module may be used in several ways:',
- ' 1) Get data about a set of pages (last revision), by setting titles or pageids parameter.',
- ' 2) Get revisions for one given page, by using titles/pageids with start/end/limit params.',
- ' 3) Get data about a set of revisions by setting their IDs with revids parameter.',
- 'All parameters marked as (enum) may only be used with a single page (#2).'
+ ' 1) Get data about a set of pages (last revision), by setting titles or pageids parameter',
+ ' 2) Get revisions for one given page, by using titles/pageids with start/end/limit params',
+ ' 3) Get data about a set of revisions by setting their IDs with revids parameter',
+ 'All parameters marked as (enum) may only be used with a single page (#2)'
);
}
public function getParamDescription() {
return array(
- 'search' => 'Search for all page titles (or content) that has this value.',
- 'namespace' => 'The namespace(s) to enumerate.',
- 'what' => 'Search inside the text or titles.',
- 'info' => 'What metadata to return.',
- 'prop' => 'What properties to return.',
- 'redirects' => 'Include redirect pages in the search.',
+ 'search' => 'Search for all page titles (or content) that has this value',
+ 'namespace' => 'The namespace(s) to enumerate',
+ 'what' => 'Search inside the text or titles',
+ 'info' => 'What metadata to return',
+ 'prop' => 'What properties to return',
+ 'redirects' => 'Include redirect pages in the search',
'offset' => 'Use this value to continue paging (return by query)',
- 'limit' => 'How many total pages to return.'
+ 'limit' => 'How many total pages to return'
);
}
}
public function getDescription() {
- return 'Return general information about the site.';
+ return 'Return general information about the site';
}
public function getPossibleErrors() {
}
public function getDescription() {
- return 'List change tags.';
+ return 'List change tags';
}
protected function getExamples() {
}
public function getParamDescription() {
+ $p = $this->getModulePrefix();
return array(
- 'limit' => 'The maximum number of contributions to return.',
- 'start' => 'The start timestamp to return from.',
- 'end' => 'The end timestamp to return to.',
- 'continue' => 'When more results are available, use this to continue.',
- 'user' => 'The user to retrieve contributions for.',
- 'userprefix' => 'Retrieve contibutions for all users whose names begin with this value. Overrides ucuser.',
- 'dir' => 'The direction to search (older or newer).',
+ 'limit' => 'The maximum number of contributions to return',
+ 'start' => 'The start timestamp to return from',
+ 'end' => 'The end timestamp to return to',
+ 'continue' => 'When more results are available, use this to continue',
+ 'user' => 'The user to retrieve contributions for',
+ 'userprefix' => "Retrieve contibutions for all users whose names begin with this value. Overrides {$p}user",
+ 'dir' => 'The direction to search (older or newer)',
'namespace' => 'Only list contributions in these namespaces',
'prop' => 'Include additional pieces of information',
- 'show' => array( 'Show only items that meet this criteria, e.g. non minor edits only: show=!minor',
- 'NOTE: if show=patrolled or show=!patrolled is set, revisions older than $wgRCMaxAge won\'t be shown', ),
+ 'show' => array( "Show only items that meet this criteria, e.g. non minor edits only: {$p}show=!minor",
+ "NOTE: if show=patrolled or {$p}show=!patrolled is set, revisions older than $wgRCMaxAge won\'t be shown", ),
'tag' => 'Only list revisions tagged with this tag',
);
}
public function getParamDescription() {
return array(
- 'allrev' => 'Include multiple revisions of the same page within given timeframe.',
- 'start' => 'The timestamp to start enumerating from.',
- 'end' => 'The timestamp to end enumerating.',
- 'namespace' => 'Filter changes to only the given namespace(s).',
+ 'allrev' => 'Include multiple revisions of the same page within given timeframe',
+ 'start' => 'The timestamp to start enumerating from',
+ 'end' => 'The timestamp to end enumerating',
+ 'namespace' => 'Filter changes to only the given namespace(s)',
'user' => 'Only list changes by this user',
'excludeuser' => 'Don\'t list changes by this user',
- 'dir' => 'In which direction to enumerate pages.',
- 'limit' => 'How many total results to return per request.',
+ 'dir' => 'In which direction to enumerate pages',
+ 'limit' => 'How many total results to return per request',
'prop' => 'Which additional items to get (non-generator mode only).',
'show' => array(
'Show only items that meet this criteria.',
- 'For example, to see only minor edits done by logged-in users, set show=minor|!anon'
+ "For example, to see only minor edits done by logged-in users, set {$this->getModulePrefix()}show=minor|!anon"
),
- 'owner' => "The name of the user whose watchlist you'd like to access",
- 'token' => "Give a security token (settable in preferences) to allow access to another user's watchlist"
+ 'owner' => 'The name of the user whose watchlist you\'d like to access',
+ 'token' => 'Give a security token (settable in preferences) to allow access to another user\'s watchlist'
);
}
public function getParamDescription() {
return array(
'continue' => 'When more results are available, use this to continue',
- 'namespace' => 'Only list pages in the given namespace(s).',
- 'limit' => 'How many total results to return per request.',
- 'prop' => 'Which additional properties to get (non-generator mode only).',
- 'show' => 'Only list items that meet these criteria.',
+ 'namespace' => 'Only list pages in the given namespace(s)',
+ 'limit' => 'How many total results to return per request',
+ 'prop' => 'Which additional properties to get (non-generator mode only)',
+ 'show' => 'Only list items that meet these criteria',
);
}
return array(
'title' => 'Title of the page you want to rollback.',
'user' => 'Name of the user whose edits are to be rolled back. If set incorrectly, you\'ll get a badtoken error.',
- 'token' => 'A rollback token previously retrieved through prop=revisions',
- 'summary' => 'Custom edit summary. If not set, default summary will be used.',
+ 'token' => "A rollback token previously retrieved through {$this->getModulePrefix()}prop=revisions",
+ 'summary' => 'Custom edit summary. If not set, default summary will be used',
'markbot' => 'Mark the reverted edits and the revert as bot edits',
'watchlist' => 'Unconditionally add or remove the page from your watchlist, use preferences or do not change watch',
);
public function getDescription() {
return array(
'Undo the last edit to the page. If the last user who edited the page made multiple edits in a row,',
- 'they will all be rolled back.'
+ 'they will all be rolled back'
);
}
}
public function getParamDescription() {
+ $p = $this->getModulePrefix();
return array(
- 'id' => 'ID of the block you want to unblock (obtained through list=blocks). Cannot be used together with user',
- 'user' => 'Username, IP address or IP range you want to unblock. Cannot be used together with id',
- 'token' => 'An unblock token previously obtained through the gettoken parameter or prop=info',
+ 'id' => "ID of the block you want to unblock (obtained through list=blocks). Cannot be used together with {$p}user",
+ 'user' => "Username, IP address or IP range you want to unblock. Cannot be used together with {$p}id",
+ 'token' => "An unblock token previously obtained through the gettoken parameter or {$p}prop=info",
'gettoken' => 'If set, an unblock token will be returned, and no other action will be taken',
'reason' => 'Reason for unblock (optional)',
);
public function getDescription() {
return array(
- 'Unblock a user.'
+ 'Unblock a user'
);
}
public function getParamDescription() {
return array(
- 'title' => 'Title of the page you want to restore.',
+ 'title' => 'Title of the page you want to restore',
'token' => 'An undelete token previously retrieved through list=deletedrevs',
'reason' => 'Reason for restoring (optional)',
'timestamps' => 'Timestamps of the revisions to restore. If not set, all revisions will be restored.',
'Note that the HTTP POST must be done as a file upload (i.e. using multipart/form-data) when',
'sending the "file". Note also that queries using session keys must be',
'done in the same login session as the query that originally returned the key (i.e. do not',
- 'log out and then log back in). Also you must get and send an edit token before doing any upload stuff.'
+ 'log out and then log back in). Also you must get and send an edit token before doing any upload stuff'
);
}
$this->getResult()->setIndexedTagName( $r['removed'], 'group' );
$this->getResult()->addValue( null, $this->getModuleName(), $r );
}
+
+ private function getUser() {
+ if ( $this->mUser !== null ) {
+ return $this->mUser;
+ }
+
+ $params = $this->extractRequestParams();
+ if ( is_null( $params['user'] ) ) {
+ $this->dieUsageMsg( array( 'missingparam', 'user' ) );
+ }
+
+ $form = new UserrightsPage;
+ $status = $form->fetchUser( $params['user'] );
+ if ( !$status->isOK() ) {
+ $errors = $status->getErrorsArray();
+ $this->dieUsageMsg( $errors[0] );
+ } else {
+ $user = $status->value;
+ }
+
+ $this->mUser = $user;
+ return $user;
+ }
public function mustBePosted() {
return true;
return $this->getUser()->getName();
}
- private function getUser() {
- if ( $this->mUser !== null ) {
- return $this->mUser;
- }
-
- $params = $this->extractRequestParams();
- if ( is_null( $params['user'] ) ) {
- $this->dieUsageMsg( array( 'missingparam', 'user' ) );
- }
-
- $form = new UserrightsPage;
- $status = $form->fetchUser( $params['user'] );
- if ( !$status->isOK() ) {
- $errors = $status->getErrorsArray();
- $this->dieUsageMsg( $errors[0] );
- } else {
- $user = $status->value;
- }
-
- $this->mUser = $user;
- return $user;
- }
-
protected function getExamples() {
return array(
'api.php?action=userrights&user=FooBot&add=bot&remove=sysop|bureaucrat&token=123ABC'