Index: trunk/extensions/Babel/Babel.class.php |
— | — | @@ -39,15 +39,15 @@ |
40 | 40 | $template = wfMessage( 'babel-template', $name )->inContentLanguage()->text(); |
41 | 41 | if ( $name === '' ) { |
42 | 42 | continue; |
| 43 | + } elseif ( $components !== false ) { |
| 44 | + // Non-existent page and valid parameter syntax, babel box |
| 45 | + $content .= self::mGenerateBox( $components['code'], $components['level'] ); |
| 46 | + $content .= self::mGenerateCategories( $components['code'], $components['level'] ); |
43 | 47 | } elseif ( self::mPageExists( $template ) ) { |
44 | | - // Existent template page has precedence |
| 48 | + // Check for a template |
45 | 49 | $templateParameters[0] = $template; |
46 | 50 | $template = implode('|', $templateParameters); |
47 | 51 | $content .= self::mGenerateNotaBox( $parser->replaceVariables( "{{{$template}}}" ) ); |
48 | | - } elseif ( $components !== false ) { |
49 | | - // Non-existent page and valid parameter syntax, babel box |
50 | | - $content .= self::mGenerateBox( $components['code'], $components['level'] ); |
51 | | - $content .= self::mGenerateCategories( $components['code'], $components['level'] ); |
52 | 52 | } elseif ( self::mValidTitle( $template ) ) { |
53 | 53 | // Non-existent page and invalid parameter syntax, red link. |
54 | 54 | $content .= self::mGenerateNotaBox( '[['.$template.']]' ); |