Index: trunk/phase3/includes/Message.php |
— | — | @@ -94,16 +94,16 @@ |
95 | 95 | /** |
96 | 96 | * Constructor. |
97 | 97 | * @param $key String: message key |
| 98 | + * @param $params Array message parameters |
| 99 | + * @param $options Array message options |
98 | 100 | * @return Message: $this |
99 | 101 | */ |
100 | 102 | public function __construct( $key, $params=array(), $options=array() ) { |
101 | 103 | $this->key = $key; |
102 | | - if( $params ){ |
103 | | - $this->params( $params ); |
| 104 | + foreach( $params as $param ){ |
| 105 | + $this->params( $param ); |
104 | 106 | } |
105 | | - if( $options ){ |
106 | | - $this->options( $options ); |
107 | | - } |
| 107 | + $this->options( $options ); |
108 | 108 | } |
109 | 109 | |
110 | 110 | /** |
— | — | @@ -173,7 +173,7 @@ |
174 | 174 | $this->language = Language::factory( $lang ); |
175 | 175 | } else { |
176 | 176 | $type = gettype( $lang ); |
177 | | - throw new MWException( "Message::langauge() must be " |
| 177 | + throw new MWException( __METHOD__ . " must be " |
178 | 178 | . "passed a String or Language object; $type given" |
179 | 179 | ); |
180 | 180 | } |
— | — | @@ -238,8 +238,6 @@ |
239 | 239 | return $string; |
240 | 240 | } |
241 | 241 | |
242 | | - public function __tostring(){ return $this->toString(); } |
243 | | - |
244 | 242 | /** |
245 | 243 | * Fully parse the text from wikitext to HTML |
246 | 244 | * @return String parsed HTML |
— | — | @@ -285,7 +283,7 @@ |
286 | 284 | public function parseAsBlock() { |
287 | 285 | $this->options( array( |
288 | 286 | 'parse' => true, |
289 | | - 'inline' => true, |
| 287 | + 'inline' => false, |
290 | 288 | )); |
291 | 289 | return $this->tostring(); |
292 | 290 | } |