Index: trunk/phase3/includes/logging/LogFormatter.php |
— | — | @@ -226,6 +226,20 @@ |
227 | 227 | } |
228 | 228 | break; |
229 | 229 | |
| 230 | + case 'protect': |
| 231 | + switch( $entry->getSubtype() ) { |
| 232 | + case 'protect': |
| 233 | + $text = wfMsgExt( 'protectedarticle', $msgOpts, $target . ' ' . $parameters[0] ); |
| 234 | + break; |
| 235 | + case 'unprotect': |
| 236 | + $text = wfMsgExt( 'unprotectedarticle', $msgOpts, $target ); |
| 237 | + break; |
| 238 | + case 'modify': |
| 239 | + $text = wfMsgExt( 'modifiedarticleprotection', $msgOpts, $target . ' ' . $parameters[0] ); |
| 240 | + break; |
| 241 | + } |
| 242 | + break; |
| 243 | + |
230 | 244 | case 'newusers': |
231 | 245 | switch( $entry->getSubtype() ) { |
232 | 246 | case 'newusers': |
Index: trunk/phase3/tests/phpunit/includes/RecentChangeTest.php |
— | — | @@ -161,12 +161,15 @@ |
162 | 162 | * @covers LogFormatter::getIRCActionText |
163 | 163 | */ |
164 | 164 | function testIrcMsgForLogTypeProtect() { |
| 165 | + $protectParams = array( |
| 166 | + '[edit=sysop] (indefinite) [move=sysop] (indefinite)' |
| 167 | + ); |
165 | 168 | |
166 | 169 | # protect/protect |
167 | 170 | $this->assertIRCComment( |
168 | | - wfMessage( 'protectedarticle', 'SomeTitle' )->plain() . ': ' . $this->user_comment, |
| 171 | + wfMessage( 'protectedarticle', 'SomeTitle ' . $protectParams[0] )->plain() . ': ' . $this->user_comment, |
169 | 172 | 'protect', 'protect', |
170 | | - array(), |
| 173 | + $protectParams, |
171 | 174 | $this->user_comment |
172 | 175 | ); |
173 | 176 | |
— | — | @@ -180,9 +183,9 @@ |
181 | 184 | |
182 | 185 | # protect/modify |
183 | 186 | $this->assertIRCComment( |
184 | | - wfMessage( 'modifiedarticleprotection', 'SomeTitle' )->plain() . ': ' . $this->user_comment, |
| 187 | + wfMessage( 'modifiedarticleprotection', 'SomeTitle ' . $protectParams[0] )->plain() . ': ' . $this->user_comment, |
185 | 188 | 'protect', 'modify', |
186 | | - array(), |
| 189 | + $protectParams, |
187 | 190 | $this->user_comment |
188 | 191 | ); |
189 | 192 | } |