X-Git-Url: http://git.ipfire.org/?a=blobdiff_plain;f=html%2Fcgi-bin%2Fupdatexlrator.cgi;h=df77a86afdb2e690464d0b3d23b96821a7631bca;hb=e3c1704453af2ec96e9c99f5f3ed8a2e0979d072;hp=e3e633cc4fdf81ff21d35f04875c3894b2cb975e;hpb=ecd0ac08a56363fd779bcd08d70a4720f99a33db;p=people%2Fteissler%2Fipfire-2.x.git diff --git a/html/cgi-bin/updatexlrator.cgi b/html/cgi-bin/updatexlrator.cgi index e3e633cc4..df77a86af 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'; @@ -549,46 +555,23 @@ END print "$Lang::tr{ \n"; } - print "\t\t "; - if ($vendorid =~ /^Adobe$/i) - { - print "Adobe \n"; - } elsif ($vendorid =~ /^Microsoft$/i) - { - print "Microsoft \n"; - } elsif ($vendorid =~ /^Symantec$/i) - { - print "Symantec \n"; - } elsif ($vendorid =~ /^Linux$/i) - { - print "Linux \n"; - } elsif ($vendorid =~ /^TrendMicro$/i) - { - print "Trend Micro \n"; - } elsif ($vendorid =~ /^Apple$/i) - { - print "Apple \n"; - } elsif ($vendorid =~ /^Avast$/i) - { - print "Avast \n"; - } else - { - if (-e "/home/httpd/html/images/updbooster/updxl-src-" . $vendorid . ".gif") - { - print "" . ucfirst $vendorid . " \n"; - } else { - print "" . ucfirst $vendorid . " \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 "" . ucfirst $vendorid . " \n"; + } else { + print "" . ucfirst $vendorid . " \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