[mrtg-developers] indexmaker bug and patch (2.9.10)

Steve Snodgrass steve.snodgrass at marconi.com
Wed Mar 7 16:25:22 MET 2001


I think I found a bug in indexmaker, but please correct me if I have
misunderstood something, which is entirely possible.  :-)

The problem occurs when using the Directory statement in the config file.  The
indexmaker script seems to take the directory setting into account for the IMG
tags that refer to the graph images, but not for the actual HREF to the HTML
files.  The result is of course a broken link.  I have included a patch which
fixes this, as well as fixing a minor problem with indexmaker issuing a
warning about an uninitialized variable if the pagetop option is not
specified.

---------CUT HERE-----------
*** indexmaker.orig	Tue Mar  6 12:54:36 2001
--- indexmaker	Tue Mar  6 14:30:37 2001
***************
*** 69,74 ****
--- 69,75 ----
  	       sort => 'original',
  	       show => 'day',
  	       section => 'h1',
+ 	       pagetop => '',
  	       columns => 2,
  	       bodyopt => 'bgcolor="#ffffff" text="#000000" '.
  	                  'link="#000000" vlink="#000000" alink="#000000"',
***************
*** 257,263 ****
  			  "SRC=\"$$opt{rrdviewer}?log=$item&png=$$opt{show}.".
  			  "s&small=1\">"
  	    } else {
! 		$index .= "<A HREF=\"$$rcfg{directory_web}{$item}$item." .
  			  "$$rcfg{extension}{$item}\">".
  			  "<IMG BORDER=1 ALT=\"$item Traffic Graph\" ".
  			  "SRC=\"$dirrel$$cfg{imagehtml}$$rcfg{directory_web}{$item}".
--- 258,264 ----
  			  "SRC=\"$$opt{rrdviewer}?log=$item&png=$$opt{show}.".
  			  "s&small=1\">"
  	    } else {
! 		$index .= "<A HREF=\"$dirrel$$rcfg{directory_web}{$item}$item." .
  			  "$$rcfg{extension}{$item}\">".
  			  "<IMG BORDER=1 ALT=\"$item Traffic Graph\" ".
  			  "SRC=\"$dirrel$$cfg{imagehtml}$$rcfg{directory_web}{$item}".
--------CUT HERE-----------

-- 
Steve "Pheran" Snodgrass * steve.snodgrass at marconi.com * Network Engineer
Geek Code: GCS d? s: a- C++ US++++$ P+++ L+ w PS+ 5++ b++ DI+ D++ e++ r++ y+*
"If you want to be somebody else, change your mind."  -Sister Hazel

--
Unsubscribe mailto:mrtg-developers-request at list.ee.ethz.ch?subject=unsubscribe
Help        mailto:mrtg-developers-request at list.ee.ethz.ch?subject=help
Archive     http://www.ee.ethz.ch/~slist/mrtg-developers



More information about the mrtg-developers mailing list