]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/pakfire/lib/functions.pl
Fixed function.sh - no notification if there are no updates.
[ipfire-2.x.git] / src / pakfire / lib / functions.pl
index 91e7930d1118cd32cc66d981c34658a310ac0b20..8c6a295554c6434c3c7c675ef5d7c0b324c5ae69 100644 (file)
@@ -324,7 +324,12 @@ sub selectmirror {
                                $proto = $templine[0];
                                $host = $templine[1];
                                $path = $templine[2];
-                               if (pinghost("$host")) {
+                               if ($pakfiresettings{'HEALTHCHECK'} eq "off") {
+                                       logger("PING INFO: Healthcheck is disabled");
+                                       $found = 1;
+                                       return ($proto, $host, $path);
+                               }
+                               elsif (pinghost("$host")) {
                                        $found = 1;
                                        return ($proto, $host, $path);
                                }
@@ -389,11 +394,14 @@ sub dblist {
        close(FILE);
 
        if ("$filter" eq "upgrade") {
-               if ("$forweb" ne "forweb") {getcoredb("noforce");}
+               if ("$forweb" ne "forweb" && "$forweb" ne "notice" ) {getcoredb("noforce");}
                eval(`grep "core_" $Conf::dbdir/lists/core-list.db`);
                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") {
@@ -404,14 +412,14 @@ sub dblist {
                        }
                }
        
-               opendir(DIR,"$Conf::dbdir/meta");
+               opendir(DIR,"$Conf::dbdir/installed");
                my @files = readdir(DIR);
                closedir(DIR);
                foreach $file (@files) {
                        next if ( $file eq "." );
                        next if ( $file eq ".." );
                        next if ( $file =~ /^old/ );
-                       open(FILE, "<$Conf::dbdir/meta/$file");
+                       open(FILE, "<$Conf::dbdir/installed/$file");
                        @meta = <FILE>;
                        close(FILE);
                        foreach $line (@meta) {