* (bug 23473) - Give description of properties on all modules
authorSam Reed <reedy@users.mediawiki.org>
Wed, 23 Jun 2010 19:36:26 +0000 (19:36 +0000)
committerSam Reed <reedy@users.mediawiki.org>
Wed, 23 Jun 2010 19:36:26 +0000 (19:36 +0000)
Commit patch by John Du Hart with a few minor tweaks/fixes

22 files changed:
RELEASE-NOTES
includes/api/ApiParse.php
includes/api/ApiQueryAllCategories.php
includes/api/ApiQueryAllLinks.php
includes/api/ApiQueryAllUsers.php
includes/api/ApiQueryAllimages.php
includes/api/ApiQueryBlocks.php
includes/api/ApiQueryCategories.php
includes/api/ApiQueryCategoryMembers.php
includes/api/ApiQueryDeletedrevs.php
includes/api/ApiQueryExtLinksUsage.php
includes/api/ApiQueryFilearchive.php
includes/api/ApiQueryImageInfo.php
includes/api/ApiQueryLogEvents.php
includes/api/ApiQueryProtectedTitles.php
includes/api/ApiQueryRecentChanges.php
includes/api/ApiQueryRevisions.php
includes/api/ApiQuerySearch.php
includes/api/ApiQueryTags.php
includes/api/ApiQueryUserContributions.php
includes/api/ApiQueryWatchlist.php
includes/api/ApiQueryWatchlistRaw.php

index fa5b241..a1d3b20 100644 (file)
@@ -241,6 +241,7 @@ it from source control: http://www.mediawiki.org/wiki/Download_from_SVN
 * (bug 24016) API: Handle parameters specified in simple string syntax 
   ( 'paramname' => 'defaultval' ) correctly when outputting help
 * (bug 24089) Logevents causes PHP Notice if leprop=title isn't supplied
+* (bug 23473) - Give description of properties on all modules
 
 === Languages updated in 1.17 ===
 
