X-Git-Url: https://git.cyclocoop.org/%28%28?a=blobdiff_plain;f=includes%2FSpecialContributions.php;h=9a97865780b5187ff70e82832962b3ca2a394013;hb=14052ee5e5ce0fa7809600f6cc172a39f55b29ad;hp=d90540fb2ff3889348f500a910d0d6bd3a348ac8;hpb=ba6b4c048e434ddc495e96976a9f12aea208449c;p=lhc%2Fweb%2Fwiklou.git diff --git a/includes/SpecialContributions.php b/includes/SpecialContributions.php index d90540fb2f..9a97865780 100644 --- a/includes/SpecialContributions.php +++ b/includes/SpecialContributions.php @@ -13,7 +13,7 @@ * @param string $par (optional) user name of the user for which to show the contributions */ function wfSpecialContributions( $par = '' ) { - global $wgUser, $wgOut, $wgLang, $wgRequest; + global $wgUser, $wgOut, $wgLang, $wgContLang, $wgRequest; $fname = "wfSpecialContributions"; if( $par ) @@ -69,12 +69,12 @@ function wfSpecialContributions( $par = '' ) { if ( $hideminor ) { $cmq = "AND cur_minor_edit=0"; $omq = "AND old_minor_edit=0"; - $mlink = $sk->makeKnownLink( $wgLang->specialPage( "Contributions" ), + $mlink = $sk->makeKnownLink( $wgContLang->specialPage( "Contributions" ), WfMsg( "show" ), "target=" . htmlspecialchars( $nt->getPrefixedURL() ) . "&offset={$offset}&limit={$limit}&hideminor=0" ); } else { $cmq = $omq = ""; - $mlink = $sk->makeKnownLink( $wgLang->specialPage( "Contributions" ), + $mlink = $sk->makeKnownLink( $wgContLang->specialPage( "Contributions" ), WfMsg( "hide" ), "target=" . htmlspecialchars( $nt->getPrefixedURL() ) . "&offset={$offset}&limit={$limit}&hideminor=1" ); } @@ -106,7 +106,7 @@ function wfSpecialContributions( $par = '' ) { $wgOut->addHTML( "

{$top}\n" ); $sl = wfViewPrevNext( $offset, $limit, - $wgLang->specialpage( "Contributions" ), + $wgContLang->specialpage( "Contributions" ), "hideminor={$hideminor}&target=" . wfUrlEncode( $target ), ($nCur + $nOld) <= $offlimit); @@ -189,54 +189,55 @@ function wfSpecialContributions( $par = '' ) { function ucListEdit( $sk, $ns, $t, $ts, $topmark, $comment, $isminor, $isnew, $target, $oldid ) { global $wgLang, $wgOut, $wgUser, $wgRequest; $page = Title::makeName( $ns, $t ); - $link = $sk->makeKnownLink( $page, "" ); - $topmarktext=""; + $link = $sk->makeKnownLink( $page, '' ); + $difftext = $topmarktext = ''; if($topmark) { + $topmarktext .= '' . wfMsg('uctop') . ''; if(!$isnew) { - $topmarktext .= $sk->makeKnownLink( $page, wfMsg("uctop"), "diff=0" ); + $difftext .= $sk->makeKnownLink( $page, '(' . wfMsg('diff') . ')', 'diff=0' ); } else { - $topmarktext .= wfMsg("newarticle"); + $difftext .= wfMsg('newarticle'); } $sysop = $wgUser->isSysop(); if($sysop ) { - $extraRollback = $wgRequest->getBool( "bot" ) ? '&bot=1' : ''; + $extraRollback = $wgRequest->getBool( 'bot' ) ? '&bot=1' : ''; # $target = $wgRequest->getText( 'target' ); - $topmarktext .= " [". $sk->makeKnownLink( $page, - wfMsg( "rollbacklink" ), - "action=rollback&from=" . urlencode( $target ) . $extraRollback ) ."]"; + $topmarktext .= ' ['. $sk->makeKnownLink( $page, + wfMsg( 'rollbacklink' ), + 'action=rollback&from=' . urlencode( $target ) . $extraRollback ) .']'; } } if ( $oldid ) { - $oldtext= $sk->makeKnownLink( $page, '('.wfMsg('diff').')', 'diff=prev&oldid='.$oldid ); - } else { $oldtext=''; } - $histlink="(".$sk->makeKnownLink($page,wfMsg("hist"),"action=history").")"; + $difftext= $sk->makeKnownLink( $page, '('.wfMsg('diff').')', 'diff=prev&oldid='.$oldid ); + } + $histlink='('.$sk->makeKnownLink($page,wfMsg('hist'),'action=history').')'; if($comment) { - $comment="(". $sk->formatComment($comment, Title::newFromText($t) ) .") "; + $comment='('. $sk->formatComment($comment, Title::newFromText($t) ) .') '; } $d = $wgLang->timeanddate( $ts, true ); if ($isminor) { - $mflag = ''.wfMsg( "minoreditletter" ).' '; + $mflag = ''.wfMsg( 'minoreditletter' ).' '; } else { - $mflag = ""; + $mflag = ''; } - $wgOut->addHTML( "

  • {$d} {$histlink} {$mflag} {$link} {$comment}{$topmarktext}{$oldtext}
  • \n" ); + $wgOut->addHTML( "
  • {$d} {$histlink} {$difftext} {$mflag} {$link} {$comment} {$topmarktext}
  • \n" ); } /** * */ function ucCountLink( $lim, $d ) { - global $wgUser, $wgLang, $wgRequest; + global $wgUser, $wgContLang, $wgRequest; $target = $wgRequest->getText( 'target' ); $sk = $wgUser->getSkin(); - $s = $sk->makeKnownLink( $wgLang->specialPage( "Contributions" ), + $s = $sk->makeKnownLink( $wgContLang->specialPage( "Contributions" ), "{$lim}", "target={$target}&days={$d}&limit={$lim}" ); return $s; } @@ -245,11 +246,11 @@ function ucCountLink( $lim, $d ) { * */ function ucDaysLink( $lim, $d ) { - global $wgUser, $wgLang, $wgRequest; + global $wgUser, $wgContLang, $wgRequest; $target = $wgRequest->getText( 'target' ); $sk = $wgUser->getSkin(); - $s = $sk->makeKnownLink( $wgLang->specialPage( "Contributions" ), + $s = $sk->makeKnownLink( $wgContLang->specialPage( "Contributions" ), "{$d}", "target={$target}&days={$d}&limit={$lim}" ); return $s; }