wikibits: Un-deprecate importScript and importStylesheet
authorBartosz Dziewoński <matma.rex@gmail.com>
Thu, 23 Apr 2015 06:55:25 +0000 (08:55 +0200)
committerBartosz Dziewoński <matma.rex@gmail.com>
Thu, 23 Apr 2015 09:05:01 +0000 (11:05 +0200)
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

RELEASE-NOTES-1.25
resources/src/mediawiki.legacy/wikibits.js

index e74474d..9d8487c 100644 (file)
@@ -491,8 +491,9 @@ changes to languages because of Bugzilla reports.
     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 ==
index f5aeb3f..32cd79a 100644 (file)
         * 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 ) {
                return importScriptURI( uri );
        }
 
+       /**
+        * @deprecated since 1.17 Use mw.loader instead. Warnings added in 1.25.
+        */
        function importScriptURI( url ) {
                if ( loadedScripts[url] ) {
                        return null;
                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';
 
        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 ) );