From: Joern-Ingo Weigert Date: Sat, 2 Mar 2013 21:34:20 +0000 (+0100) Subject: updatexlrator.cgi: Vendor icon "updxl-src-unknown.gif" are used, regardless of presen... X-Git-Tag: v2.13-core67~10^2~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=cfd33ae00976825a143f91795cc0d12298f4e9b1;p=people%2Fms%2Fipfire-2.x.git updatexlrator.cgi: Vendor icon "updxl-src-unknown.gif" are used, regardless of presence in image-dir. Fixes #10254. --- diff --git a/html/cgi-bin/updatexlrator.cgi b/html/cgi-bin/updatexlrator.cgi index e3e633cc4f..df77a86afd 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  diff --git a/html/html/images/updbooster/updxl-src-microsoft.gif b/html/html/images/updbooster/updxl-src-microsoft.gif new file mode 100644 index 0000000000..14f3c42cef Binary files /dev/null and b/html/html/images/updbooster/updxl-src-microsoft.gif differ diff --git a/html/html/images/updbooster/updxl-src-windows.gif b/html/html/images/updbooster/updxl-src-windows.gif index 3b34016e70..14f3c42cef 100644 Binary files a/html/html/images/updbooster/updxl-src-windows.gif and b/html/html/images/updbooster/updxl-src-windows.gif differ