From dc3a235a77403173fe2c5c1df39a5bf1d20b95ef Mon Sep 17 00:00:00 2001 From: umherirrender Date: Sat, 16 Nov 2013 10:45:46 +0100 Subject: [PATCH] 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 --- RELEASE-NOTES-1.23 | 2 ++ resources/mediawiki.action/mediawiki.action.edit.js | 4 ++-- 2 files changed, 4 insertions(+), 2 deletions(-) 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; -- 2.20.1