According to the described coding style the following changes were made.
--- html/html/themes/darkdos/include/functions.pl | 35 +++++++++---------- .../themes/ipfire-legacy/include/functions.pl | 22 ++++++------ html/html/themes/ipfire/include/functions.pl | 2 +- html/html/themes/maniac/include/functions.pl | 32 ++++++++--------- 4 files changed, 44 insertions(+), 47 deletions(-)
diff --git a/html/html/themes/darkdos/include/functions.pl b/html/html/themes/darkdos/include/functions.pl index 9f3547237..6285ef8ba 100644 --- a/html/html/themes/darkdos/include/functions.pl +++ b/html/html/themes/darkdos/include/functions.pl @@ -48,7 +48,7 @@ EOF </ul> </div> EOF -; +; }
sub getselected($) { @@ -141,7 +141,7 @@ sub openpage {
$title = "-= IPFire - $title =-"; if ($settings{'WINDOWWITHHOSTNAME'} eq 'on') { - $title = "$settings{'HOSTNAME'}.$settings{'DOMAINNAME'} - $title"; + $title = "$settings{'HOSTNAME'}.$settings{'DOMAINNAME'} - $title"; }
print <<END @@ -154,7 +154,7 @@ sub openpage { <link rel="shortcut icon" href="/favicon.ico" /> <link rel="stylesheet" type="text/css" href="/themes/darkdos/include/style.css" /> <script language="javascript" type="text/javascript"> - + function swapVisibility(id) { el = document.getElementById(id); if(el.style.display != 'block') { @@ -184,21 +184,21 @@ print <<END t_current = new Date(); var t_diff = t_current - t_last; t_last = t_current; - + rxb_current = $("rxb",xml).text(); var rxb_diff = rxb_current - rxb_last; rxb_last = rxb_current; - + var rx_kbs = rxb_diff/t_diff; rx_kbs = Math.round(rx_kbs*10)/10; - + txb_current = $("txb",xml).text(); var txb_diff = txb_current - txb_last; txb_last = txb_current; - + var tx_kbs = txb_diff/t_diff; tx_kbs = Math.round(tx_kbs*10)/10; - + $("#rx_kbs").text(rx_kbs + ' kb/s'); $("#tx_kbs").text(tx_kbs + ' kb/s'); } @@ -227,7 +227,7 @@ print <<END END ; if ($settings{'WINDOWWITHHOSTNAME'} eq 'on') { - print "<h1><span>$settings{'HOSTNAME'}.$settings{'DOMAINNAME'}</span></h1><br />"; + print "<h1><span>$settings{'HOSTNAME'}.$settings{'DOMAINNAME'}</span></h1><br />"; } else { print "<h1><span><a href='https://www.ipfire.org' style='text-decoration: none;'>-= IPFire =-</a></span></h1><br />"; } @@ -239,7 +239,7 @@ END ; &showmenu();
-print <<END +print <<END </div> </div>
@@ -264,7 +264,7 @@ sub openpagewithoutmenu {
$title = "-= IPFire - $title =-"; if ($settings{'WINDOWWITHHOSTNAME'} eq 'on') { - $title = "$settings{'HOSTNAME'}.$settings{'DOMAINNAME'} - $title"; + $title = "$settings{'HOSTNAME'}.$settings{'DOMAINNAME'} - $title"; }
print <<END @@ -287,7 +287,7 @@ END <link rel="shortcut icon" href="/favicon.ico" /> <link rel="stylesheet" type="text/css" href="/include/style.css" /> <script language="javascript" type="text/javascript"> - + function swapVisibility(id) { el = document.getElementById(id); if(el.style.display != 'block') { @@ -310,7 +310,7 @@ END <div id="logo"> <h1><span>-= IPFire =-</span></h1> <h2>+ $h2 +</h2> - </div> + </div> </div> </div>
@@ -330,14 +330,11 @@ sub closepage () { $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'}/; - + $uptime =~ s/load average/$Lang::tr{'uptime load average'}/; print <<END </div> </div> - <div id="secondaryContent_2columns"> - <div id="columnC_2columns"> END ; @@ -347,13 +344,13 @@ END print <<END </div> </div> - <br class="clear" /> + <br class="clear" /> <div id="footer" class="fixed"> <b>Status:</b> $status <b>Uptime:</b> $uptime END ; if ($settings{'SPEED'} ne 'off') { -print <<END +print <<END <br /> <b>$Lang::tr{'bandwidth usage'}:</b> $Lang::tr{'incoming'}: <span id="rx_kbs"></span> $Lang::tr{'outgoing'}: <span id="tx_kbs"></span> diff --git a/html/html/themes/ipfire-legacy/include/functions.pl b/html/html/themes/ipfire-legacy/include/functions.pl index 3ce62ea41..cc8dfa318 100644 --- a/html/html/themes/ipfire-legacy/include/functions.pl +++ b/html/html/themes/ipfire-legacy/include/functions.pl @@ -48,7 +48,7 @@ EOF </ul> </div> EOF -; +; }
sub getselected($) { @@ -141,7 +141,7 @@ sub openpage {
$title = "IPFire - $title"; if ($settings{'WINDOWWITHHOSTNAME'} eq 'on') { - $title = "$settings{'HOSTNAME'}.$settings{'DOMAINNAME'} - $title"; + $title = "$settings{'HOSTNAME'}.$settings{'DOMAINNAME'} - $title"; }
print <<END @@ -154,7 +154,7 @@ sub openpage { <link rel="shortcut icon" href="/favicon.ico" /> <link rel="stylesheet" type="text/css" href="/themes/ipfire-legacy/include/style.css" /> <script language="javascript" type="text/javascript"> - + function swapVisibility(id) { el = document.getElementById(id); if(el.style.display != 'block') { @@ -227,7 +227,7 @@ print <<END END ; if ($settings{'WINDOWWITHHOSTNAME'} eq 'on') { - print "<h1><span>$settings{'HOSTNAME'}.$settings{'DOMAINNAME'}</span></h1><br />"; + print "<h1><span>$settings{'HOSTNAME'}.$settings{'DOMAINNAME'}</span></h1><br />"; } else { print "<h1><span><a href='https://www.ipfire.org' style='text-decoration: none;'>IPFire</a></span></h1><br />"; } @@ -239,7 +239,7 @@ END ; &showmenu();
-print <<END +print <<END </div> </div>
@@ -264,7 +264,7 @@ sub openpagewithoutmenu {
$title = "IPFire - $title"; if ($settings{'WINDOWWITHHOSTNAME'} eq 'on') { - $title = "$settings{'HOSTNAME'}.$settings{'DOMAINNAME'} - $title"; + $title = "$settings{'HOSTNAME'}.$settings{'DOMAINNAME'} - $title"; }
print <<END @@ -287,7 +287,7 @@ END <link rel="shortcut icon" href="/favicon.ico" /> <link rel="stylesheet" type="text/css" href="/include/style.css" /> <script language="javascript" type="text/javascript"> - + function swapVisibility(id) { el = document.getElementById(id); if(el.style.display != 'block') { @@ -310,7 +310,7 @@ END <div id="logo"> <h1><span>IPFire</span></h1> <h2>$h2</h2> - </div> + </div> </div> </div>
@@ -337,7 +337,7 @@ sub closepage () { </div>
<div id="secondaryContent_2columns"> - + <div id="columnC_2columns"> END ; @@ -347,7 +347,7 @@ END print <<END </div> </div> - <br class="clear" /> + <br class="clear" /> <div id="footer" class="fixed"> <b>Status:</b> $status <b>Uptime:</b> $uptime END @@ -356,7 +356,7 @@ if ($settings{'SPEED'} ne 'off') { print <<END <br /> <b>$Lang::tr{'bandwidth usage'}:</b> - $Lang::tr{'incoming'}: <span id="rx_kbs"></span> $Lang::tr{'outgoing'}: <span id="tx_kbs"></span> + $Lang::tr{'incoming'}: <span id="rx_kbs"></span> $Lang::tr{'outgoing'}: <span id="tx_kbs"></span> <b>time:</b> $localtime_now
END diff --git a/html/html/themes/ipfire/include/functions.pl b/html/html/themes/ipfire/include/functions.pl index 9e3063476..108ce5f1a 100644 --- a/html/html/themes/ipfire/include/functions.pl +++ b/html/html/themes/ipfire/include/functions.pl @@ -40,7 +40,7 @@ use POSIX; # @param submenu entries sub showsubmenu() { my $submenus = shift; - + print "<ul>"; foreach my $item (sort keys %$submenus) { $link = getlink($submenus->{$item}); diff --git a/html/html/themes/maniac/include/functions.pl b/html/html/themes/maniac/include/functions.pl index c50357070..2fbc3f53a 100644 --- a/html/html/themes/maniac/include/functions.pl +++ b/html/html/themes/maniac/include/functions.pl @@ -48,7 +48,7 @@ EOF </ul> </div> EOF -; +; }
sub getselected($) { @@ -141,7 +141,7 @@ sub openpage {
$title = "-= IPFire - $title =-"; if ($settings{'WINDOWWITHHOSTNAME'} eq 'on') { - $title = "$settings{'HOSTNAME'}.$settings{'DOMAINNAME'} - $title"; + $title = "$settings{'HOSTNAME'}.$settings{'DOMAINNAME'} - $title"; }
print <<END @@ -154,7 +154,7 @@ sub openpage { <link rel="shortcut icon" href="/favicon.ico" /> <link rel="stylesheet" type="text/css" href="/themes/maniac/include/style.css" /> <script type="text/javascript"> - + function swapVisibility(id) { el = document.getElementById(id); if(el.style.display != 'block') { @@ -184,21 +184,21 @@ print <<END t_current = new Date(); var t_diff = t_current - t_last; t_last = t_current; - + rxb_current = $("rxb",xml).text(); var rxb_diff = rxb_current - rxb_last; rxb_last = rxb_current; - + var rx_kbs = rxb_diff/t_diff; rx_kbs = Math.round(rx_kbs*10)/10; - + txb_current = $("txb",xml).text(); var txb_diff = txb_current - txb_last; txb_last = txb_current; - + var tx_kbs = txb_diff/t_diff; tx_kbs = Math.round(tx_kbs*10)/10; - + $("#rx_kbs").text(rx_kbs + ' kb/s'); $("#tx_kbs").text(tx_kbs + ' kb/s'); } @@ -227,7 +227,7 @@ print <<END END ; if ($settings{'WINDOWWITHHOSTNAME'} eq 'on') { - print "<h1><span>$settings{'HOSTNAME'}.$settings{'DOMAINNAME'}</span></h1><br />"; + print "<h1><span>$settings{'HOSTNAME'}.$settings{'DOMAINNAME'}</span></h1><br />"; } else { print "<h1><span><a href='https://www.ipfire.org' style='text-decoration: none;'>-= IPFire =-</a></span></h1><br />"; } @@ -239,7 +239,7 @@ END ; &showmenu();
-print <<END +print <<END </div> </div>
@@ -264,7 +264,7 @@ sub openpagewithoutmenu {
$title = "-= IPFire - $title =-"; if ($settings{'WINDOWWITHHOSTNAME'} eq 'on') { - $title = "$settings{'HOSTNAME'}.$settings{'DOMAINNAME'} - $title"; + $title = "$settings{'HOSTNAME'}.$settings{'DOMAINNAME'} - $title"; }
print <<END @@ -287,7 +287,7 @@ END <link rel="shortcut icon" href="/favicon.ico" /> <link rel="stylesheet" type="text/css" href="/include/style.css" /> <script type="text/javascript"> - + function swapVisibility(id) { el = document.getElementById(id); if(el.style.display != 'block') { @@ -310,7 +310,7 @@ END <div id="logo"> <h1><span>-= IPFire =-</span></h1> <h2>+ $h2 +</h2> - </div> + </div> </div> </div>
@@ -337,7 +337,7 @@ sub closepage () { </div>
<div id="secondaryContent_2columns"> - + <div id="columnC_2columns"> END ; @@ -347,7 +347,7 @@ END print <<END </div> </div> - <br class="clear" /> + <br class="clear" /> <div id="footer" class="fixed"> <b>Status:</b> $status <b>Uptime:</b> $uptime END @@ -356,7 +356,7 @@ if ($settings{'SPEED'} ne 'off') { print <<END <br /> <b>$Lang::tr{'bandwidth usage'}:</b> - $Lang::tr{'incoming'}: <span id="rx_kbs"></span> $Lang::tr{'outgoing'}: <span id="tx_kbs"></span> + $Lang::tr{'incoming'}: <span id="rx_kbs"></span> $Lang::tr{'outgoing'}: <span id="tx_kbs"></span> <b>time:</b> $localtime_now
END