Merge "Fixed dependencies for jquery.collapsibleTabs"
[lhc/web/wiklou.git] / includes / Message.php
index 1e60bae..824f177 100644 (file)
@@ -337,6 +337,7 @@ class Message {
         * turned off.
         * @since 1.17
         * @param $lang Mixed: language code or Language object.
+        * @throws MWException
         * @return Message: $this
         */
        public function inLanguage( $lang ) {
@@ -437,6 +438,15 @@ class Message {
                        return '<' . $key . '>';
                }
 
+               # Replace $* with a list of parameters for &uselang=qqx.
+               if ( strpos( $string, '$*' ) !== false ) {
+                       $paramlist = '';
+                       if ( $this->parameters !== array() ) {
+                               $paramlist = ': $' . implode( ', $', range( 1, count( $this->parameters ) ) );
+                       }
+                       $string = str_replace( '$*', $paramlist, $string );
+               }
+
                # Replace parameters before text parsing
                $string = $this->replaceParameters( $string, 'before' );
 
@@ -547,7 +557,7 @@ class Message {
        /**
         * Check whether a message does not exist, is an empty string, or is "-"
         * @since 1.18
-        * @return Bool: true if is is and false if not
+        * @return Bool: true if it is and false if not
         */
        public function isDisabled() {
                $message = $this->fetchMessage();
@@ -635,6 +645,7 @@ class Message {
        /**
         * Wrapper for what ever method we use to get message contents
         * @since 1.17
+        * @throws MWException
         * @return string
         */
        protected function fetchMessage() {