Bartosz Dziewoński has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/206138

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
(cherry picked from commit 8eb99c94a9356530e82e43684c6d45fd3115e35d)
---
M RELEASE-NOTES-1.25
M resources/src/mediawiki.legacy/wikibits.js
2 files changed, 12 insertions(+), 6 deletions(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/38/206138/1

diff --git a/RELEASE-NOTES-1.25 b/RELEASE-NOTES-1.25
index 5706602..6c12537 100644
--- a/RELEASE-NOTES-1.25
+++ b/RELEASE-NOTES-1.25
@@ -473,8 +473,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/206138
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I2d734ca57e991be88472ae76a66f9547f6da82c8
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: REL1_25
Gerrit-Owner: Bartosz Dziewoński <matma....@gmail.com>

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

Reply via email to