r10228 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r10227‎ | r10228 | r10229 >
Date:20:52, 21 July 2005
Author:avar
Status:old
Tags:
Comment:
* Make makeInternalOrExternalUrl() use the same url protocols as the parser
Modified paths:
  • /trunk/phase3/includes/Skin.php (modified) (history)

Diff [purge]

Index: trunk/phase3/includes/Skin.php
@@ -1247,7 +1247,7 @@
12481248 # If url string starts with http, consider as external URL, else
12491249 # internal
12501250 /*static*/ function makeInternalOrExternalUrl( $name ) {
1251 - if ( strncmp( $name, 'http', 4 ) == 0 ) {
 1251+ if ( preg_match( '/^(?:' . URL_PROTOCOLS . ')/', $name ) ) {
12521252 return $name;
12531253 } else {
12541254 return $this->makeUrl( $name );

Status & tagging log