Merge "(bug 47070) check content model namespace on import."
[lhc/web/wiklou.git] / skins / common / wikibits.js
index d28ca0a..f0aa943 100644 (file)
@@ -18,7 +18,14 @@ if ( mw.config.get( 'wgBreakFrames' ) ) {
        }
 }
 
-win.redirectToFragment = function ( fragment ) {
+/**
+ * Legacy function to scroll to an id while viewing the page over a redirect.
+ * Superseeded by module 'mediawiki.action.view.redirectToFragment' in version 1.23.
+ * Kepted because cache can contain still inline script calls to this function.
+ * Should be removed in version 1.24.
+ * @deprecated since 1.23 Use mediawiki.action.view.redirectToFragment instead
+ */
+mw.log.deprecate( win, 'redirectToFragment', function ( fragment ) {
        var webKitVersion,
                match = navigator.userAgent.match( /AppleWebKit\/(\d+)/ );
        if ( match ) {
@@ -46,7 +53,7 @@ win.redirectToFragment = function ( fragment ) {
                        } );
                }
        }
-};
+}, 'Use the module mediawiki.action.view.redirectToFragment instead.' );
 
 /**
  * User-agent sniffing.
@@ -226,8 +233,11 @@ win.importScriptURI = function ( url ) {
        return s;
 };
 
-win.importStylesheet = function( page ) {
-       return win.importStylesheetURI( mw.config.get( 'wgScript' ) + '?action=raw&ctype=text/css&title=' + mw.util.wikiUrlencode( page ) );
+win.importStylesheet = function ( page ) {
+       var uri = mw.config.get( 'wgScript' ) + '?title=' +
+               mw.util.wikiUrlencode( page ) +
+               '&action=raw&ctype=text/css';
+       return win.importStylesheetURI( uri );
 };
 
 win.importStylesheetURI = function( url, media ) {