Merge "jquery.suggestions: Use document width instead of <body> width for position...
[lhc/web/wiklou.git] / includes / context / DerivativeContext.php
index eda56a7..d4caf05 100644 (file)
@@ -281,4 +281,20 @@ class DerivativeContext extends ContextSource {
                        return $this->getContext()->getSkin();
                }
        }
+
+       /**
+        * Get a message using the current context.
+        *
+        * This can't just inherit from ContextSource, since then
+        * it would set only the original context, and not take
+        * into account any changes.
+        *
+        * @param String Message name
+        * @param Variable number of message arguments
+        * @return Message
+        */
+       public function msg() {
+               $args = func_get_args();
+               return call_user_func_array( 'wfMessage', $args )->setContext( $this );
+       }
 }