mirror of
https://github.com/vincentmli/bpfire.git
synced 2026-04-27 03:07:43 +02:00
updatexlrator.cgi: Vendor icon "updxl-src-unknown.gif" are used, regardless of presence in image-dir.
Fixes #10254.
This commit is contained in:
committed by
Stefan Schantl
parent
4f6b044f7f
commit
cfd33ae009
@@ -27,6 +27,11 @@
|
||||
# along with this program. If not, see <http://www.gnu.org/licenses/>. #
|
||||
# #
|
||||
###############################################################################
|
||||
#
|
||||
# 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 "<img src='/images/updbooster/updxl-led-gray.gif' alt='$Lang::tr{'updxlrtr condition suspended'}' /> </td>\n";
|
||||
}
|
||||
|
||||
print "\t\t<td align='center' nowrap='nowrap'> ";
|
||||
if ($vendorid =~ /^Adobe$/i)
|
||||
{
|
||||
print "<img src='/images/updbooster/updxl-src-adobe.gif' alt='Adobe'}' /> </td>\n";
|
||||
} elsif ($vendorid =~ /^Microsoft$/i)
|
||||
{
|
||||
print "<img src='/images/updbooster/updxl-src-windows.gif' alt='Microsoft'}' /> </td>\n";
|
||||
} elsif ($vendorid =~ /^Symantec$/i)
|
||||
{
|
||||
print "<img src='/images/updbooster/updxl-src-symantec.gif' alt='Symantec'}' /> </td>\n";
|
||||
} elsif ($vendorid =~ /^Linux$/i)
|
||||
{
|
||||
print "<img src='/images/updbooster/updxl-src-linux.gif' alt='Linux'}' /> </td>\n";
|
||||
} elsif ($vendorid =~ /^TrendMicro$/i)
|
||||
{
|
||||
print "<img src='/images/updbooster/updxl-src-trendmicro.gif' alt='Trend Micro'}' /> </td>\n";
|
||||
} elsif ($vendorid =~ /^Apple$/i)
|
||||
{
|
||||
print "<img src='/images/updbooster/updxl-src-apple.gif' alt='Apple'}' /> </td>\n";
|
||||
} elsif ($vendorid =~ /^Avast$/i)
|
||||
{
|
||||
print "<img src='/images/updbooster/updxl-src-avast.gif' alt='Avast'}' /> </td>\n";
|
||||
} else
|
||||
{
|
||||
if (-e "/home/httpd/html/images/updbooster/updxl-src-" . $vendorid . ".gif")
|
||||
{
|
||||
print "<img src='/images/updbooster/updxl-src-" . $vendorid . ".gif' alt='" . ucfirst $vendorid . "' /> </td>\n";
|
||||
} else {
|
||||
print "<img src='/images/updbooster/updxl-src-unknown.gif' alt='" . ucfirst $vendorid . "' /> </td>\n";
|
||||
}
|
||||
}
|
||||
print "\t\t<td align='center' nowrap='nowrap'> ";
|
||||
|
||||
$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 "<img src='/images/updbooster/updxl-src-" . $vendorid . ".gif' alt='" . ucfirst $vendorid . "' /> </td>\n";
|
||||
} else {
|
||||
print "<img src='/images/updbooster/updxl-src-unknown.gif' alt='" . ucfirst $vendorid . "' /> </td>\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 <<END
|
||||
$filesize = $dlinfo{'REMOTESIZE'};
|
||||
1 while $filesize =~ s/^(-?\d+)(\d{3})/$1.$2/;
|
||||
$dlinfo{'VENDORID'} = ucfirst $vendorid;
|
||||
|
||||
print <<END
|
||||
<td class='base' align='center'> $dlinfo{'VENDORID'} </td>
|
||||
<td class='base' align='left' title='cache:/$updatefile'>$shortname</td>
|
||||
<td class='base' align='right' nowrap='nowrap'> $filesize </td>
|
||||
|
||||
BIN
html/html/images/updbooster/updxl-src-microsoft.gif
Normal file
BIN
html/html/images/updbooster/updxl-src-microsoft.gif
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 183 B |
Binary file not shown.
|
Before Width: | Height: | Size: 1.0 KiB After Width: | Height: | Size: 183 B |
Reference in New Issue
Block a user