From: Alexandre Emsenhuber Date: Tue, 7 Apr 2009 16:37:29 +0000 (+0000) Subject: * Use Linker::link() X-Git-Tag: 1.31.0-rc.0~42200 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/comptes/journal.php?a=commitdiff_plain;h=523b1cda3829ecd333a7612c61544134a8795dbc;p=lhc%2Fweb%2Fwiklou.git * Use Linker::link() * Whitespaces tweak --- diff --git a/includes/ImagePage.php b/includes/ImagePage.php index 61ce97d863..800c418f49 100644 --- a/includes/ImagePage.php +++ b/includes/ImagePage.php @@ -787,14 +787,13 @@ class ImageHistoryList { $row .= ''; # Link to remove from history if( $wgUser->isAllowed( 'delete' ) ) { - $q = array(); - $q[] = 'action=delete'; + $q = array( 'action' => 'delete' ); if( !$iscur ) - $q[] = 'oldimage=' . urlencode( $img ); - $row .= $this->skin->makeKnownLinkObj( + $q['oldimage'] = $img; + $row .= $this->skin->link( $this->title, wfMsgHtml( $iscur ? 'filehist-deleteall' : 'filehist-deleteone' ), - implode( '&', $q ) + array(), $q, array( 'known' ) ); } # Link to hide content @@ -808,10 +807,12 @@ class ImageHistoryList { $del = wfMsgHtml( 'rev-delundel' ); } else { // If the file was hidden, link to sha-1 - list($ts,$name) = explode('!',$img,2); - $del = $this->skin->makeKnownLinkObj( $revdel, wfMsg( 'rev-delundel' ), - 'target=' . urlencode( $wgTitle->getPrefixedText() ) . - '&oldimage=' . urlencode( $ts ) ); + list( $ts, $name ) = explode( '!', $img, 2 ); + $del = $this->skin->link( $revdel, wfMsgHtml( 'rev-delundel' ), + array(), + array( 'target' => $wgTitle->getPrefixedText(), 'oldimage' => $ts ), + array( 'known' ) + ); // Bolden oversighted content if( $file->isDeleted(File::DELETED_RESTRICTED) ) $del = "$del";