mirror of
https://gerrit.wikimedia.org/r/mediawiki/extensions/Interwiki
synced 2024-11-28 08:10:42 +00:00
Perform cheaper checks first
Change-Id: I54808896efdd302558f11b7d6ec6d01622657b92
This commit is contained in:
parent
ae1779b0e0
commit
c935dff562
|
@ -232,7 +232,7 @@ class SpecialInterwiki extends SpecialPage {
|
|||
// (Bug 30599).
|
||||
global $wgLegalTitleChars;
|
||||
$validPrefixChars = preg_replace( '/[ :&=]/', '', $wgLegalTitleChars );
|
||||
if ( preg_match( "/\s|[^$validPrefixChars]/", $prefix ) && $do === 'add' ) {
|
||||
if ( $do === 'add' && preg_match( "/\s|[^$validPrefixChars]/", $prefix ) ) {
|
||||
$this->error( 'interwiki-badprefix', htmlspecialchars( $prefix ) );
|
||||
$this->showForm( $do );
|
||||
return;
|
||||
|
|
Loading…
Reference in a new issue