From ae0f2dde69cc92591af5c58991eb1b848a656f28 Mon Sep 17 00:00:00 2001 From: River Tarnell Date: Wed, 29 Jun 2005 01:52:39 +0000 Subject: [PATCH] don't hyperlink first/last if we're already there --- includes/PageHistory.php | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/includes/PageHistory.php b/includes/PageHistory.php index ff1c1a49cd..2e7ee14b23 100644 --- a/includes/PageHistory.php +++ b/includes/PageHistory.php @@ -77,8 +77,6 @@ class PageHistory { $firsttext = wfMsg("histfirst"); $lasttext = wfMsg("histlast"); - $firstlast = "($firsttext | $lasttext)"; - /* Check one extra row to see whether we need to show 'next' and diff links */ $limitplus = $limit + 1; @@ -151,12 +149,17 @@ class PageHistory { "action=history&offset={$offset}&limit={$num}")."\">".$wgLang->formatNum($num).""; } $bits = implode($urls, ' | '); - if ($offset) + if ($offset) { $prevtext = "".wfMsg("prevn", $limit).""; - else $prevtext = wfMsg("prevn", $limit); - if ($revs >= $limitplus) + $lasttext = "$lasttext"; + } else $prevtext = wfMsg("prevn", $limit); + + if ($revs >= $limitplus) { $nexttext = "".wfMsg("nextn", $limit).""; - else $nexttext = wfMsg("nextn", $limit); + $firsttext = "$firsttext"; + } else $nexttext = wfMsg("nextn", $limit); + + $firstlast = "($firsttext | $lasttext)"; $numbar = "$firstlast " . wfMsg("viewprevnext", $prevtext, $nexttext, $bits); -- 2.20.1