* Make tests work better together. Tests are now skipped or marked incomplete.
[lhc/web/wiklou.git] / includes / Title.php
index 563bd9e..b6d8529 100644 (file)
@@ -932,7 +932,7 @@ class Title {
        /**
         * Is this page "semi-protected" - the *only* protection is autoconfirm?
         *
-        * @param @action \type{\string} Action to check (default: edit)
+        * @param $action \type{\string} Action to check (default: edit)
         * @return \type{\bool}
         */
        public function isSemiProtected( $action = 'edit' ) {
@@ -956,7 +956,7 @@ class Title {
 
        /**
         * Does the title correspond to a protected article?
-        * @param $what \type{\string} the action the page is protected from,
+        * @param $action \type{\string} the action the page is protected from,
         * by default checks all actions.
         * @return \type{\bool}
         */
@@ -2890,13 +2890,15 @@ class Title {
         *  Ignored if the user doesn't have the suppressredirect right
         */
        private function moveOverExistingRedirect( &$nt, $reason = '', $createRedirect = true ) {
-               global $wgUseSquid, $wgUser;
+               global $wgUseSquid, $wgUser, $wgContLang;
 
                $comment = wfMsgForContent( '1movedto2_redir', $this->getPrefixedText(), $nt->getPrefixedText() );
 
                if ( $reason ) {
                        $comment .= wfMsgForContent( 'colon-separator' ) . $reason;
                }
+               # Truncate for whole multibyte characters. +5 bytes for ellipsis
+               $comment = $wgContLang->truncate( $comment, 250 );
 
                $now = wfTimestampNow();
                $newid = $nt->getArticleID();
@@ -3004,7 +3006,7 @@ class Title {
         *  Ignored if the user doesn't have the suppressredirect right
         */
        private function moveToNewTitle( &$nt, $reason = '', $createRedirect = true ) {
-               global $wgUseSquid, $wgUser;
+               global $wgUseSquid, $wgUser, $wgContLang;
 
                $comment = wfMsgForContent( '1movedto2', $this->getPrefixedText(), $nt->getPrefixedText() );
                if ( $reason ) {
@@ -3012,6 +3014,8 @@ class Title {
                                array( 'escapenoentities', 'content' ) );
                        $comment .= $reason;
                }
+               # Truncate for whole multibyte characters. +5 bytes for ellipsis
+               $comment = $wgContLang->truncate( $comment, 250 );
 
                $newid = $nt->getArticleID();
                $oldid = $this->getArticleID();