Index: trunk/extensions/FlaggedRevs/forms/RevisionReviewForm.php |
— | — | @@ -1044,14 +1044,15 @@ |
1045 | 1045 | } |
1046 | 1046 | |
1047 | 1047 | $rejectIds = $rejectAuthors = array(); |
1048 | | - $userNS = $wgContLang->getNsText( NS_USER ); |
| 1048 | + $contribs = SpecialPage::getTitleFor( 'Contributions' )->getPrefixedText(); |
1049 | 1049 | foreach ( $res as $row ) { |
1050 | 1050 | $rev = new Revision( $row ); |
1051 | 1051 | $rejectIds[] = $rev->getId(); |
1052 | 1052 | $rejectAuthors[] = $rev->isDeleted( Revision::DELETED_USER ) |
1053 | 1053 | ? wfMsg( 'rev-deleted-user' ) |
1054 | | - : "[[{$userNS}:{$rev->getUserText()}|{$rev->getUserText()}]]"; |
| 1054 | + : "[[{$contribs}/{$rev->getUserText()}|{$rev->getUserText()}]]"; |
1055 | 1055 | } |
| 1056 | + $rejectAuthors = array_values( array_unique( $rejectAuthors ) ); |
1056 | 1057 | |
1057 | 1058 | // List of revisions being undone... |
1058 | 1059 | $wgOut->addWikiMsg( 'revreview-reject-text-list', $wgLang->formatNum( count( $rejectIds ) ) ); |
— | — | @@ -1080,8 +1081,18 @@ |
1081 | 1082 | ? wfMsg( 'rev-deleted-user' ) |
1082 | 1083 | : $oldRev->getUserText(); |
1083 | 1084 | // NOTE: *-cur msg wording not safe for (unlikely) edit auto-merge |
1084 | | - $rejectAuthors = array_values( array_unique( $rejectAuthors ) ); |
1085 | | - if ( count( $rejectAuthors ) > 3 ) { |
| 1085 | + $msg = $newRev->isCurrent() |
| 1086 | + ? 'revreview-reject-summary-cur' |
| 1087 | + : 'revreview-reject-summary-old'; |
| 1088 | + $defaultSummary = wfMsgExt( $msg, array( 'parsemag', 'content' ), |
| 1089 | + $wgContLang->formatNum( count( $rejectIds ) ), |
| 1090 | + $wgContLang->listToText( $rejectAuthors ), |
| 1091 | + $oldRev->getId(), |
| 1092 | + $oldRevAuthor ); |
| 1093 | + // If the message is too big, then fallback to the shorter one |
| 1094 | + $colonSeparator = wfMsgForContent( 'colon-separator' ); |
| 1095 | + $maxLen = 255 - count( $colonSeparator ) - count( $this->comment ); |
| 1096 | + if ( strlen( $defaultSummary ) > $maxLen ) { |
1086 | 1097 | $msg = $newRev->isCurrent() |
1087 | 1098 | ? 'revreview-reject-summary-cur-short' |
1088 | 1099 | : 'revreview-reject-summary-old-short'; |
— | — | @@ -1089,20 +1100,11 @@ |
1090 | 1101 | $wgContLang->formatNum( count( $rejectIds ) ), |
1091 | 1102 | $oldRev->getId(), |
1092 | 1103 | $oldRevAuthor ); |
1093 | | - } else { |
1094 | | - $msg = $newRev->isCurrent() |
1095 | | - ? 'revreview-reject-summary-cur' |
1096 | | - : 'revreview-reject-summary-old'; |
1097 | | - $defaultSummary = wfMsgExt( $msg, array( 'parsemag', 'content' ), |
1098 | | - $wgContLang->formatNum( count( $rejectIds ) ), |
1099 | | - $wgContLang->listToText( $rejectAuthors ), |
1100 | | - $oldRev->getId(), |
1101 | | - $oldRevAuthor ); |
1102 | 1104 | } |
1103 | 1105 | // Append any review comment... |
1104 | 1106 | if ( $this->comment != '' ) { |
1105 | 1107 | if ( $defaultSummary != '' ) { |
1106 | | - $defaultSummary .= wfMsgForContent( 'colon-separator' ); |
| 1108 | + $defaultSummary .= $colonSeparator; |
1107 | 1109 | } |
1108 | 1110 | $defaultSummary .= $this->comment; |
1109 | 1111 | } |