jenkins-bot has submitted this change and it was merged.

Change subject: wikibits: Un-deprecate importScript and importStylesheet
......................................................................


wikibits: Un-deprecate importScript and importStylesheet

Per discussion on T95964. No suitable replacement exists yet.
importScriptURI and importStylesheetURI stay deprecated, having been
superseded by mw.loader.load.

Follow-up to 5c5e09016d6b9b2d3d4799a9a34344a8cc96726f.

Bug: T95964
Change-Id: I2d734ca57e991be88472ae76a66f9547f6da82c8
---
M RELEASE-NOTES-1.25
M resources/src/mediawiki.legacy/wikibits.js
2 files changed, 12 insertions(+), 6 deletions(-)

Approvals:
  He7d3r: Looks good to me, but someone else must approve
  Krinkle: Looks good to me, approved
  jenkins-bot: Verified



diff --git a/RELEASE-NOTES-1.25 b/RELEASE-NOTES-1.25
index e74474d..9d8487c 100644
--- a/RELEASE-NOTES-1.25
+++ b/RELEASE-NOTES-1.25
@@ -491,8 +491,9 @@
     RewriteBase /
     RewriteRule ^(.*)\.php5 $1.php [R=301,L]
 
-* The global importScript and importStylesheet functions, as well as the 
loadedScripts object,
-  from wikibits.js (deprecated since 1.17) now emit warnings through 
mw.log.warn when accessed.
+* The global importScriptURI and importStylesheetURI functions, as well as the
+  loadedScripts object, from wikibits.js (deprecated since 1.17) now emit
+  warnings through mw.log.warn when accessed.
 
 
 == Compatibility ==
diff --git a/resources/src/mediawiki.legacy/wikibits.js 
b/resources/src/mediawiki.legacy/wikibits.js
index f5aeb3f..32cd79a 100644
--- a/resources/src/mediawiki.legacy/wikibits.js
+++ b/resources/src/mediawiki.legacy/wikibits.js
@@ -162,8 +162,6 @@
         * Wikipage import methods
         *
         * See 
https://www.mediawiki.org/wiki/ResourceLoader/Legacy_JavaScript#wikibits.js
-        *
-        * @deprecated since 1.17 Use mw.loader instead. Warnings added in 1.26.
         */
 
        function importScript( page ) {
@@ -173,6 +171,9 @@
                return importScriptURI( uri );
        }
 
+       /**
+        * @deprecated since 1.17 Use mw.loader instead. Warnings added in 1.25.
+        */
        function importScriptURI( url ) {
                if ( loadedScripts[url] ) {
                        return null;
@@ -192,6 +193,9 @@
                return importStylesheetURI( uri );
        }
 
+       /**
+        * @deprecated since 1.17 Use mw.loader instead. Warnings added in 1.25.
+        */
        function importStylesheetURI( url, media ) {
                var l = document.createElement( 'link' );
                l.rel = 'stylesheet';
@@ -205,9 +209,10 @@
 
        msg = 'Use mw.loader instead.';
        mw.log.deprecate( win, 'loadedScripts', loadedScripts, msg );
-       mw.log.deprecate( win, 'importScript', importScript, msg );
        mw.log.deprecate( win, 'importScriptURI', importScriptURI, msg );
-       mw.log.deprecate( win, 'importStylesheet', importStylesheet, msg );
        mw.log.deprecate( win, 'importStylesheetURI', importStylesheetURI, msg 
);
+       // Not quite deprecated yet.
+       win.importScript = importScript;
+       win.importStylesheet = importStylesheet;
 
 }( mediaWiki, jQuery ) );

-- 
To view, visit https://gerrit.wikimedia.org/r/206078
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: merged
Gerrit-Change-Id: I2d734ca57e991be88472ae76a66f9547f6da82c8
Gerrit-PatchSet: 3
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Bartosz DziewoƄski <matma....@gmail.com>
Gerrit-Reviewer: He7d3r <he7...@gmail.com>
Gerrit-Reviewer: Jack Phoenix <j...@countervandalism.net>
Gerrit-Reviewer: Krinkle <krinklem...@gmail.com>
Gerrit-Reviewer: Schnark <listenle...@gmail.com>
Gerrit-Reviewer: jenkins-bot <>

_______________________________________________
MediaWiki-commits mailing list
MediaWiki-commits@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to