Index: trunk/extensions/CentralAuth/CentralAuth.php |
— | — | @@ -248,20 +248,24 @@ |
249 | 249 | |
250 | 250 | function efHandleWikiSetLogEntry( $type, $action, $title, $skin, $params, $filterWikilinks = false ) { |
251 | 251 | $link = $skin ? $skin->makeLinkObj( $title, $params[0] ) : $params[0]; |
252 | | - if ( $action == 'newset' ) { |
253 | | - $args = array( WikiSet::formatType( $params[1] ), $params[2] ); |
| 252 | + |
| 253 | + switch( $action ) { |
| 254 | + case 'newset': |
| 255 | + $args = array( WikiSet::formatType( $params[1] ), $params[2] ); |
| 256 | + break; |
| 257 | + case 'setrename': |
| 258 | + $args = array( $params[1] ); |
| 259 | + break; |
| 260 | + case 'setnewtype': |
| 261 | + $args = array( WikiSet::formatType( $params[1] ), WikiSet::formatType( $params[2] ) ); |
| 262 | + break; |
| 263 | + case 'setchange': |
| 264 | + $args = array( $params[1] |
| 265 | + ? $params[1] : wfMsg( 'rightsnone' ), $params[2] ? $params[2] : wfMsg( 'rightsnone' ) ); |
| 266 | + break; |
| 267 | + default: //'deleteset' |
| 268 | + $args = array(); |
254 | 269 | } |
255 | | - if ( $action == 'setrename' ) { |
256 | | - $args = array( $params[1] ); |
257 | | - } |
258 | | - if ( $action == 'setnewtype' ) { |
259 | | - $args = array( WikiSet::formatType( $params[1] ), WikiSet::formatType( $params[2] ) ); |
260 | | - } |
261 | | - if ( $action == 'setchange' ) { |
262 | | - $args = array( $params[1] ? $params[1] : wfMsg( 'rightsnone' ), $params[2] ? $params[2] : wfMsg( 'rightsnone' ) ); |
263 | | - } |
264 | | - if ( $action == 'deleteset' ) { |
265 | | - $args = array(); |
266 | | - } |
| 270 | + |
267 | 271 | return wfMsgReal( "centralauth-rightslog-entry-{$action}", array_merge( array( $link ), $args ), true, !$skin ); |
268 | 272 | } |