Просмотр исходного кода

Added pic_loc config variable and use it for location of png graphics files

sbingner 25 лет назад
Родитель
Сommit
0e7665e2e6
2 измененных файлов с 2 добавлено и 1 удалено
  1. 1 0
      modules/Pisg.pm
  2. 1 1
      modules/Pisg/HTMLGenerator.pm

+ 1 - 0
modules/Pisg.pm

@@ -153,6 +153,7 @@ sub get_default_config_settings
         pic_h_6 => 'green-h.png',
         pic_h_6 => 'green-h.png',
         pic_h_12 => 'yellow-h.png',
         pic_h_12 => 'yellow-h.png',
         pic_h_18 => 'red-h.png',
         pic_h_18 => 'red-h.png',
+        pic_loc => '.',
 
 
         # Stats settings
         # Stats settings
 
 

+ 1 - 1
modules/Pisg/HTMLGenerator.pm

@@ -319,7 +319,7 @@ sub _activetimes
         $image = $self->{cfg}->{$image};
         $image = $self->{cfg}->{$image};
         $self->{debug}->("Image: $image");
         $self->{debug}->("Image: $image");
 
 
-        $output{$hour} = "<td align=\"center\" valign=\"bottom\" class=\"asmall\">$percent%<br><img src=\"$image\" width=\"15\" height=\"$size\" alt=\"$percent\"></td>\n";
+        $output{$hour} = "<td align=\"center\" valign=\"bottom\" class=\"asmall\">$percent%<br><img src=\"$self->{cfg}->{pic_loc}/$image\" width=\"15\" height=\"$size\" alt=\"$percent\"></td>\n";
     }
     }
 
 
     _html("<table border=\"0\" width=\"$self->{cfg}->{tablewidth}\"><tr>\n");
     _html("<table border=\"0\" width=\"$self->{cfg}->{tablewidth}\"><tr>\n");