Bartosz Dziewoński has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/118731

Change subject: mediawiki.api: Documentation and typo cleanup
......................................................................

mediawiki.api: Documentation and typo cleanup

Also changed some whitespace.

Change-Id: I307c516f41258c06c0bff4ddb8dc9c1aaca44462
---
M resources/mediawiki.api/mediawiki.api.category.js
M resources/mediawiki.api/mediawiki.api.parse.js
M resources/mediawiki.api/mediawiki.api.watch.js
3 files changed, 9 insertions(+), 9 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/31/118731/1

diff --git a/resources/mediawiki.api/mediawiki.api.category.js 
b/resources/mediawiki.api/mediawiki.api.category.js
index c947cd6..2f717ea 100644
--- a/resources/mediawiki.api/mediawiki.api.category.js
+++ b/resources/mediawiki.api/mediawiki.api.category.js
@@ -7,7 +7,8 @@
        $.extend( mw.Api.prototype, {
                /**
                 * Determine if a category exists.
-                * @param {mw.Title} title
+                *
+                * @param {mw.Title|string} title
                 * @param {Function} [ok] Success callback (deprecated)
                 * @param {Function} [err] Error callback (deprecated)
                 * @return {jQuery.Promise}
@@ -46,7 +47,7 @@
                /**
                 * Get a list of categories that match a certain prefix.
                 *
-                * E.g. given "Foo", return "Food", "Foolish people", "Foosball 
tables" ...
+                * E.g. given "Foo", return "Food", "Foolish people", "Foosball 
tables"...
                 *
                 * @param {string} prefix Prefix to match.
                 * @param {Function} [ok] Success callback (deprecated)
@@ -56,6 +57,7 @@
                 * @return {string[]} return.done.categories Matched categories
                 */
                getCategoriesByPrefix: function ( prefix, ok, err ) {
+                       // Fetch with allpages to only get categories that have 
a corresponding description page.
                        var apiPromise = this.get( {
                                list: 'allpages',
                                apprefix: prefix,
@@ -68,7 +70,6 @@
                                mw.log.warn( msg );
                        }
 
-                       // Fetch with allpages to only get categories that have 
a corresponding description page.
                        return apiPromise
                                .then( function ( data ) {
                                        var texts = [];
@@ -84,9 +85,9 @@
                                .promise( { abort: apiPromise.abort } );
                },
 
-
                /**
-                * Get the categories that a particular page on the wiki 
belongs to
+                * Get the categories that a particular page on the wiki 
belongs to.
+                *
                 * @param {mw.Title} title
                 * @param {Function} [ok] Success callback (deprecated)
                 * @param {Function} [err] Error callback (deprecated)
@@ -131,7 +132,6 @@
                                .fail( err )
                                .promise( { abort: apiPromise.abort } );
                }
-
        } );
 
        /**
diff --git a/resources/mediawiki.api/mediawiki.api.parse.js 
b/resources/mediawiki.api/mediawiki.api.parse.js
index 952dea4..b1f1d2b 100644
--- a/resources/mediawiki.api/mediawiki.api.parse.js
+++ b/resources/mediawiki.api/mediawiki.api.parse.js
@@ -5,7 +5,7 @@
 
        $.extend( mw.Api.prototype, {
                /**
-                * Convinience method for 'action=parse'.
+                * Convenience method for 'action=parse'.
                 *
                 * @param {string} wikitext
                 * @param {Function} [ok] Success callback (deprecated)
diff --git a/resources/mediawiki.api/mediawiki.api.watch.js 
b/resources/mediawiki.api/mediawiki.api.watch.js
index ef333cd..aa33d86 100644
--- a/resources/mediawiki.api/mediawiki.api.watch.js
+++ b/resources/mediawiki.api/mediawiki.api.watch.js
@@ -24,7 +24,7 @@
         */
        function doWatchInternal( pages, ok, err, addParams ) {
                // XXX: Parameter addParams is undocumented because we inherit 
this
-               // documentation in the public method..
+               // documentation in the public method...
                var apiPromise = this.post(
                        $.extend(
                                {
@@ -37,6 +37,7 @@
                        )
                );
 
+               // Backwards compatibility (< MW 1.20)
                if ( ok || err ) {
                        mw.track( 'mw.deprecate', 'api.cbParam' );
                        mw.log.warn( 'Use of mediawiki.api callback params is 
deprecated. Use the Promise instead.' );
@@ -69,7 +70,6 @@
                unwatch: function ( pages, ok, err ) {
                        return doWatchInternal.call( this, pages, ok, err, { 
unwatch: 1 } );
                }
-
        } );
 
        /**

-- 
To view, visit https://gerrit.wikimedia.org/r/118731
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I307c516f41258c06c0bff4ddb8dc9c1aaca44462
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz Dziewoński <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to