Revert r104659 and its followup r104665: break the unit tests with a fatal error...
[lhc/web/wiklou.git] / includes / Message.php
index 803f091..e253b4a 100644 (file)
@@ -204,6 +204,19 @@ class Message {
                return $this;
        }
 
+       /**
+        * Set the language and the title from a context object
+        *
+        * @param $context IContextSource
+        * @return Message: $this
+        */
+       public function setContext( IContextSource $context ) {
+               $this->inLanguage( $context->getLanguage() );
+               $this->title( $context->getTitle() );
+
+               return $this;
+       }
+
        /**
         * Request the message in any language that is supported.
         * As a side effect interface message status is unconditionally