r82311 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r82310‎ | r82311 | r82312 >
Date:23:27, 16 February 2011
Author:krinkle
Status:ok
Tags:
Comment:
Follow-up r82310. using mw.config instead
Modified paths:
  • /trunk/phase3/resources/mediawiki.util/mediawiki.util.js (modified) (history)

Diff [purge]

Index: trunk/phase3/resources/mediawiki.util/mediawiki.util.js
@@ -292,8 +292,8 @@
293293
294294 // Also check for the title in related namespaces ?
295295 if ( typeof alsoRelated !== 'undefined' && alsoRelated === true ) {
296 - var contentTabLink = wgServer + $( '#ca-talk' ).prev( 'li' ).find( 'a:first' ).attr( 'href' );
297 - isRelatedToMainpage = contentTabLink === mw.util.wikiGetlink( mw.config.get( 'wgMainPageTitle' ) );
 296+ var tabLink = mw.config.get( 'wgServer' ) + $( '#ca-talk' ).prev().find( 'a:first' ).attr( 'href' );
 297+ isRelatedToMainpage = tabLink === mw.util.wikiGetlink( mw.config.get( 'wgMainPageTitle' ) );
298298
299299 return isRelatedToMainpage || isTheMainPage;
300300 }

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r82310Adding function to check if the current page is the main space or (optionally...krinkle23:23, 16 February 2011

Status & tagging log