From: Tim Starling Date: Mon, 21 Jun 2004 07:55:16 +0000 (+0000) Subject: moving new history copyright text to the bottom of revisions, making '-' the default... X-Git-Tag: 1.5.0alpha1~2801 X-Git-Url: http://git.cyclocoop.org/%24image?a=commitdiff_plain;h=8139bda498dca3f14132acc9a5cf1c29d7849d75;p=lhc%2Fweb%2Fwiklou.git moving new history copyright text to the bottom of revisions, making '-' the default text --- diff --git a/includes/PageHistory.php b/includes/PageHistory.php index 012e9f4900..56f673fa74 100644 --- a/includes/PageHistory.php +++ b/includes/PageHistory.php @@ -74,16 +74,11 @@ class PageHistory { $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 = '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 ); @@ -882,7 +893,7 @@ class Skin { # Give up now return $out; } - $out .= wfMsg( 'copyright', $link ); + $out .= wfMsg( $msg, $link ); return $out; } @@ -1567,6 +1578,9 @@ class Skin { $fname = 'Skin::makeKnownLinkObj'; wfProfileIn( $fname ); + if ( !is_object( $nt ) ) { + return $text; + } $link = $nt->getPrefixedURL(); if ( '' == $link ) { @@ -2086,9 +2100,9 @@ class Skin { if ( $rcObj->watched ) $link = ''.$link.'' ; $r .= $link ; - # Cur + # Diff $r .= ' (' ; - $r .= $rcObj->curlink ; + $r .= $rcObj->difflink ; $r .= '; ' ; # Hist @@ -2402,12 +2416,15 @@ class Skin { $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 @@ -2431,6 +2448,8 @@ class Skin { $rc->userlink = $userLink ; $rc->lastlink = $lastLink ; $rc->curlink = $curLink ; + $rc->difflink = $diffLink; + # Make user talk link $utns=$wgLang->getNsText(NS_USER_TALK); diff --git a/includes/SkinPHPTal.php b/includes/SkinPHPTal.php index de1bb44345..f56360f60f 100644 --- a/includes/SkinPHPTal.php +++ b/includes/SkinPHPTal.php @@ -177,7 +177,10 @@ } $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() ); diff --git a/languages/Language.php b/languages/Language.php index b0521591cd..670060cee4 100644 --- a/languages/Language.php +++ b/languages/Language.php @@ -592,7 +592,7 @@ Please check the URL you used to access this page.\n", 'histlegend' => 'Diff selection: mark the radio boxes of the versions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with current version, (last) = difference with preceding version, M = minor edit.', -'history_copyright' => ' ', +'history_copyright' => '-', # Diffs #