merged master
[lhc/web/wiklou.git] / includes / logging / LogPage.php
index 2521ae8..d96a5ea 100644 (file)
@@ -133,7 +133,8 @@ class LogPage {
                        if ( $rcComment == '' ) {
                                $rcComment = $this->comment;
                        } else {
-                               $rcComment .= wfMsgForContent( 'colon-separator' ) . $this->comment;
+                               $rcComment .= wfMessage( 'colon-separator' )->inContentLanguage()->text() .
+                                       $this->comment;
                        }
                }
 
@@ -152,7 +153,8 @@ class LogPage {
                        if ( $rcComment == '' ) {
                                $rcComment = $this->comment;
                        } else {
-                               $rcComment .= wfMsgForContent( 'colon-separator' ) . $this->comment;
+                               $rcComment .= wfMessage( 'colon-separator' )->inContentLanguage()->text() .
+                                       $this->comment;
                        }
                }
 
@@ -197,7 +199,7 @@ class LogPage {
                global $wgLogNames;
 
                if( isset( $wgLogNames[$type] ) ) {
-                       return str_replace( '_', ' ', wfMsg( $wgLogNames[$type] ) );
+                       return str_replace( '_', ' ', wfMessage( $wgLogNames[$type] )->text() );
                } else {
                        // Bogus log types? Perhaps an extension was removed.
                        return $type;
@@ -214,7 +216,7 @@ class LogPage {
         */
        public static function logHeader( $type ) {
                global $wgLogHeaders;
-               return wfMsgExt( $wgLogHeaders[$type], array( 'parseinline' ) );
+               return wfMessage( $wgLogHeaders[$type] )->parse();
        }
 
        /**
@@ -247,12 +249,12 @@ class LogPage {
 
                if( isset( $wgLogActions[$key] ) ) {
                        if( is_null( $title ) ) {
-                               $rv = wfMsgExt( $wgLogActions[$key], array( 'parsemag', 'escape', 'language' => $langObj ) );
+                               $rv = wfMessage( $wgLogActions[$key] )->inLanguage( $langObj )->escaped();
                        } else {
                                $titleLink = self::getTitleLink( $type, $langObjOrNull, $title, $params );
 
                                if( preg_match( '/^rights\/(rights|autopromote)/', $key ) ) {
-                                       $rightsnone = wfMsgExt( 'rightsnone', array( 'parsemag', 'language' => $langObj ) );
+                                       $rightsnone = wfMessage( 'rightsnone' )->inLanguage( $langObj )->text();
 
                                        if( $skin ) {
                                                $username = $title->getText();
@@ -275,7 +277,7 @@ class LogPage {
                                }
 
                                if( count( $params ) == 0 ) {
-                                       $rv = wfMsgExt( $wgLogActions[$key], array( 'parsemag', 'escape', 'replaceafter', 'language' => $langObj ), $titleLink );
+                                       $rv = wfMessage( $wgLogActions[$key] )->rawParams( $titleLink )->inLanguage( $langObj )->escaped();
                                } else {
                                        $details = '';
                                        array_unshift( $params, $titleLink );
@@ -302,11 +304,11 @@ class LogPage {
 
                                                // Cascading flag...
                                                if( $params[2] ) {
-                                                       $details .= ' [' . wfMsgExt( 'protect-summary-cascade', array( 'parsemag', 'language' => $langObj ) ) . ']';
+                                                       $details .= ' [' . wfMessage( 'protect-summary-cascade' )->inLanguage( $langObj )->text() . ']';
                                                }
                                        }
 
-                                       $rv = wfMsgExt( $wgLogActions[$key], array( 'parsemag', 'escape', 'replaceafter', 'language' => $langObj ), $params ) . $details;
+                                       $rv = wfMessage( $wgLogActions[$key] )->rawParams( $params )->inLanguage( $langObj )->escaped() . $details;
                                }
                        }
                } else {
@@ -442,7 +444,7 @@ class LogPage {
         * @param $action String: one of '', 'block', 'protect', 'rights', 'delete', 'upload', 'move', 'move_redir'
         * @param $target Title object
         * @param $comment String: description associated
-        * @param $params Array: parameters passed later to wfMsg.* functions
+        * @param $params Array: parameters passed later to wfMessage function
         * @param $doer User object: the user doing the action
         *
         * @return int log_id of the inserted log entry