From 209fa62c8e05ef10c1997e8f49f10a77888063e7 Mon Sep 17 00:00:00 2001 From: Happy-melon Date: Thu, 25 Mar 2010 20:52:52 +0000 Subject: [PATCH] Various tweaks and fixes. --- includes/Message.php | 16 +++++++--------- 1 file changed, 7 insertions(+), 9 deletions(-) diff --git a/includes/Message.php b/includes/Message.php index b8d77a15cb..ec9a5fdfa1 100644 --- a/includes/Message.php +++ b/includes/Message.php @@ -94,16 +94,16 @@ class Message { /** * Constructor. * @param $key String: message key + * @param $params Array message parameters + * @param $options Array message options * @return Message: $this */ public function __construct( $key, $params=array(), $options=array() ) { $this->key = $key; - if( $params ){ - $this->params( $params ); - } - if( $options ){ - $this->options( $options ); + foreach( $params as $param ){ + $this->params( $param ); } + $this->options( $options ); } /** @@ -173,7 +173,7 @@ class Message { $this->language = Language::factory( $lang ); } else { $type = gettype( $lang ); - throw new MWException( "Message::langauge() must be " + throw new MWException( __METHOD__ . " must be " . "passed a String or Language object; $type given" ); } @@ -238,8 +238,6 @@ class Message { return $string; } - public function __tostring(){ return $this->toString(); } - /** * Fully parse the text from wikitext to HTML * @return String parsed HTML @@ -285,7 +283,7 @@ class Message { public function parseAsBlock() { $this->options( array( 'parse' => true, - 'inline' => true, + 'inline' => false, )); return $this->tostring(); } -- 2.20.1