Merge "mediawiki.api.category: Deprecate getCategories() 'async' parameter"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Fri, 28 Mar 2014 22:38:26 +0000 (22:38 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Fri, 28 Mar 2014 22:38:26 +0000 (22:38 +0000)
RELEASE-NOTES-1.23
resources/mediawiki.api/mediawiki.api.category.js

index cea7f69..ff7b5f9 100644 (file)
@@ -318,6 +318,7 @@ changes to languages because of Bugzilla reports.
   parser, where it differs from the PHP parser).
 * Special:Search no longer has an "include redirects" option on the advanced
   tab. Redirects are now included in all searches.
+* mediawiki.api.category's getCategories() 'async' parameter was deprecated.
 
 ==== Removed classes ====
 * FakeMemCachedClient (deprecated in 1.18)
index 7435e04..a90617d 100644 (file)
@@ -21,7 +21,6 @@
                                titles: String( title )
                        } );
 
-                       // Backwards compatibility (< MW 1.20)
                        if ( ok || err ) {
                                mw.track( 'mw.deprecate', 'api.cbParam' );
                                mw.log.warn( msg );
@@ -64,7 +63,6 @@
                                apnamespace: mw.config.get( 'wgNamespaceIds' ).category
                        } );
 
-                       // Backwards compatibility (< MW 1.20)
                        if ( ok || err ) {
                                mw.track( 'mw.deprecate', 'api.cbParam' );
                                mw.log.warn( msg );
@@ -91,7 +89,7 @@
                 * @param {mw.Title|string} title
                 * @param {Function} [ok] Success callback (deprecated)
                 * @param {Function} [err] Error callback (deprecated)
-                * @param {boolean} [async=true] Asynchronousness
+                * @param {boolean} [async=true] Asynchronousness (deprecated)
                 * @return {jQuery.Promise}
                 * @return {Function} return.done
                 * @return {boolean|mw.Title[]} return.done.categories List of category titles or false
                                async: async === undefined ? true : async
                        } );
 
-                       // Backwards compatibility (< MW 1.20)
                        if ( ok || err ) {
                                mw.track( 'mw.deprecate', 'api.cbParam' );
                                mw.log.warn( msg );
                        }
+                       if ( async !== undefined ) {
+                               mw.track( 'mw.deprecate', 'api.async' );
+                               mw.log.warn(
+                                       'Use of mediawiki.api async=false param is deprecated. ' +
+                                       'The sychronous mode will be removed in the future.'
+                               );
+                       }
 
                        return apiPromise
                                .then( function ( data ) {