return substr( $this->keyToTitle( $keyPart . 'x' ), 0, - 1 );
}
+ public function getDirectionDescription( $p = '', $extraDirText = '' ) {
+ return array(
+ "In which direction to enumerate{$extraDirText}",
+ " newer - List oldest first. Note: {$p}start has to be before {$p}end.",
+ " older - List newest first (default). Note: {$p}start has to be later than {$p}end.",
+ );
+ }
+
/**
* @param $query String
* @param $protocol String
return array(
'start' => 'The timestamp to start enumerating from',
'end' => 'The timestamp to stop enumerating at',
- 'dir' => 'The direction in which to enumerate',
+ 'dir' => $this->getDirectionDescription( $this->getModulePrefix() ),
'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.',
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)',
+ 'dir' => $this->getDirectionDescription( $this->getModulePrefix(), ' (1,2)' ),
'limit' => 'The maximum amount of revisions to list',
'prop' => array(
'Which properties to get',
'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',
+ 'dir' => $this->getDirectionDescription( $p ),
'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',
'namespace' => 'Only list titles in these namespaces',
'start' => 'Start listing at this protection timestamp',
'end' => 'Stop listing at this protection timestamp',
- 'dir' => 'The direction in which to list',
+ 'dir' => $this->getDirectionDescription( $this->getModulePrefix() ),
'limit' => 'How many total pages to return',
'prop' => array(
'Which properties to get',
}
public function getParamDescription() {
+ $p = $this->getModulePrefix();
return array(
'start' => 'The timestamp to start enumerating from',
'end' => 'The timestamp to end enumerating',
- 'dir' => 'In which direction to enumerate',
+ 'dir' => $this->getDirectionDescription( $p ),
'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 {$this->getModulePrefix()}show=minor|!anon"
+ "For example, to see only minor edits done by logged-in users, set {$p}show=minor|!anon"
),
'type' => 'Which types of changes to show',
'limit' => 'How many total changes to return',
'endid' => 'Stop revision enumeration on this revid (enum)',
'start' => 'From which revision timestamp to start enumeration (enum)',
'end' => 'Enumerate up to this timestamp (enum)',
- 'dir' => 'Direction of enumeration - towards "newer" or "older" revisions (enum)',
+ 'dir' => $this->getDirectionDescription( $p ),
'user' => 'Only include revisions made by user',
'excludeuser' => 'Exclude revisions made by user',
'expandtemplates' => 'Expand templates in revision content',
'continue' => 'When more results are available, use this to continue',
'user' => 'The users 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)',
+ 'dir' => $this->getDirectionDescription( $p ),
'namespace' => 'Only list contributions in these namespaces',
'prop' => array(
'Include additional pieces of information',
}
public function getParamDescription() {
+ $p = $this->getModulePrefix();
return array(
'allrev' => 'Include multiple revisions of the same page within given timeframe',
'start' => 'The timestamp to start enumerating from',
'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',
+ 'dir' => $this->getDirectionDescription( $p ),
'limit' => 'How many total results to return per request',
'prop' => array(
'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 {$this->getModulePrefix()}show=minor|!anon"
+ "For example, to see only minor edits done by logged-in users, set {$p}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'