X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=html%2Fcgi-bin%2Fupdatexlrator.cgi;h=6cd9668db893ccee7162c3747eeeb07c83f3cb4f;hb=4d81e0f3812fc272b2515a631a2e98c4ae76a42b;hp=04b7b8ee68b7020286b11e346b0bcdab5ee47e32;hpb=30736cd3fc24cae4487a0cdb39f2763538900ae9;p=people%2Fteissler%2Fipfire-2.x.git
diff --git a/html/cgi-bin/updatexlrator.cgi b/html/cgi-bin/updatexlrator.cgi
index 04b7b8ee6..6cd9668db 100644
--- a/html/cgi-bin/updatexlrator.cgi
+++ b/html/cgi-bin/updatexlrator.cgi
@@ -27,6 +27,11 @@
# along with this program. If not, see . #
# #
###############################################################################
+#
+# Changelog:
+# 2012-10-27: nightshift - Bugfix regarding showing wrong vendor icon while Download of new Updates
+# 2012-10-27: nightshift - Optimizing logic of check for vendor icons
+#
use strict;
@@ -75,6 +80,7 @@ my @vendors=();
my %vendorstats=();
my $repository = "/var/updatecache/";
+my $webhome = "/srv/web/ipfire/html";
my $hintcolour = '#FFFFCC';
my $colourgray = '#808080';
@@ -511,7 +517,7 @@ END
$id = 0;
foreach $updatefile (@downloadfiles)
{
- $updatefile =~ s/.*://;
+ $updatefile =~ s/.*:download/download/;
my $size_updatefile = 0;
my $mtime = 0;
if(-e "$repository/$updatefile") {
@@ -549,46 +555,23 @@ END
print " \n";
}
- print "\t\t
";
- if ($vendorid =~ /^Adobe$/i)
- {
- print " | \n";
- } elsif ($vendorid =~ /^Microsoft$/i)
- {
- print " \n";
- } elsif ($vendorid =~ /^Symantec$/i)
- {
- print " \n";
- } elsif ($vendorid =~ /^Linux$/i)
- {
- print " \n";
- } elsif ($vendorid =~ /^TrendMicro$/i)
- {
- print " \n";
- } elsif ($vendorid =~ /^Apple$/i)
- {
- print " \n";
- } elsif ($vendorid =~ /^Avast$/i)
- {
- print " \n";
- } else
- {
- if (-e "/home/httpd/html/images/updbooster/updxl-src-" . $vendorid . ".gif")
- {
- print " \n";
- } else {
- print " \n";
- }
- }
+ print "\t\t ";
- $shortname = substr($updatefile,rindex($updatefile,"/")+1);
- $shortname =~ s/(.*)_[\da-f]*(\.(exe|cab|psf)$)/$1_*$2/i;
+ if (($vendorid ne '') && (-e "$webhome/images/updbooster/updxl-src-$vendorid.gif"))
+ {
+ print " | \n";
+ } else {
+ print " \n";
+ }
- $filesize = $dlinfo{'REMOTESIZE'};
- 1 while $filesize =~ s/^(-?\d+)(\d{3})/$1.$2/;
- $dlinfo{'VENDORID'}=ucfirst $vendorid;
+ $shortname = substr($updatefile,rindex($updatefile,"/")+1);
+ $shortname =~ s/(.*)_[\da-f]*(\.(exe|cab|psf)$)/$1_*$2/i;
- print < $dlinfo{'VENDORID'}
$shortname |
$filesize |
@@ -988,7 +971,8 @@ foreach (@sources)
{
next if(/\.info$/);
$updatefile = substr($_,rindex($_,"/")+1);
- $updatefile .= ":download/$vendorid/$updatefile";
+ $_ = $updatefile; tr/[A-Z]/[a-z]/;
+ $updatefile = "$_:separator:download/$vendorid/$updatefile";
$updatefile = " ".$updatefile;
push(@repositoryfiles,$updatefile);
}
@@ -1019,7 +1003,7 @@ foreach (@sources)
chomp($sourceurl);
$updatefile = substr($sourceurl,rindex($sourceurl,'/')+1,length($sourceurl));
$_ = $updatefile; tr/[A-Z]/[a-z]/;
- $updatefile = "$_:$vendorid/$uuid/$updatefile";
+ $updatefile = "$_:separator:$vendorid/$uuid/$updatefile";
push(@repositoryfiles,$updatefile);
}
}
@@ -1162,7 +1146,7 @@ END
$id = 0;
foreach $updatefile (@files)
{
- $updatefile =~ s/.*://;
+ $updatefile =~ s/.*:separator://;
my $size_updatefile = 0;
my $mtime = 0;
if(-e "$repository/$updatefile") {
@@ -1362,7 +1346,7 @@ sub printlegendicons
|
$Lang::tr{'updxlrtr last checkup'} |
|
- |
+ |
$Lang::tr{'updxlrtr remove file'} |
|
|