This code was added by Brion back in 2004 as part of r6398.
According to Brion, links like [[en:wikt:foo]] on English Wikipedia are
"just crazy!", but I can't see any reason to disallow them.
Bug: 61357
Change-Id: If449e60a0ef95cfe3dd6f4b1809ac012be62a0ea
}
# Namespace or interwiki prefix
- $firstPass = true;
$prefixRegexp = "/^(.+?)_*:_*(.*)$/S";
do {
$m = array();
}
}
} elseif ( Interwiki::isValidInterwiki( $p ) ) {
- if ( !$firstPass ) {
- //TODO: get rid of global state!
- # Can't make a local interwiki link to an interwiki link.
- # That's just crazy!
- throw new MalformedTitleException( 'Interwiki prefix found in title: ' . $text );
- }
-
# Interwiki link
$dbkey = $m[2];
$parts['interwiki'] = $this->language->lc( $p );
throw new MalformedTitleException( 'Local interwiki with empty title: ' . $text );
}
$parts['interwiki'] = '';
- $firstPass = false;
# Do another namespace split...
continue 2;
'remotetestiw: Talk: # anchor',
'remotetestiw: #bar',
'remotetestiw: Talk:',
- 'remotetestiw: Talk: Foo'
+ 'remotetestiw: Talk: Foo',
+ 'localtestiw:remotetestiw:',
+ 'localtestiw:remotetestiw:foo'
) as $text ) {
$this->assertInstanceOf( 'Title', Title::newFromText( $text ), "Valid: $text" );
}