]> git.ipfire.org Git - people/teissler/ipfire-2.x.git/blobdiff - html/html/themes/ipfire/include/functions.pl
WUI: Make the shown uptime in the footer more beautiful.
[people/teissler/ipfire-2.x.git] / html / html / themes / ipfire / include / functions.pl
index b97c32613bd8399d571518d8cd84b1e1672db355..b28547a891b06480b80abd3d8f669827a0a8a14a 100644 (file)
@@ -335,9 +335,14 @@ END
 }
 
 sub closepage () {
-    my $status = &connectionstatus();
-    $uptime = `/usr/bin/uptime`;
-        
+       my $status = &connectionstatus();
+       my $uptime = `/usr/bin/uptime|cut -d \" \" -f 4-`;
+       $uptime =~ s/year(s|)/$Lang::tr{'year'}/;
+       $uptime =~ s/month(s|)/$Lang::tr{'month'}/;
+       $uptime =~ s/day(s|)/$Lang::tr{'day'}/;
+       $uptime =~ s/user(s|)/$Lang::tr{'user'}/;
+       $uptime =~ s/load average/$Lang::tr{'uptime load average'}/;     
+                               
     print <<END
                         </div>
                 </div>