Added a notification to index.cgi when core-updates are available.

This commit is contained in:
Jan Paul Tuecking
2009-09-14 17:59:50 +02:00
parent 0da06d3fb8
commit 2b38ab5c3a
4 changed files with 14 additions and 0 deletions

5
html/cgi-bin/index.cgi Normal file → Executable file
View File

@@ -28,6 +28,7 @@ use strict;
require '/var/ipfire/general-functions.pl';
require "${General::swroot}/lang.pl";
require "${General::swroot}/header.pl";
require "/opt/pakfire/lib/functions.pl";
my %cgiparams=();
my %pppsettings=();
@@ -421,6 +422,10 @@ if ($warnmessage) {
}
print <<END;
</table>
END
;
&Pakfire::dblist("upgrade", "notice");
print <<END;
END
} else {

View File

@@ -23,6 +23,9 @@
'ConnSched time' => 'Zeit:',
'ConnSched up' => 'Hoch',
'ConnSched weekdays' => 'Wochentage:',
'core notice 1' => '<strong>Hinweis:</strong> Es steht eine Aktualisierung von Core-Update',
'core notice 2' => 'nach',
'core notice 3' => 'zur Verfügung.',
'Enter TOS' => 'Aktivieren oder deaktivieren sie die TOS-Bits <br /> und klicken Sie danach auf <i>Speichern</i>.',
'Existing Files' => 'Dateien in der Datenbank',
'HDD temperature' => 'HDD-Temperatur',

View File

@@ -25,6 +25,9 @@
'ConnSched time' => 'Time:',
'ConnSched up' => 'Up',
'ConnSched weekdays' => 'Days of the week:',
'core notice 1' => '<strong>Notice:</strong> There is an core-update from',
'core notice 2' => 'to',
'core notice 3' => 'available.',
'Enter TOS' => 'Activate or Deactivate TOS-Bits <br /> and then press <i>Save</i>.',
'Existing Files' => 'Files in database',
'HDD temperature' => 'HDD temperature',

View File

@@ -399,6 +399,9 @@ sub dblist {
if ("$core_release" > "$Conf::core_mine") {
if ("$forweb" eq "forweb") {
print "<option value=\"core\">Core-Update -- $Conf::version -- Release: $Conf::core_mine -> $core_release</option>\n";
}
elsif ("$forweb" eq "notice") {
print "<a href='pakfire.cgi'>$Lang::tr{'core notice 1'} $Conf::core_mine $Lang::tr{'core notice 2'} $core_release $Lang::tr{'core notice 3'}</a>";
} else {
my $command = "Core-Update $Conf::version\nRelease: $Conf::core_mine -> $core_release\n";
if ("$Pakfire::enable_colors" eq "1") {