| @@ 86-93 (lines=8) @@ | ||
| 83 | ||
| 84 | // Namespace prefix only |
|
| 85 | $title = Title::newFromText( $input . 'Dummy' ); |
|
| 86 | if ( |
|
| 87 | $title && |
|
| 88 | $title->getText() === 'Dummy' && |
|
| 89 | !$title->inNamespace( NS_MAIN ) && |
|
| 90 | !$title->isExternal() |
|
| 91 | ) { |
|
| 92 | return [ $title->getNamespace(), '' ]; |
|
| 93 | } |
|
| 94 | ||
| 95 | // Namespace prefix with additional input |
|
| 96 | $title = Title::newFromText( $input ); |
|
| @@ 97-104 (lines=8) @@ | ||
| 94 | ||
| 95 | // Namespace prefix with additional input |
|
| 96 | $title = Title::newFromText( $input ); |
|
| 97 | if ( |
|
| 98 | $title && |
|
| 99 | !$title->inNamespace( NS_MAIN ) && |
|
| 100 | !$title->isExternal() |
|
| 101 | ) { |
|
| 102 | // getText provides correct capitalization |
|
| 103 | return [ $title->getNamespace(), $title->getText() ]; |
|
| 104 | } |
|
| 105 | ||
| 106 | return false; |
|
| 107 | } |
|