Index: trunk/extensions/Babel/Babel.class.php |
— | — | @@ -26,12 +26,20 @@ |
27 | 27 | self::mTemplateLinkBatch( $parameters ); |
28 | 28 | |
29 | 29 | $content = ''; |
| 30 | + $templateParameters = array(); // collects name=value parameters to be passed to wiki templates. |
30 | 31 | foreach ( $parameters as $name ) { |
| 32 | + if (strpos($name, '=') !== false) { |
| 33 | + $templateParameters[] = $name; |
| 34 | + continue; |
| 35 | + } |
31 | 36 | $components = self::mParseParameter( $name ); |
32 | 37 | $template = wfMsgForContent( 'babel-template', $name ); |
33 | 38 | if ( $name === '' ) { |
34 | 39 | continue; |
35 | 40 | } elseif ( self::mPageExists( $template ) ) { |
| 41 | + if ( count($templateParameters) ) { |
| 42 | + $template .= '|'.implode('|', $templateParameters); |
| 43 | + } |
36 | 44 | $content .= $parser->replaceVariables( "{{{$template}}}" ); |
37 | 45 | } elseif ( $components !== false ) { |
38 | 46 | $content .= self::mGenerateBox( $components['code'], $components['level'] ); |
— | — | @@ -112,7 +120,7 @@ |
113 | 121 | } |
114 | 122 | |
115 | 123 | /** |
116 | | - * Identify whether or not a page exists or not. |
| 124 | + * Identify whether or not a page exists. |
117 | 125 | * |
118 | 126 | * @param $name String: Name of the page to check. |
119 | 127 | * @return Boolean: Indication of whether the page exists. |