From cfd33ae00976825a143f91795cc0d12298f4e9b1 Mon Sep 17 00:00:00 2001 From: Joern-Ingo Weigert Date: Sat, 2 Mar 2013 22:34:20 +0100 Subject: [PATCH] updatexlrator.cgi: Vendor icon "updxl-src-unknown.gif" are used, regardless of presence in image-dir. Fixes #10254. --- html/cgi-bin/updatexlrator.cgi | 57 ++++++------------ .../images/updbooster/updxl-src-microsoft.gif | Bin 0 -> 183 bytes .../images/updbooster/updxl-src-windows.gif | Bin 1052 -> 183 bytes 3 files changed, 20 insertions(+), 37 deletions(-) create mode 100644 html/html/images/updbooster/updxl-src-microsoft.gif 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 0000000000000000000000000000000000000000..14f3c42cef555d53fbdafc8069b1c3bb02193f6a GIT binary patch literal 183 zc-nLKbhEHb6k-r!c+AW2Em(wM;YY@W?`w85{NK&+d&|s;*M1y(IPw3(iGS~3KL7U5 zvrp&$0}%`;{u6XAN=+&q zl57CBY5>`10R3eE0G9wGl>kPP0BVl_jg0`YiU8Dz0QiLf0J#7jwg5r20A;ZNh_3*w ztN_oc0Q08+0NDT;*8n`!0ASGogUC0Q&$F_y9Nd09*3_e(?aJ?f}K> z0O{!f5)xfC5L;LcSbPgsp9oXK1yJS#PX7Q)4Kr9UFjiA8Q+F#-nki1cCQIQXN&g{6 z2vbulQBh7#PI602l}SmtMn>F3ME^lS19eU&a!g5ZNo{RLkZVM=XhGLyKKo-l0F_B0 zlSV|4L}-pdi;F+6h&vhOIfOsyEH3HSwh~0M|bk)jT@V zI$qE>fz36g$}-5vFYLuF0Qou+_ct~4HCgd8eD5!y>@CCUD(B}Y5D=&{4y9HLqIwCS zo(7)51DoXmnEwEl3^AiFE}&5?o^>gkm?oIKB$nVIlm8!)22q|VPn%3knQ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