r46077 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r46076‎ | r46077 | r46078 >
Date:18:03, 23 January 2009
Author:simetrical
Status:ok (Comments)
Tags:
Comment:
Remove unused code
Modified paths:
  • /trunk/phase3/includes/parser/Parser.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/parser/Parser.php
@@ -1406,12 +1406,6 @@
14071407
14081408 $url = Sanitizer::cleanUrl( $url );
14091409
1410 - if ( $this->mOptions->mExternalLinkTarget ) {
1411 - $attribs = array( 'target' => $this->mOptions->mExternalLinkTarget );
1412 - } else {
1413 - $attribs = array();
1414 - }
1415 -
14161410 # Use the encoded URL
14171411 # This means that users can paste URLs directly into the text
14181412 # Funny characters like ö aren't valid in URLs anyway

Comments

#Comment by Aaron Schulz (talk | contribs)   17:58, 24 January 2009

What about $wgExternalLinkTarget?

#Comment by Simetrical (talk | contribs)   00:15, 25 January 2009

I considered that, but decided it was potentially different enough that people might not want the same settings to apply. You probably have a relatively broad list of things that you don't want to nofollow: any kind of affiliates, sister sites, whatever, maybe not controlled by you. But if you're setting target="_blank", you might be doing it because you want people to stay on *your* site, and might still want links to affiliate sites to open in a new window.

So if anyone wants this setting for target=, that can be done separately. I won't do it because I don't use the feature and think it's kind of evil.  :)

#Comment by Brion VIBBER (talk | contribs)   22:31, 26 January 2009

I'm not sure what the above comment is talking about since this seems to have no relation whatsoever to nofollow anything.

The removed code appears to have been redundant to code in getExternalLinkAttribs(), and thus didn't do anything of substance...?

#Comment by Simetrical (talk | contribs)   01:33, 27 January 2009

I assume that the comment was meant for r46078 (which was committed at the same time as this), and meant to ask why I didn't apply the whitelist to $wgExternalLinkTarget too. If that's not what he meant, then I have no idea. :D

Status & tagging log