Index: trunk/phase3/includes/api/ApiQueryRecentChanges.php |
— | — | @@ -582,10 +582,11 @@ |
583 | 583 | } |
584 | 584 | |
585 | 585 | public function getParamDescription() { |
| 586 | + $p = $this->getModulePrefix(); |
586 | 587 | return array( |
587 | 588 | 'start' => 'The timestamp to start enumerating from', |
588 | 589 | 'end' => 'The timestamp to end enumerating', |
589 | | - 'dir' => 'In which direction to enumerate', |
| 590 | + 'dir' => $this->getDirectionDescription( $p ), |
590 | 591 | 'namespace' => 'Filter log entries to only this namespace(s)', |
591 | 592 | 'user' => 'Only list changes by this user', |
592 | 593 | 'excludeuser' => 'Don\'t list changes by this user', |
— | — | @@ -608,7 +609,7 @@ |
609 | 610 | 'token' => 'Which tokens to obtain for each change', |
610 | 611 | 'show' => array( |
611 | 612 | 'Show only items that meet this criteria.', |
612 | | - "For example, to see only minor edits done by logged-in users, set {$this->getModulePrefix()}show=minor|!anon" |
| 613 | + "For example, to see only minor edits done by logged-in users, set {$p}show=minor|!anon" |
613 | 614 | ), |
614 | 615 | 'type' => 'Which types of changes to show', |
615 | 616 | 'limit' => 'How many total changes to return', |
Index: trunk/phase3/includes/api/ApiQueryDeletedrevs.php |
— | — | @@ -314,7 +314,7 @@ |
315 | 315 | return array( |
316 | 316 | 'start' => 'The timestamp to start enumerating from (1,2)', |
317 | 317 | 'end' => 'The timestamp to stop enumerating at (1,2)', |
318 | | - 'dir' => 'The direction in which to enumerate (1,2)', |
| 318 | + 'dir' => $this->getDirectionDescription( $this->getModulePrefix(), ' (1,2)' ), |
319 | 319 | 'limit' => 'The maximum amount of revisions to list', |
320 | 320 | 'prop' => array( |
321 | 321 | 'Which properties to get', |
Index: trunk/phase3/includes/api/ApiQueryBase.php |
— | — | @@ -440,6 +440,14 @@ |
441 | 441 | return substr( $this->keyToTitle( $keyPart . 'x' ), 0, - 1 ); |
442 | 442 | } |
443 | 443 | |
| 444 | + public function getDirectionDescription( $p = '', $extraDirText = '' ) { |
| 445 | + return array( |
| 446 | + "In which direction to enumerate{$extraDirText}", |
| 447 | + " newer - List oldest first. Note: {$p}start has to be before {$p}end.", |
| 448 | + " older - List newest first (default). Note: {$p}start has to be later than {$p}end.", |
| 449 | + ); |
| 450 | + } |
| 451 | + |
444 | 452 | /** |
445 | 453 | * @param $query String |
446 | 454 | * @param $protocol String |
Index: trunk/phase3/includes/api/ApiQueryBlocks.php |
— | — | @@ -278,7 +278,7 @@ |
279 | 279 | return array( |
280 | 280 | 'start' => 'The timestamp to start enumerating from', |
281 | 281 | 'end' => 'The timestamp to stop enumerating at', |
282 | | - 'dir' => 'The direction in which to enumerate', |
| 282 | + 'dir' => $this->getDirectionDescription( $this->getModulePrefix() ), |
283 | 283 | 'ids' => 'Pipe-separated list of block IDs to list (optional)', |
284 | 284 | 'users' => 'Pipe-separated list of users to search for (optional)', |
285 | 285 | 'ip' => array( 'Get all blocks applying to this IP or CIDR range, including range blocks.', |
Index: trunk/phase3/includes/api/ApiQueryLogEvents.php |
— | — | @@ -402,7 +402,7 @@ |
403 | 403 | 'action' => "Filter log actions to only this type. Overrides {$this->getModulePrefix()}type", |
404 | 404 | 'start' => 'The timestamp to start enumerating from', |
405 | 405 | 'end' => 'The timestamp to end enumerating', |
406 | | - 'dir' => 'In which direction to enumerate', |
| 406 | + 'dir' => $this->getDirectionDescription( $p ), |
407 | 407 | 'user' => 'Filter entries to those made by the given user', |
408 | 408 | 'title' => 'Filter entries to those related to a page', |
409 | 409 | 'limit' => 'How many total event entries to return', |
Index: trunk/phase3/includes/api/ApiQueryProtectedTitles.php |
— | — | @@ -203,7 +203,7 @@ |
204 | 204 | 'namespace' => 'Only list titles in these namespaces', |
205 | 205 | 'start' => 'Start listing at this protection timestamp', |
206 | 206 | 'end' => 'Stop listing at this protection timestamp', |
207 | | - 'dir' => 'The direction in which to list', |
| 207 | + 'dir' => $this->getDirectionDescription( $this->getModulePrefix() ), |
208 | 208 | 'limit' => 'How many total pages to return', |
209 | 209 | 'prop' => array( |
210 | 210 | 'Which properties to get', |
Index: trunk/phase3/includes/api/ApiQueryWatchlist.php |
— | — | @@ -364,6 +364,7 @@ |
365 | 365 | } |
366 | 366 | |
367 | 367 | public function getParamDescription() { |
| 368 | + $p = $this->getModulePrefix(); |
368 | 369 | return array( |
369 | 370 | 'allrev' => 'Include multiple revisions of the same page within given timeframe', |
370 | 371 | 'start' => 'The timestamp to start enumerating from', |
— | — | @@ -371,7 +372,7 @@ |
372 | 373 | 'namespace' => 'Filter changes to only the given namespace(s)', |
373 | 374 | 'user' => 'Only list changes by this user', |
374 | 375 | 'excludeuser' => 'Don\'t list changes by this user', |
375 | | - 'dir' => 'In which direction to enumerate pages', |
| 376 | + 'dir' => $this->getDirectionDescription( $p ), |
376 | 377 | 'limit' => 'How many total results to return per request', |
377 | 378 | 'prop' => array( |
378 | 379 | 'Which additional items to get (non-generator mode only).', |
— | — | @@ -389,7 +390,7 @@ |
390 | 391 | ), |
391 | 392 | 'show' => array( |
392 | 393 | 'Show only items that meet this criteria.', |
393 | | - "For example, to see only minor edits done by logged-in users, set {$this->getModulePrefix()}show=minor|!anon" |
| 394 | + "For example, to see only minor edits done by logged-in users, set {$p}show=minor|!anon" |
394 | 395 | ), |
395 | 396 | 'owner' => 'The name of the user whose watchlist you\'d like to access', |
396 | 397 | 'token' => 'Give a security token (settable in preferences) to allow access to another user\'s watchlist' |
Index: trunk/phase3/includes/api/ApiQueryRevisions.php |
— | — | @@ -614,7 +614,7 @@ |
615 | 615 | 'endid' => 'Stop revision enumeration on this revid (enum)', |
616 | 616 | 'start' => 'From which revision timestamp to start enumeration (enum)', |
617 | 617 | 'end' => 'Enumerate up to this timestamp (enum)', |
618 | | - 'dir' => 'Direction of enumeration - towards "newer" or "older" revisions (enum)', |
| 618 | + 'dir' => $this->getDirectionDescription( $p ), |
619 | 619 | 'user' => 'Only include revisions made by user', |
620 | 620 | 'excludeuser' => 'Exclude revisions made by user', |
621 | 621 | 'expandtemplates' => 'Expand templates in revision content', |
Index: trunk/phase3/includes/api/ApiQueryUserContributions.php |
— | — | @@ -422,7 +422,7 @@ |
423 | 423 | 'continue' => 'When more results are available, use this to continue', |
424 | 424 | 'user' => 'The users to retrieve contributions for', |
425 | 425 | 'userprefix' => "Retrieve contibutions for all users whose names begin with this value. Overrides {$p}user", |
426 | | - 'dir' => 'The direction to search (older or newer)', |
| 426 | + 'dir' => $this->getDirectionDescription( $p ), |
427 | 427 | 'namespace' => 'Only list contributions in these namespaces', |
428 | 428 | 'prop' => array( |
429 | 429 | 'Include additional pieces of information', |