Merge "Use correct case for SpecialRecentChanges class in SpecialPageFactory::$mList"
[lhc/web/wiklou.git] / includes / WikiError.php
index 7c167f6..08eb800 100644 (file)
@@ -82,7 +82,7 @@ class WikiError {
  */
 class WikiErrorMsg extends WikiError {
        /**
-        * @param $message String: wiki message name
+        * @param string $message wiki message name
         * @param ... parameters to pass to wfMsg()
         *
         * @deprecated since 1.17
@@ -91,22 +91,22 @@ class WikiErrorMsg extends WikiError {
                wfDeprecated( __METHOD__, '1.17' );
                $args = func_get_args();
                array_shift( $args );
-               $this->mMessage = wfMsgReal( $message, $args, true );
+               $this->mMessage = wfMessage( $message )->rawParams( $args )->text();
                $this->mMsgKey = $message;
                $this->mMsgArgs = $args;
        }
-       
+
        function getMessageKey() {
                return $this->mMsgKey;
        }
-       
+
        function getMessageArgs() {
                return $this->mMsgArgs;
        }
 }
 
 /**
- * Error class designed to handle errors involved with 
+ * Error class designed to handle errors involved with
  * XML parsing
  * @ingroup Exception
  */
@@ -134,16 +134,16 @@ class WikiXmlError extends WikiError {
        /** @return string */
        function getMessage() {
                // '$1 at line $2, col $3 (byte $4): $5',
-               return wfMsgHtml( 'xml-error-string',
+               return wfMessage( 'xml-error-string',
                        $this->mMessage,
                        $this->mLine,
                        $this->mColumn,
                        $this->mByte . $this->mContext,
-                       xml_error_string( $this->mXmlError ) );
+                       xml_error_string( $this->mXmlError ) )->escaped();
        }
 
        function _extractContext( $context, $offset ) {
-               if( is_null( $context ) ) {
+               if ( is_null( $context ) ) {
                        return null;
                } else {
                        // Hopefully integer overflow will be handled transparently here