From: umherirrender Date: Sat, 16 Nov 2013 09:45:46 +0000 (+0100) Subject: Deprecate addButton and insertTags in mediawiki.action.edit X-Git-Tag: 1.31.0-rc.0~18103^2 X-Git-Url: https://git.cyclocoop.org/%242?a=commitdiff_plain;h=dc3a235a77403173fe2c5c1df39a5bf1d20b95ef;p=lhc%2Fweb%2Fwiklou.git Deprecate addButton and insertTags in mediawiki.action.edit In wikibits many global functions marked as deprecated, does this also in mediawiki.action.edit. Change-Id: I64fcb41bc7812ac1aebc75f4f866b4b07fb7dc8e --- diff --git a/RELEASE-NOTES-1.23 b/RELEASE-NOTES-1.23 index 8ef5acdb33..d7c252a2db 100644 --- a/RELEASE-NOTES-1.23 +++ b/RELEASE-NOTES-1.23 @@ -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 == diff --git a/resources/mediawiki.action/mediawiki.action.edit.js b/resources/mediawiki.action/mediawiki.action.edit.js index ba711aae0c..4639aeef1f 100644 --- a/resources/mediawiki.action/mediawiki.action.edit.js +++ b/resources/mediawiki.action/mediawiki.action.edit.js @@ -130,8 +130,8 @@ }; // 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;