Deprecate addButton and insertTags in mediawiki.action.edit
authorumherirrender <umherirrender_de.wp@web.de>
Sat, 16 Nov 2013 09:45:46 +0000 (10:45 +0100)
committerumherirrender <umherirrender_de.wp@web.de>
Sat, 16 Nov 2013 09:45:46 +0000 (10:45 +0100)
In wikibits many global functions marked as deprecated,
does this also in mediawiki.action.edit.

Change-Id: I64fcb41bc7812ac1aebc75f4f866b4b07fb7dc8e

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 ba711aa..4639aee 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' );
 
        // Explose API publicly
        mw.toolbar = toolbar;