Index: trunk/phase3/includes/logging/LogFormatter.php |
— | — | @@ -157,17 +157,91 @@ |
158 | 158 | |
159 | 159 | $entry = $this->entry; |
160 | 160 | $parameters = $entry->getParameters(); |
161 | | - switch ( $entry ) { |
| 161 | + // Text of title the action is aimed at. |
| 162 | + $target = $entry->getTarget()->getText() ; |
| 163 | + $text = null; |
| 164 | + switch( $entry->getType() ) { |
162 | 165 | case 'move': |
163 | | - if ( $entry->getSubtype() === 'move_redir' ) { |
164 | | - $movesource = $parameters['4::target']; |
165 | | - $movetarget = $entry->getTarget()->getText(); |
166 | | - $text = wfMsg( '1movedto2_redir', $movesource, $movetarget ); |
| 166 | + switch( $entry->getSubtype() ) { |
| 167 | + case 'move': |
| 168 | + $movesource = $parameters['4::target']; |
| 169 | + $text = wfMsg( '1movedto2', $movesource, $target ); |
| 170 | + break; |
| 171 | + case 'move_redir': |
| 172 | + $movesource = $parameters['4::target']; |
| 173 | + $text = wfMsg( '1movedto2_redir', $movesource, $target ); |
| 174 | + break; |
| 175 | + case 'move-noredirect': |
| 176 | + break; |
| 177 | + case 'move_redir-noredirect': |
| 178 | + break; |
167 | 179 | } |
168 | 180 | break; |
169 | | - // case 'delete': |
170 | | - // break |
| 181 | + |
| 182 | + case 'delete': |
| 183 | + switch( $entry->getSubtype() ) { |
| 184 | + case 'delete': |
| 185 | + $text = wfMsg( 'deletedarticle', $target ); |
| 186 | + break; |
| 187 | + case 'restore': |
| 188 | + $text = wfMsg( 'undeletedarticle', $target ); |
| 189 | + break; |
| 190 | + //case 'revision': // Revision deletion |
| 191 | + //case 'event': // Log deletion |
| 192 | + // see https://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/LogPage.php?&pathrev=97044&r1=97043&r2=97044 |
| 193 | + //default: |
| 194 | + } |
| 195 | + break; |
| 196 | + |
| 197 | + case 'patrol': |
| 198 | + // https://svn.wikimedia.org/viewvc/mediawiki/trunk/phase3/includes/PatrolLog.php?&pathrev=97495&r1=97494&r2=97495 |
| 199 | + // Create a diff link to the patrolled revision |
| 200 | + $diffLink = Linker::link( |
| 201 | + $target, |
| 202 | + htmlspecialchars( wfMsg( 'patrol-log-diff', $parameters['4::curid']) ), |
| 203 | + array(), |
| 204 | + /*query parameters */ array( 'oldid'=>$parameters['4::curid'], 'diff' => 'prev' ), |
| 205 | + array( 'known', 'noclasses' ) |
| 206 | + ); |
| 207 | + $link = Linker::link( $entry->getTarget() ); |
| 208 | + |
| 209 | + if ( $entry->getSubtype() === 'patrol' ) { |
| 210 | + // 'patrol-log-line' => 'marked $1 of $2 patrolled $3', |
| 211 | + // 'logentry-irc-patrol-patrol' => '$1 marked revision $4 of page $3 patrolled', |
| 212 | + |
| 213 | + $text = wfMsg( 'patrol-log-line', $diffLink, $link ); |
| 214 | + } elseif ( $entry->getSubtype() === 'patrol-auto' ) { |
| 215 | + // 'patrol-log-line' => 'marked $1 of $2 patrolled $3', |
| 216 | + // 'patrol-log-auto' => '(automatic)', |
| 217 | + // 'logentry-irc-patrol-patrol-auto' => '$1 automatically marked revision $4 of page $3 patrolled', |
| 218 | + // How is this done with old messages? Some abomination to man? |
| 219 | + $text = wfMsg( 'patrol-log-line-auto', $diffLink, $link ); |
| 220 | + } else { |
| 221 | + // broken?? |
| 222 | + } |
| 223 | + break; |
| 224 | + |
| 225 | + case 'newusers': |
| 226 | + switch( $entry->getSubtype() ) { |
| 227 | + case 'newusers': |
| 228 | + case 'create': |
| 229 | + $text = wfMsg( 'newuserlog-create-entry' /* no params */ ); |
| 230 | + break; |
| 231 | + case 'create2': |
| 232 | + $text = wfMsg( 'newuserlog-create2-entry', $target ); |
| 233 | + break; |
| 234 | + case 'autocreate': |
| 235 | + $text = wfMsg( 'newuserlog-autocreate-entry' /* no params */ ); |
| 236 | + break; |
| 237 | + } |
| 238 | + break; |
| 239 | + |
| 240 | + // case 'suppress' --private log -- aaron (sign your messages so we know who to blame in a few years :-D) |
| 241 | + // default: |
171 | 242 | } |
| 243 | + if( is_null( $text ) ) { |
| 244 | + $text = $this->getPlainActionText(); |
| 245 | + } |
172 | 246 | |
173 | 247 | $this->plaintext = false; |
174 | 248 | return $text; |
Index: trunk/phase3/languages/messages/MessagesEn.php |
— | — | @@ -4723,8 +4723,6 @@ |
4724 | 4724 | 'revdelete-content' => 'content', |
4725 | 4725 | 'revdelete-summary' => 'edit summary', |
4726 | 4726 | 'revdelete-uname' => 'username', |
4727 | | -'revdelete-restricted' => 'applied restrictions to administrators', |
4728 | | -'revdelete-unrestricted' => 'removed restrictions for administrators', |
4729 | 4727 | 'revdelete-hid' => 'hid $1', |
4730 | 4728 | 'revdelete-unhid' => 'unhid $1', |
4731 | 4729 | 'revdelete-log-message' => '$1 for $2 {{PLURAL:$2|revision|revisions}}', |
— | — | @@ -4735,6 +4733,15 @@ |
4736 | 4734 | 'patrol-log-line' => 'marked $1 of $2 patrolled $3', |
4737 | 4735 | 'patrol-log-auto' => '(automatic)', |
4738 | 4736 | 'patrol-log-diff' => 'revision $1', |
| 4737 | +'1movedto2' => 'moved [[$1]] to [[$2]]', |
| 4738 | +'1movedto2_redir' => 'moved [[$1]] to [[$2]] over redirect', |
| 4739 | +'move-redirect-suppressed' => 'redirect suppressed', |
| 4740 | +'newuserlog-byemail' => 'password sent by e-mail', |
| 4741 | +'newuserlog-create-entry' => 'New user account', |
| 4742 | +'newuserlog-create2-entry' => 'created new account $1', |
| 4743 | +'newuserlog-autocreate-entry' => 'Account created automatically', |
| 4744 | +'suppressedarticle' => 'suppressed "[[$1]]"', |
| 4745 | +'deletedarticle' => 'deleted "[[$1]]"', |
4739 | 4746 | |
4740 | 4747 | # Feedback |
4741 | 4748 | 'feedback-bugornote' => 'If you are ready to describe a technical problem in detail please [$1 report a bug]. |