index 91c4617..2f61c48 100644 (file)
@@ -62,7 +62,7 @@ class ApiParse extends ApiBase {
                // $title parameter in Parser::parse isn't enough *sigh*
                global $wgParser, $wgUser, $wgTitle, $wgEnableParserCache, $wgLang;
 
-               // Currently unncessary, code to act as a safeguard against any change in current behaviour of uselang breaks
+               // Currently unnecessary, code to act as a safeguard against any change in current behaviour of uselang breaks
                $oldLang = null;
                if ( isset( $params['uselang'] ) && $params['uselang'] != $wgLang->getCode() ) {
                        $oldLang = $wgLang; // Backup wgLang
@@ -412,14 +412,30 @@ class ApiParse extends ApiBase {
                        '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'
+                       'prop' => array(
+                               'Which pieces of information to get',
+                               ' text           - Gives the parsed text of the wikitext',
+                               ' langlinks      - Gives the langlinks the parsed wikitext',
+                               ' categories     - Gives the categories of the parsed wikitext',
+                               ' links          - Gives the internal links in the parsed wikitext',
+                               ' templates      - Gives the templates in the parsed wikitext',
+                               ' images         - Gives the images in the parsed wikitext',
+                               ' externallinks  - Gives the external links in the parsed wikitext',
+                               ' sections       - Gives the sections in the parsed wikitext',
+                               ' revid          - Adds the revision id of the parsed page',
+                               ' displaytitle   - Adds the title of the parsed wikitext',
+                               ' headitems      - Gives items to put in the <head> of the page',
+                               ' headhtml       - Gives parsed <head> of the page',
+                               ' iwlinks        - Gives interwiki links in the parsed wikitext',
+                               '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',
                        'section' => 'Only retrieve the content of this section number',
index d22a600..86c5eb9 100644 (file)
@@ -157,7 +157,11 @@ class ApiQueryAllCategories extends ApiQueryGeneratorBase {
                        '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',
+                       'prop' => array(
+                               'Which properties to get',
+                               ' size    - Adds number of pages in the category',
+                               ' hidden  - Tags categories that are hidden with __HIDDENCAT__',
+                       ),
                );
        }
 
index 2959b22..26336f2 100644 (file)
@@ -182,11 +182,16 @@ class ApiQueryAllLinks extends ApiQueryGeneratorBase {
        }
 
        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',
-                       'unique' => "Only show unique links. Cannot be used with generator or {$this->getModulePrefix()}prop=ids",
-                       'prop' => 'What pieces of information to include',
+                       'unique' => "Only show unique links. Cannot be used with generator or {p}prop=ids",
+                       'prop' => array(
+                               'What pieces of information to include',
+                               " ids    - Adds pageid of where the link is from (Cannot be used with {p}unique)",
+                               ' title  - Adds the title of the link',
+                       ),
                        'namespace' => 'The namespace to enumerate',
                        'limit' => 'How many total links to return',
                        'continue' => 'When more results are available, use this to continue',
index 8581b2a..3b2cdcf 100644 (file)
@@ -219,6 +219,10 @@ class ApiQueryAllUsers extends ApiQueryBase {
                        'group' => 'Limit users to a given group name',
                        'prop' => array(
                                'What pieces of information to include.',
+                               ' blockinfo     - Adds the information about a current block on the user',
+                               ' groups        - Lists groups that the user is in',
+                               ' editcount     - Adds the edit count of the user',
+                               ' registration  - Adds the timestamp of when the user registered',
                                '`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',
index 98b8274..3a5c427 100644 (file)
@@ -186,7 +186,20 @@ class ApiQueryAllimages extends ApiQueryGeneratorBase {
                        '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',
+                       'prop' => array(
+                               'Which properties to get',
+                               ' timestamp    - Adds the timestamp when the image was upload',
+                               ' user         - Adds the username of the last uploader',
+                               ' comment      - Adds the comment of the last upload',
+                               ' url          - Adds the URL of the image and its description page',
+                               ' size         - Adds the size of the image in bytes and its height and width',
+                               ' dimensions   - Alias of size',
+                               ' sha1         - Adds the sha1 of the image',
+                               ' mime         - Adds the MIME of the image',
+                               ' thumbmime    - Adds the MIME of the tumbnail for the image',
+                               ' archivename  - Adds the file name of the archive version for non-latest versions',
+                               ' bitdepth     - Adds the bit depth of the version',
+                       ),
                );
        }
 
index 45e3a0b..ca4f500 100644 (file)
@@ -271,7 +271,17 @@ class ApiQueryBlocks extends ApiQueryBase {
                        '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' ),
                        'limit' => 'The maximum amount of blocks to list',
-                       'prop' => 'Which properties to get',
+                       'prop' => array(
+                               'Which properties to get',
+                               ' id         - Adds the id of the block',
+                               ' user       - Adds the username of the blocked user',
+                               ' by         - Adds the username of the blocking admin',
+                               ' timestamp  - Adds the timestamp of when the block was given',
+                               ' expiry     - Adds the timestamp of when the block expires',
+                               ' reason     - Adds the reason given for the block',
+                               ' range      - Adds the range of IPs affected by the block',
+                               ' flags      - Tags the ban with (autoblock, anononly, etc)',
+                       ),
                );
        }
 
index 49eb6da..ea1e6e8 100644 (file)
@@ -209,7 +209,12 @@ class ApiQueryCategories extends ApiQueryGeneratorBase {
 
        public function getParamDescription() {
                return array(
-                       'prop' => 'Which additional properties to get for each category',
+                       'prop' => array(
+                               'Which additional properties to get for each category',
+                               ' sortkey    - Adds the sortkey for the category',
+                               ' timestamp  - Adds timestamp of when the category was added',
+                               ' hidden     - Tags categories that are hidden with __HIDDENCAT__',
+                       ),
                        'limit' => 'How many categories to return',
                        'show' => 'Which kind of categories to show',
                        'continue' => 'When more results are available, use this to continue',
index d361bf3..a092224 100644 (file)
@@ -260,7 +260,13 @@ class ApiQueryCategoryMembers extends ApiQueryGeneratorBase {
                $p = $this->getModulePrefix();
                $desc = array(
                        'title' => 'Which category to enumerate (required). Must include Category: prefix',
-                       'prop' => 'What pieces of information to include',
+                       'prop' => array(
+                               'What pieces of information to include',
+                               ' ids        - Adds the page id',
+                               ' title      - Adds the title and namespace id of the page',
+                               ' sortkey    - Adds the sortkey used for the category',
+                               ' timestamp  - Adds the timestamp of when the page was included',
+                       ),
                        'namespace' => 'Only include pages in these namespaces',
                        'sort' => 'Property to sort by',
                        'dir' => 'In which direction to sort',
index b14ccfe..1bc5517 100644 (file)
@@ -309,7 +309,17 @@ class ApiQueryDeletedrevs extends ApiQueryBase {
                        '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',
+                       'prop' => array(
+                               'Which properties to get',
+                               ' revid          - Adds the revision id of the deleted revision',
+                               ' user           - Adds user who made the revision',
+                               ' comment        - Adds the comment of the revision',
+                               ' parsedcomment  - Adds the parsed comment of the revision',
+                               ' minor          - Tags if the revision is minor',
+                               ' len            - Adds the length of the revision',
+                               ' content        - Adds the content of the revision',
+                               ' token          - Gives the edit token',
+                       ),
                        'namespace' => 'Only list pages in this namespace (3)',
                        'user' => 'Only list revisions by this user',
                        'excludeuser' => 'Don\'t list revisions by this user',
index 2c1a62c..31e7bc7 100644 (file)
@@ -190,7 +190,12 @@ class ApiQueryExtLinksUsage extends ApiQueryGeneratorBase {
        public function getParamDescription() {
                $p = $this->getModulePrefix();
                return array(
-                       'prop' => 'What pieces of information to include',
+                       'prop' => array(
+                               'What pieces of information to include',
+                               ' ids    - Adds the id of page',
+                               ' title  - Adds the title and namespace id of the page',
+                               ' url    - Adds the URL used in the page',
+                       ),
                        'offset' => 'Used for paging. Use the value returned for "continue"',
                        'protocol' => array(
                                "Protocol of the url. If empty and {$p}query set, the protocol is http.",
index 8fb3d9c..dfacecd 100644 (file)
@@ -224,7 +224,18 @@ class ApiQueryFilearchive extends ApiQueryBase {
                        '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',
+                       'prop' => array(
+                               'What image information to get:',
+                               ' sha1         - Adds sha1 hash for the image',
+                               ' timestamp    - Adds timestamp for the uploaded version',
+                               ' user         - Adds user for uploaded the image version',
+                               ' size         - Adds the size of the image in bytes',
+                               ' dimensions   - Adds the height and width of the image',
+                               ' description  - Adds description the image version',
+                               ' mime         - Adds MIME of the image',
+                               ' metadata     - Lists EXIF metadata for the version of the image',
+                               ' bitdepth     - Adds the bit depth of the version',
+            ),
                );
        }
 
index bf7309f..ac24d98 100644 (file)
@@ -334,7 +334,21 @@ class ApiQueryImageInfo extends ApiQueryBase {
        public function getParamDescription() {
                $p = $this->getModulePrefix();
                return array(
-                       'prop' => 'What image information to get',
+                       'prop' => array(
+                               'What image information to get:',
+                               ' timestamp    - Adds timestamp for the uploaded version',
+                               ' user         - Adds user for uploaded the image version',
+                               ' comment      - Comment on the version',
+                               ' url          - Gives URL to the image and the description page',
+                               ' size         - Adds the size of the image in bytes and the height and width',
+                               ' dimensions   - Alias for size',
+                               ' sha1         - Adds sha1 hash for the image',
+                               ' mime         - Adds MIME of the image',
+                               ' thumbmime    - Adss MIME of the image thumbnail (requires url)',
+                               ' metadata     - Lists EXIF metadata for the version of the image',
+                               ' archivename  - Adds the file name of the archive version for non-latest versions',
+                               ' bitdepth     - Adds the bit depth of the version',
+            ),
                        'limit' => 'How many image revisions to return',
                        'start' => 'Timestamp to start listing from',
                        'end' => 'Timestamp to stop listing at',
index 1786b01..82d8c02 100644 (file)
@@ -354,7 +354,18 @@ class ApiQueryLogEvents extends ApiQueryBase {
 
        public function getParamDescription() {
                return array(
-                       'prop' => 'Which properties to get',
+                       'prop' => array(
+                               'Which properties to get',
+                               ' ids            - Adds the id of the log event',
+                               ' title          - Adds the title of the page for the log event',
+                               ' type           - Adds the type of log event',
+                               ' user           - Adds the user responsible for the log event',
+                               ' timestamp      - Adds the timestamp for the event',
+                               ' comment        - Adds the comment of the event',
+                               ' parsedcomment  - Adds the parsed comment of the event',
+                               ' details        - Lists addtional details about the event',
+                               ' tags           - Lists tags for the event',
+                       ),
                        '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',
index f1f69a5..e3cac1b 100644 (file)
@@ -184,7 +184,15 @@ class ApiQueryProtectedTitles extends ApiQueryGeneratorBase {
                        'end' => 'Stop listing at this protection timestamp',
                        'dir' => 'The direction in which to list',
                        'limit' => 'How many total pages to return',
-                       'prop' => 'Which properties to get',
+                       'prop' => array(
+                               'Which properties to get',
+                               ' timestamp      - Adds the timestamp of when protection was added',
+                               ' user           - Adds the user to add the protection',
+                               ' comment        - Adds the comment for the protection',
+                               ' parsedcomment  - Adds the parsed comment for the protection',
+                               ' expiry         - Adds the timestamp of when the protection will be lifted',
+                               ' level          - Adds the protection level',
+                       ),
                        'level' => 'Only list titles with these protection levels',
                );
        }
index 797ca89..d238882 100644 (file)
@@ -534,7 +534,21 @@ class ApiQueryRecentChanges extends ApiQueryBase {
                        'namespace' => 'Filter log entries to only this namespace(s)',
                        'user' => 'Only list changes by this user',
                        'excludeuser' => 'Don\'t list changes by this user',
-                       'prop' => 'Include additional pieces of information',
+                       'prop' => array(
+                               'Include additional pieces of information',
+                               ' user           - Adds the user responsible for the edit and tags if they are an IP',
+                               ' comment        - Adds the comment for the edit',
+                               ' parsedcomment  - Adds the parsed comment for the edit',
+                               ' flags          - Adds flags for the edit',
+                               ' timestamp      - Adds timestamp of the edit',
+                               ' title          - Adds the page title of the edit',
+                               ' ids            - Adds the page id, recent changes id and the new and old revision id',
+                               ' sizes          - Adds the new and old page length in bytes',
+                               ' redirect       - Tags edit if page is a redirect',
+                               ' patrolled      - Tags edits have have been patrolled',
+                               ' loginfo        - Adds log information (logid, logtype, etc) to log entries',
+                               ' tags           - Lists tags for the entry',
+                       ),
                        'token' => 'Which tokens to obtain for each change',
                        'show' => array(
                                'Show only items that meet this criteria.',
index c2e93f5..7cf1cb3 100644 (file)
@@ -548,7 +548,18 @@ class ApiQueryRevisions extends ApiQueryBase {
        public function getParamDescription() {
                $p = $this->getModulePrefix();
                return array(
-                       'prop' => 'Which properties to get for each revision',
+                       'prop' => array(
+                               'Which properties to get for each revision:',
+                               ' ids            - The ID of the revision',
+                               ' flags          - Revision flags (minor)',
+                               ' timestamp      - The timestamp of the revision',
+                               ' user           - Gives user to make the revision',
+                               ' size           - Length of the revision',
+                               ' comment        - Comment by the user for revision',
+                               ' parsedcomment  - Parsed comment by the user for the revision',
+                               ' content        - Text of the revision',
+                               ' tags           - Tags for the 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)',
index c74ee7b..eb38b82 100644 (file)
@@ -213,7 +213,13 @@ class ApiQuerySearch extends ApiQueryGeneratorBase {
                        'namespace' => 'The namespace(s) to enumerate',
                        'what' => 'Search inside the text or titles',
                        'info' => 'What metadata to return',
-                       'prop' => 'What properties to return',
+                       'prop' => array(
+                               'What properties to return',
+                               ' size    - Adds the size of the page in bytes',
+                               ' wordcount  - Adds the word count of the page',
+                               ' timestamp  - Adds the timestamp of when the page was last edited',
+                               ' snippet    - Adds a parsed snippet of the page',
+                       ),
                        'redirects' => 'Include redirect pages in the search',
                        'offset' => 'Use this value to continue paging (return by query)',
                        'limit' => 'How many total pages to return'
index 51a4948..1c64ebc 100644 (file)
@@ -161,7 +161,13 @@ class ApiQueryTags extends ApiQueryBase {
                return array(
                        'continue' => 'When more results are available, use this to continue',
                        'limit' => 'The maximum number of tags to list',
-                       'prop' => 'Which properties to get',
+                       'prop' => array(
+                               'Which properties to get',
+                               ' name         - Adds name of tag',
+                               ' displayname  - Adds system messsage for the tag',
+                               ' description  - Adds description of the tag',
+                               ' hitcount     - Adds the amount of revisions that have this tag',
+                       ),
                );
        }
 
index f200c8b..a974a31 100644 (file)
@@ -418,7 +418,18 @@ class ApiQueryContributions extends ApiQueryBase {
                        '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',
+                       'prop' => array(
+                               'Include additional pieces of information',
+                               ' ids            - Adds the page id and revision id',
+                               ' title          - Adds the title and namespace id of the page',
+                               ' timestamp      - Adds the timestamp of the edit',
+                               ' comment        - Adds the comment of the edit',
+                               ' parsedcomment  - Adds the parsed comment of the edit',
+                               ' size           - Adds the size of the page',
+                               ' flags          - Adds flags of the edit',
+                               ' patrolled      - Tags patrolled edits',
+                               ' tags           - Lists tags for the edit',
+                       ),
                        'show' => array( "Show only items that meet this criteria, e.g. non minor edits only: {$p}show=!minor",
                                        "NOTE: if {$p}show=patrolled or {$p}show=!patrolled is set, revisions older than $wgRCMaxAge won\'t be shown", ),
                        'tag' => 'Only list revisions tagged with this tag',
index b027cd9..f92407e 100644 (file)
@@ -356,7 +356,19 @@ class ApiQueryWatchlist extends ApiQueryGeneratorBase {
                        'excludeuser' => 'Don\'t list changes by this user',
                        '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).',
+                       'prop' => array(
+                               'Which additional items to get (non-generator mode only).',
+                               ' ids                    - Adds revision ids and page ids',
+                               ' title                  - Adds title of the page',
+                               ' flags                  - Adds flags for the edit',
+                               ' user                   - Adds user who made the edit',
+                               ' comment                - Adds comment of the edit',
+                               ' parsedcomment          - Adds parsed comment of the edit',
+                               ' timestamp              - Adds timestamp of the edit',
+                               ' patrol                 - Tags edits that are patrolled',
+                               ' size                   - Adds the old and new lengths of the page',
+                               ' notificationtimestamp  - Adds timestamp of when the user was last notified about the edit',
+                       ),
                        '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"
index 3354cc4..0a916df 100644 (file)
@@ -170,7 +170,10 @@ class ApiQueryWatchlistRaw extends ApiQueryGeneratorBase {
                        '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)',
+                       'prop' => array(
+                               'Which additional properties to get (non-generator mode only)',
+                               ' changed  - Adds timestamp of when the user was last notified about the edit',
+                       ),
                        'show' => 'Only list items that meet these criteria',
                        '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',