r83643 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r83642‎ | r83643 | r83644 >
Date:07:45, 10 March 2011
Author:tbleher
Status:ok (Comments)
Tags:
Comment:
Followup r82577: Only generate talk page links on content pages

As suggested in http://www.mediawiki.org/wiki/Special:Code/MediaWiki/82577#c14726.
DumpHTML is still broken in many ways, but at least it runs through now.
Modified paths:
  • /trunk/extensions/DumpHTML/SkinOffline.php (modified) (history)

Diff [purge]

Index: trunk/extensions/DumpHTML/SkinOffline.php
@@ -57,12 +57,14 @@
5858 $nskey,
5959 !$this->mTitle->isTalkPage() );
6060
61 - $content_actions['talk'] = $this->tabAction(
62 - $this->mTitle->getTalkPage(),
63 - 'talk',
64 - $this->mTitle->isTalkPage(),
65 - '',
66 - true);
 61+ if( $this->mTitle->canTalk() ) {
 62+ $content_actions['talk'] = $this->tabAction(
 63+ $this->mTitle->getTalkPage(),
 64+ 'talk',
 65+ $this->mTitle->isTalkPage(),
 66+ '',
 67+ true);
 68+ }
6769
6870 if ( isset( $wgHTMLDump ) ) {
6971 $content_actions['current'] = array(

Past revisions this follows-up on

RevisionCommit summaryAuthorDate
r82577improve namespace related methods...hashar22:17, 21 February 2011

Comments

#Comment by Hashar (talk | contribs)   07:47, 10 March 2011

Sorry for breaking the code with an exception! -:-b

#Comment by Tbleher (talk | contribs)   07:58, 10 March 2011

No problem :) I think making code fail-fast is generally a good design principle, as it makes bugs more easier visible.

This breakage also caused me to look at DumpHTML in a bit more detail. Unfortunately it's so broken for me right now, that I'm not sure I can continue using it.

Examples of breakage:

  • #fullurl produces bogus localhost urls
  • MediaFunctions parser functions don't work correctly, as DumpHTML proxies access to Files, and MediaFunctions does an instanceof check on the received object
  • Talk pages link to random other pages instead of linking to their content page. Maybe a cache corruption issue?
#Comment by Hashar (talk | contribs)   10:06, 12 March 2011

You might want to log those bugs in bugzilla. At least they will be tracked.

Status & tagging log