* (bug 27344) add drprefix param to list=deletedrevs
authorSam Reed <reedy@users.mediawiki.org>
Sat, 23 Apr 2011 16:03:40 +0000 (16:03 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Sat, 23 Apr 2011 16:03:40 +0000 (16:03 +0000)
RELEASE-NOTES
includes/api/ApiQueryDeletedrevs.php

index 28be438..56fa6fb 100644 (file)
@@ -347,6 +347,7 @@ PHP if you have not done so prior to upgrading MediaWiki.
 * (bug 28672) give information about misermode on api
 * (bug 28558) Add iw_api and iw_wikiid to meta=siteinfo&siprop=interwikimap
 * (bug 26882) Allow listing of indefinite protections with the api
+* (bug 27344) add drprefix param to list=deletedrevs
 
 === Languages updated in 1.18 ===
 
index c9775ef..7731154 100644 (file)
@@ -146,6 +146,10 @@ class ApiQueryDeletedrevs extends ApiQueryBase {
                        $from = is_null( $params['from'] ) ? null : $this->titleToKey( $params['from'] );
                        $to = is_null( $params['to'] ) ? null : $this->titleToKey( $params['to'] );
                        $this->addWhereRange( 'ar_title', $dir, $from, $to );
+
+                       if ( isset( $params['prefix'] ) ) {
+                               $this->addWhere( 'ar_title' . $db->buildLike( $this->titlePartToKey( $params['prefix'] ), $db->anyString() ) );
+                       }
                }
 
                if ( !is_null( $params['user'] ) ) {
@@ -282,6 +286,7 @@ class ApiQueryDeletedrevs extends ApiQueryBase {
                        ),
                        'from' => null,
                        'to' => null,
+                       'prefix' => null,
                        'continue' => null,
                        'unique' => false,
                        'user' => array(
@@ -327,6 +332,7 @@ class ApiQueryDeletedrevs extends ApiQueryBase {
                        'dir' => $this->getDirectionDescription( $this->getModulePrefix(), ' (1,2)' ),
                        'from' => 'Start listing at this title (3)',
                        'to' => 'Stop listing at this title (3)',
+                       'prefix' => 'Search for all page titles that begin with this value (3)',
                        'limit' => 'The maximum amount of revisions to list',
                        'prop' => array(
                                'Which properties to get',
@@ -350,12 +356,13 @@ class ApiQueryDeletedrevs extends ApiQueryBase {
        }
 
        public function getDescription() {
+               $p = $this->getModulePrefix();
                return array(
                        'List deleted revisions.',
                        'This module operates in three modes:',
                        '1) List deleted revisions for the given title(s), sorted by timestamp',
                        '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)',
+                       "3) List all deleted revisions in the given namespace, sorted by title and timestamp (no titles specified, {$p}user 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',
                );