Index: trunk/extensions/Renameuser/Renameuser_body.php |
— | — | @@ -285,31 +285,49 @@ |
286 | 286 | } |
287 | 287 | |
288 | 288 | $output = ''; |
289 | | - $skin = $wgUser->getSkin(); |
290 | 289 | foreach ( $pages as $row ) { |
291 | 290 | $oldPage = Title::makeTitleSafe( $row->page_namespace, $row->page_title ); |
292 | 291 | $newPage = Title::makeTitleSafe( $row->page_namespace, |
293 | 292 | preg_replace( '!^[^/]+!', $newusername->getDBkey(), $row->page_title ) ); |
294 | 293 | # Do not autodelete or anything, title must not exist |
295 | 294 | if ( $newPage->exists() && !$oldPage->isValidMoveTarget( $newPage ) ) { |
296 | | - $link = $skin->makeKnownLinkObj( $newPage ); |
297 | | - $output .= '<li class="mw-renameuser-pe">' . wfMsgHtml( 'renameuser-page-exists', $link ) . '</li>'; |
| 295 | + $link = Linker::linkKnown( $newPage ); |
| 296 | + $output .= Html::rawElement( |
| 297 | + 'li', |
| 298 | + array( 'class' => 'mw-renameuser-pe' ), |
| 299 | + wfMessage( 'renameuser-page-exists' )->rawParams( $link )->escaped() |
| 300 | + ); |
298 | 301 | } else { |
299 | | - $success = $oldPage->moveTo( $newPage, false, wfMsgForContent( 'renameuser-move-log', |
300 | | - $oldusername->getText(), $newusername->getText() ), !$suppressRedirect ); |
| 302 | + $success = $oldPage->moveTo( |
| 303 | + $newPage, |
| 304 | + false, |
| 305 | + wfMessage( |
| 306 | + 'renameuser-move-log', |
| 307 | + $oldusername->getText(), |
| 308 | + $newusername->getText() )->inContentLanguage()->text(), |
| 309 | + !$suppressRedirect |
| 310 | + ); |
301 | 311 | if ( $success === true ) { |
302 | | - $oldLink = $skin->makeKnownLinkObj( $oldPage, '', 'redirect=no' ); |
303 | | - $newLink = $skin->makeKnownLinkObj( $newPage ); |
304 | | - $output .= '<li class="mw-renameuser-pm">' . wfMsgHtml( 'renameuser-page-moved', $oldLink, $newLink ) . '</li>'; |
| 312 | + $oldLink = Linker::linkKnown( $oldPage, null, array(), array( 'redirect' => 'no' ) ); |
| 313 | + $newLink = Linker::linkKnown( $newPage ); |
| 314 | + $output .= Html::rawElement( |
| 315 | + 'li', |
| 316 | + array( 'class' => 'mw-renameuser-pm' ), |
| 317 | + wfMessage( 'renameuser-page-moved' )->rawParams( $oldLink, $newLink )->escaped() |
| 318 | + ); |
305 | 319 | } else { |
306 | | - $oldLink = $skin->makeKnownLinkObj( $oldPage ); |
307 | | - $newLink = $skin->makeLinkObj( $newPage ); |
308 | | - $output .= '<li class="mw-renameuser-pu">' . wfMsgHtml( 'renameuser-page-unmoved', $oldLink, $newLink ) . '</li>'; |
| 320 | + $oldLink = Linker::linkKnown( $oldPage ); |
| 321 | + $newLink = Linker::link( $newPage ); |
| 322 | + $output .= Html::rawElement( |
| 323 | + 'li', array( 'class' => 'mw-renameuser-pu' ), |
| 324 | + wfMessage( 'renameuser-page-unmoved' )->rawParams( $oldLink, $newLink )->escaped() |
| 325 | + ); |
309 | 326 | } |
310 | 327 | } |
311 | 328 | } |
312 | | - if ( $output ) |
313 | | - $wgOut->addHTML( '<ul>' . $output . '</ul>' ); |
| 329 | + if ( $output ) { |
| 330 | + $wgOut->addHTML( Html::rawElement( 'ul', array(), $output ) ); |
| 331 | + } |
314 | 332 | } |
315 | 333 | |
316 | 334 | // Output success message stuff :) |