From 14fca0ad07683314ee51f3c14df4a48ef22ab1a1 Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Tue, 11 Oct 2011 10:58:43 +0000 Subject: [PATCH] fix links for rancid svn support git-svn-id: http://www.observium.org/svn/observer/trunk@2679 61d68cd4-352d-0410-923a-c4978735b2b8 --- contrib/generate-dnstext.php | 5 +++-- html/pages/device/showconfig.inc.php | 19 ++++++++++--------- 2 files changed, 13 insertions(+), 11 deletions(-) diff --git a/contrib/generate-dnstext.php b/contrib/generate-dnstext.php index 23c84e270..ac75c729b 100755 --- a/contrib/generate-dnstext.php +++ b/contrib/generate-dnstext.php @@ -1,8 +1,9 @@ #!/usr/bin/env php = "7") echo("Config » "); - if (!$_GET['optc']) { + if (!$vars['rev']) { echo(''); - echo(" Latest"); + echo(generate_link('Latest',array('page'=>'device','device'=>$device['device_id'],'tab'=>'showconfig'))); echo(""); } else { - echo(" Latest"); + echo(generate_link('Latest',array('page'=>'device','device'=>$device['device_id'],'tab'=>'showconfig'))); } if (function_exists('svn_log')) { @@ -40,10 +40,11 @@ if ($_SESSION['userlevel'] >= "7") echo($sep); $revlist[] = $svnlog["rev"]; - if ($_GET['optc'] == $svnlog["rev"]) { echo(''); } + if ($vars['rev'] == $svnlog["rev"]) { echo(''); } + $linktext = "r" . $svnlog["rev"] ." ". date("d M H:i", strtotime($svnlog["date"])) . ""; + echo(generate_link($linktext,array('page'=>'device','device'=>$device['device_id'],'tab'=>'showconfig','rev'=>$svnlog["rev"]))); - echo(" r" . $svnlog["rev"] ." ". date("d M H:i", strtotime($svnlog["date"])) . ""); - if ($_GET['optc'] == $svnlog["rev"]) { echo(""); } + if ($vars['rev'] == $svnlog["rev"]) { echo(""); } $sep = " | "; } @@ -51,8 +52,8 @@ if ($_SESSION['userlevel'] >= "7") print_optionbar_end(); - if (function_exists('svn_log') && in_array($_GET['optc'], $revlist)) { - list($diff, $errors) = svn_diff($file, $_GET['optc']-1, $file, $_GET['optc']); + if (function_exists('svn_log') && in_array($vars['rev'], $revlist)) { + list($diff, $errors) = svn_diff($file, $vars['rev']-1, $file, $vars['rev']); if (!$diff) { $text = "No Difference"; } else { @@ -85,4 +86,4 @@ if ($_SESSION['userlevel'] >= "7") #$geshi->set_line_style('color: #999999'); echo($geshi->parse_code()); } -?> \ No newline at end of file +?>