From 2b38ab5c3a1e42d475f08e64d7d69597d7c31344 Mon Sep 17 00:00:00 2001 From: Jan Paul Tuecking Date: Mon, 14 Sep 2009 17:59:50 +0200 Subject: [PATCH] Added a notification to index.cgi when core-updates are available. --- html/cgi-bin/index.cgi | 5 +++++ langs/de/cgi-bin/de.pl | 3 +++ langs/en/cgi-bin/en.pl | 3 +++ src/pakfire/lib/functions.pl | 3 +++ 4 files changed, 14 insertions(+) mode change 100644 => 100755 html/cgi-bin/index.cgi diff --git a/html/cgi-bin/index.cgi b/html/cgi-bin/index.cgi old mode 100644 new mode 100755 index df78315151..54c0d1968a --- a/html/cgi-bin/index.cgi +++ b/html/cgi-bin/index.cgi @@ -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 +; +&Pakfire::dblist("upgrade", "notice"); +print < 'Zeit:', 'ConnSched up' => 'Hoch', 'ConnSched weekdays' => 'Wochentage:', +'core notice 1' => 'Hinweis: 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
und klicken Sie danach auf Speichern.', 'Existing Files' => 'Dateien in der Datenbank', 'HDD temperature' => 'HDD-Temperatur', diff --git a/langs/en/cgi-bin/en.pl b/langs/en/cgi-bin/en.pl index d86fa97a6a..acf83fa656 100644 --- a/langs/en/cgi-bin/en.pl +++ b/langs/en/cgi-bin/en.pl @@ -25,6 +25,9 @@ 'ConnSched time' => 'Time:', 'ConnSched up' => 'Up', 'ConnSched weekdays' => 'Days of the week:', +'core notice 1' => 'Notice: There is an core-update from', +'core notice 2' => 'to', +'core notice 3' => 'available.', 'Enter TOS' => 'Activate or Deactivate TOS-Bits
and then press Save.', 'Existing Files' => 'Files in database', 'HDD temperature' => 'HDD temperature', diff --git a/src/pakfire/lib/functions.pl b/src/pakfire/lib/functions.pl index c47ff39bbd..10630a1dac 100644 --- a/src/pakfire/lib/functions.pl +++ b/src/pakfire/lib/functions.pl @@ -399,6 +399,9 @@ sub dblist { if ("$core_release" > "$Conf::core_mine") { if ("$forweb" eq "forweb") { print "\n"; + } + elsif ("$forweb" eq "notice") { + print "$Lang::tr{'core notice 1'} $Conf::core_mine $Lang::tr{'core notice 2'} $core_release $Lang::tr{'core notice 3'}"; } else { my $command = "Core-Update $Conf::version\nRelease: $Conf::core_mine -> $core_release\n"; if ("$Pakfire::enable_colors" eq "1") { -- 2.39.2