Merge "Deprecate addButton and insertTags in mediawiki.action.edit"
authorjenkins-bot <jenkins-bot@gerrit.wikimedia.org>
Sat, 16 Nov 2013 11:56:58 +0000 (11:56 +0000)
committerGerrit Code Review <gerrit@wikimedia.org>
Sat, 16 Nov 2013 11:56:58 +0000 (11:56 +0000)
RELEASE-NOTES-1.23
resources/mediawiki.action/mediawiki.action.edit.js

index 8ef5acd..d7c252a 100644 (file)
@@ -73,6 +73,8 @@ changes to languages because of Bugzilla reports.
 ** The rc_type field of recentchanges will be deprecated in a future point
    release.
 * The global variable $wgArticle has been removed after a lengthy deprecation.
+* The global functions addButton and insertTags (for mw.toolbar.addButton and
+  mw.toolbar.insertTags) now emits mw.log.warn when accessed.
 
 == Compatibility ==
 
index ec923dd..299fabd 100644 (file)
        };
 
        // Legacy (for compatibility with the code previously in skins/common.edit.js)
-       window.addButton = toolbar.addButton;
-       window.insertTags = toolbar.insertTags;
+       mw.log.deprecate( window, 'addButton', toolbar.addButton, 'Use mw.toolbar.addButton instead' );
+       mw.log.deprecate( window, 'insertTags', toolbar.insertTags, 'Use mw.toolbar.insertTags instead' );
 
        // Expose API publicly
        mw.toolbar = toolbar;