$atend = ($revs < $limitplus);
$this->mSkin = $wgUser->getSkin();
- $s = wfMsg( "history_copyright" );
- if ( $s == " " ) {
- $s = "";
- }
-
$numbar = wfViewPrevNext(
$offset, $limit,
$this->mTitle->getPrefixedText(),
"action=history", $atend );
- $s .= $numbar;
+ $s = $numbar;
if($this->linesonpage > 0) {
$submitpart1 = '<input class="historysubmit" type="submit" accesskey="'.wfMsg('accesskey-compareselectedversions').
'" title="'.wfMsg('tooltip-compareselectedversions').'" value="'.wfMsg('compareselectedversions').'"';
class RCCacheEntry extends RecentChange
{
var $secureName, $link;
- var $curlink , $lastlink , $usertalklink , $versionlink ;
+ var $curlink , $difflink, $lastlink , $usertalklink , $versionlink ;
var $userlink, $timestamp, $watched;
function newFromParent( $rc )
}
function getCopyright() {
- global $wgRightsPage, $wgRightsUrl, $wgRightsText;
+ global $wgRightsPage, $wgRightsUrl, $wgRightsText, $wgRequest;
+
+
+ $oldid = $wgRequest->getVal( 'oldid' );
+ $diff = $wgRequest->getVal( 'diff' );
+
+ if ( !is_null( $oldid ) && is_null( $diff ) && wfMsg( 'history_copyright' ) !== '-' ) {
+ $msg = 'history_copyright';
+ } else {
+ $msg = 'copyright';
+ }
+
$out = '';
if( $wgRightsPage ) {
$link = $this->makeKnownLink( $wgRightsPage, $wgRightsText );
# Give up now
return $out;
}
- $out .= wfMsg( 'copyright', $link );
+ $out .= wfMsg( $msg, $link );
return $out;
}
$fname = 'Skin::makeKnownLinkObj';
wfProfileIn( $fname );
+ if ( !is_object( $nt ) ) {
+ return $text;
+ }
$link = $nt->getPrefixedURL();
if ( '' == $link ) {
if ( $rcObj->watched ) $link = '<strong>'.$link.'</strong>' ;
$r .= $link ;
- # Cur
+ # Diff
$r .= ' (' ;
- $r .= $rcObj->curlink ;
+ $r .= $rcObj->difflink ;
$r .= '; ' ;
# Hist
$rc->link = $clink ;
$rc->timestamp = $time;
- # Make "cur" link
+ # Make "cur" and "diff" links
if ( ( $rc_type == RC_NEW && $rc_this_oldid == 0 ) || $rc_type == RC_LOG || $rc_type == RC_MOVE) {
$curLink = wfMsg( 'cur' );
- } else {
- $curLink = $this->makeKnownLinkObj( $rc->getTitle(), wfMsg( 'cur' ),
- $curIdEq.'&diff=0&oldid='.$rc_this_oldid ,'' ,'' , ' tabindex="'.$baseRC->counter.'"' );
+ $diffLink = wfMsg( 'diff' );
+ } else {
+ $query = $curIdEq.'&diff=0&oldid='.$rc_this_oldid;
+ $aprops = ' tabindex="'.$baseRC->counter.'"';
+ $curLink = $this->makeKnownLinkObj( $rc->getTitle(), wfMsg( 'cur' ), $query, '' ,'' , $aprops );
+ $diffLink = $this->makeKnownLinkObj( $rc->getTitle(), wfMsg( 'diff'), $query, '' ,'' , $aprops );
}
# Make "last" link
$rc->userlink = $userLink ;
$rc->lastlink = $lastLink ;
$rc->curlink = $curLink ;
+ $rc->difflink = $diffLink;
+
# Make user talk link
$utns=$wgLang->getNsText(NS_USER_TALK);
}
$tpl->set('lastmod', $this->lastModified());
$tpl->set('copyright',$this->getCopyright());
+ } elseif ( isset( $oldid ) && !isset( $diff ) ) {
+ $tpl->set('copyright', $this->getCopyright());
}
+
$tpl->set( "copyrightico", $this->getCopyrightIcon() );
$tpl->set( "poweredbyico", $this->getPoweredBy() );
$tpl->set( "disclaimer", $this->disclaimerLink() );