diff options
author | umherirrender <umherirrender_de.wp@web.de> | 2013-12-17 19:41:33 +0100 |
---|---|---|
committer | umherirrender <umherirrender_de.wp@web.de> | 2013-12-17 19:41:33 +0100 |
commit | 7bca293dfd66cc6eca919d5d3d98940388745c1b (patch) | |
tree | c730fe0fdbe7cc75b658a6ea0a7f4e0d8db6423c /includes | |
parent | 862122b98048e2161a295b8266bcd95c45a754dc (diff) | |
download | mediawikicore-7bca293dfd66cc6eca919d5d3d98940388745c1b.tar.gz mediawikicore-7bca293dfd66cc6eca919d5d3d98940388745c1b.zip |
Migrate redirectToFragment() from wikibits.js to own module
This patch creates the new top module
'mediawiki.action.view.redirectToFragment'.
This module contains the same code, but was migrated to use
jQuery.profile to detect the layout of the browser.
Other changes as written on bug 35858 can be done in seperate
patch set(s). This is to have a start.
The old code has to stay a version, because the cache can contain
inline script calls to this function, which should not break.
Bug: 35858
Change-Id: Ic10c060c3a2cbab455348e57740fc8abdc66ff9a
Diffstat (limited to 'includes')
-rw-r--r-- | includes/Article.php | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/includes/Article.php b/includes/Article.php index 821c32ea69c9..e7a1188ba4f4 100644 --- a/includes/Article.php +++ b/includes/Article.php @@ -989,9 +989,8 @@ class Article implements Page { // Set the fragment if one was specified in the redirect if ( strval( $this->getTitle()->getFragment() ) != '' ) { - $outputPage->addInlineScript( Xml::encodeJsCall( - 'redirectToFragment', array( $this->getTitle()->getFragmentForURL() ) - ) ); + $outputPage->addJsConfigVars( 'wgRedirectToFragment', $this->getTitle()->getFragmentForURL() ); + $outputPage->addModules( 'mediawiki.action.view.redirectToFragment' ); } // Add a <link rel="canonical"> tag |