Merge "Slightly simplify QueryPage::outputResults"
[lhc/web/wiklou.git] / includes / title / MediaWikiTitleCodec.php
index 6b2e877..c497865 100644 (file)
@@ -198,7 +198,7 @@ class MediaWikiTitleCodec implements TitleFormatter, TitleParser {
         * @param int $defaultNamespace
         *
         * @throws MalformedTitleException If $text is not a valid title string.
-        * @return array A mapp with the fields 'interwiki', 'fragment', 'namespace',
+        * @return array A map with the fields 'interwiki', 'fragment', 'namespace',
         *         'user_case_dbkey', and 'dbkey'.
         */
        public function splitTitleString( $text, $defaultNamespace = NS_MAIN ) {
@@ -255,7 +255,8 @@ class MediaWikiTitleCodec implements TitleFormatter, TitleParser {
                        $m = array();
                        if ( preg_match( $prefixRegexp, $dbkey, $m ) ) {
                                $p = $m[1];
-                               if ( ( $ns = $this->language->getNsIndex( $p ) ) !== false ) {
+                               $ns = $this->language->getNsIndex( $p );
+                               if ( $ns !== false ) {
                                        # Ordinary namespace
                                        $dbkey = $m[2];
                                        $parts['namespace'] = $ns;