r107777 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r107776‎ | r107777 | r107778 >
Date:15:44, 1 January 2012
Author:ialex
Status:ok (Comments)
Tags:
Comment:
Always set 'jsvarurl' to false (only affect skins not using OutputPage::headElement()) since action=raw&gen=js always return an empty page, so it's pointless to link to it
Modified paths:
  • /trunk/phase3/includes/SkinTemplate.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/SkinTemplate.php
@@ -139,7 +139,7 @@
140140 global $wgDisableCounters, $wgSitename, $wgLogo, $wgHideInterlanguageLinks;
141141 global $wgMaxCredits, $wgShowCreditsIfMax;
142142 global $wgPageShowWatchingUsers;
143 - global $wgUseSiteJs, $wgDebugComments;
 143+ global $wgDebugComments;
144144 global $wgArticlePath, $wgScriptPath, $wgServer;
145145
146146 wfProfileIn( __METHOD__ );
@@ -201,15 +201,7 @@
202202 $tpl->setRef( 'userjs', $this->userjs );
203203 $tpl->setRef( 'userjsprev', $this->userjsprev );
204204
205 - if( $wgUseSiteJs ) {
206 - $jsCache = $this->loggedin ? '&smaxage=0' : '';
207 - $tpl->set( 'jsvarurl',
208 - self::makeUrl( '-',
209 - "action=raw$jsCache&gen=js&useskin=" .
210 - urlencode( $this->getSkinName() ) ) );
211 - } else {
212 - $tpl->set( 'jsvarurl', false );
213 - }
 205+ $tpl->set( 'jsvarurl', false );
214206
215207 $tpl->setRef( 'xhtmldefaultnamespace', $wgXhtmlDefaultNamespace );
216208 $tpl->set( 'xhtmlnamespaces', $wgXhtmlNamespaces );

Comments

#Comment by Hashar (talk | contribs)   16:24, 3 January 2012

Maybe jsvarurl can be removed? It does not seem to be used in skins nor in extensions/skins

#Comment by IAlex (talk | contribs)   16:27, 3 January 2012

I would just remove it along with all code for skins not using OutputPage::headElement(), but SkinOffline in DumpHTML is still using this.

#Comment by Hashar (talk | contribs)   16:42, 10 January 2012

Also logged bug 33641 to get ride of $wgUseSiteJs while we are at it.

Status & tagging log