diff options
author | Denny Page <dennypage@me.com> | 2016-02-14 13:10:39 -0800 |
---|---|---|
committer | Denny Page <dennypage@me.com> | 2016-02-14 13:10:39 -0800 |
commit | 0e9dc3001dc219acd89455e4cf530be2a31ff06b (patch) | |
tree | f272f94d87419aec820154bf50e7c54becbece4a | |
parent | 5045722fd7ed6db29dd1fa0a30bce68f31e051c7 (diff) | |
parent | 02342d8c9fa4fe988c101427bd02096ba9ac686f (diff) | |
download | pfsense-0e9dc3001dc219acd89455e4cf530be2a31ff06b.zip pfsense-0e9dc3001dc219acd89455e4cf530be2a31ff06b.tar.gz |
Merge branch 'master' of https://github.com/pfsense/pfsense
148 files changed, 696 insertions, 714 deletions
diff --git a/src/etc/ecl.php b/src/etc/ecl.php index 15205f1..2e99d18 100755 --- a/src/etc/ecl.php +++ b/src/etc/ecl.php @@ -50,14 +50,9 @@ function get_swap_disks() { function get_disk_slices($disk) { global $g, $debug; - $slices_array = array(); - $slices = trim(exec("/bin/ls " . escapeshellarg("/dev/" . $disk . "s*") . " 2>/dev/null")); + $slices = glob("/dev/" . $disk . "s*"); $slices = str_replace("/dev/", "", $slices); - if ($slices == "ls: No match.") { - return; - } - $slices_array = explode(" ", $slices); - return $slices_array; + return $slices; } function get_disks() { diff --git a/src/etc/inc/IPv6.inc b/src/etc/inc/IPv6.inc index c3aa3f6..4493273 100644 --- a/src/etc/inc/IPv6.inc +++ b/src/etc/inc/IPv6.inc @@ -843,6 +843,11 @@ class Net_IPv6 if (strstr($ip, '.')) { $pos = strrpos($ip, ':'); + + if(false === $pos) { + return array("", $ip); + } + $ip{$pos} = '_'; $ipPart = explode('_', $ip); diff --git a/src/etc/inc/dyndns.class b/src/etc/inc/dyndns.class index 17c6af3..765df7e 100644 --- a/src/etc/inc/dyndns.class +++ b/src/etc/inc/dyndns.class @@ -161,7 +161,7 @@ $this->_curlSslVerifypeer = $curlSslVerifypeer; $this->_dnsVerboseLog = $dnsVerboseLog; if ($this->_dnsVerboseLog) { - log_error("DynDns: updatedns() starting"); + log_error(gettext("Dynamic DNS: updatedns() starting")); } $dyndnslck = lock("DDNS".$dnsID, LOCK_EX); @@ -215,7 +215,7 @@ $this->_dnsResultMatch = $dnsResultMatch; $this->_dnsRequestIf = get_failover_interface($dnsRequestIf); if ($this->_dnsVerboseLog) { - log_error("DynDNS ({$this->_FQDN}): running get_failover_interface for {$dnsRequestIf}. found {$this->_dnsRequestIf}"); + log_error(sprintf(gettext('Dynamic DNS (%1$s): running get_failover_interface for %2$s. found %3$s'), $this->_FQDN, $dnsRequestIf, $this->_dnsRequestIf)); } $this->_dnsRequestIfIP = get_interface_ip($dnsRequestIf); $this->_dnsMaxCacheAgeDays = 25; @@ -224,7 +224,7 @@ // Ensure that we were able to lookup the IP if (!is_ipaddr($this->_dnsIP)) { - log_error("DynDNS ({$this->_FQDN}) There was an error trying to determine the public IP for interface - {$dnsIf}({$this->_if}). Probably interface is not a WAN interface."); + log_error(sprintf(gettext('Dynamic DNS (%s$1) There was an error trying to determine the public IP for interface - %2$s(%3$s). Probably interface is not a WAN interface.'), $this->_FQDN, $dnsIf, $this->_if)); unlock($dyndnslck); return; } @@ -297,7 +297,7 @@ function _update() { if ($this->_dnsVerboseLog) { - log_error("DynDNS ({$this->_FQDN}): DynDns _update() starting."); + log_error(sprintf(gettext('Dynamic DNS %1$s (%2$s): _update() starting.'), $this->_dnsService, $this->_FQDN)); } if (strstr($this->_dnsRequestIf, "_vip")) { @@ -324,9 +324,6 @@ switch ($this->_dnsService) { case 'glesys': $needsIP = TRUE; - if ($this->_dnsVerboseLog) { - log_error("DynDNS: ({$this->_FQDN}) DNS update() starting."); - } $server = 'https://api.glesys.com/domain/updaterecord/format/json'; curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser.':'.$this->_dnsPass); $post_data['recordid'] = $this->_FQDN; @@ -338,9 +335,6 @@ case 'dyndns-static': case 'dyndns-custom': $needsIP = FALSE; - if ($this->_dnsVerboseLog) { - log_error("DynDNS: ({$this->_FQDN}) DNS update() starting."); - } if (isset($this->_dnsWildcard) && $this->_dnsWildcard != "OFF") { $this->_dnsWildcard = "ON"; } @@ -401,7 +395,7 @@ // Update the IP to a dummy value to force No-IP free accounts to see a change. $iptoset = "192.168.1.1"; $this->_dnsDummyUpdateDone = true; - log_error("DynDNS ({$this->_dnsHost}): Processing dummy update on No-IP free account. IP temporarily set to " . $iptoset); + log_error(sprintf(gettext('Dynamic DNS %1$s (%2$s): Processing dummy update on No-IP free account. IP temporarily set to %3$s'), $this->_dnsService, $this->_dnsHost, $iptoset)); } else { $iptoset = $this->_dnsIP; } @@ -536,9 +530,6 @@ https://username:password@updates.dnsomatic.com/nic/update?hostname=yourhostname&myip=ipaddress&wildcard=NOCHG&mx=NOCHG&backmx=NOCHG */ $needsIP = FALSE; - if ($this->_dnsVerboseLog) { - log_error("DNS-O-Matic: DNS update() starting."); - } if (isset($this->_dnsWildcard) && $this->_dnsWildcard != "OFF") { $this->_dnsWildcard = "ON"; } @@ -565,9 +556,6 @@ https://dynamicdns.park-your-domain.com/update?host=[host_name]&domain=[domain.com]&password=[domain_password]&ip=[your_ip] */ $needsIP = FALSE; - if ($this->_dnsVerboseLog) { - log_error("Namecheap ({$this->_FQDN}): DNS update() starting."); - } $dnspass = trim($this->_dnsPass); $server = "https://dynamicdns.park-your-domain.com/update?host={$this->_dnsHost}&domain={$this->_dnsDomain}&password={$dnspass}&ip={$this->_dnsIP}"; curl_setopt($ch, CURLOPT_URL, $server); @@ -575,9 +563,6 @@ case 'he-net': case 'he-net-v6': $needsIP = FALSE; - if ($this->_dnsVerboseLog) { - log_error("HE.net ({$this->_dnsHost}): DNS update() starting."); - } $server = "https://dyn.dns.he.net/nic/update?"; curl_setopt($ch, CURLOPT_IPRESOLVE, CURL_IPRESOLVE_V4); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); @@ -585,18 +570,12 @@ break; case 'he-net-tunnelbroker': $needsIP = FALSE; - if ($this->_dnsVerboseLog) { - log_error("HE.net Tunnelbroker: DNS update() starting."); - } $server = "https://ipv4.tunnelbroker.net/ipv4_end.php?"; curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser . ':' . $this->_dnsPass); curl_setopt($ch, CURLOPT_URL, $server . 'tid=' . $this->_dnsHost); break; case 'selfhost': $needsIP = FALSE; - if ($this->_dnsVerboseLog) { - log_error("SelfHost: DNS update() starting."); - } if (isset($this->_dnsWildcard) && $this->_dnsWildcard != "OFF") { $this->_dnsWildcard = "ON"; } @@ -612,9 +591,6 @@ curl_setopt($ch, CURLOPT_URL, $server .$port . '?system=dyndns&hostname=' . $this->_dnsHost . '&myip=' . $this->_dnsIP . '&wildcard='.$this->_dnsWildcard . '&mx=' . $this->_dnsMX . '&backmx=NO'); break; case 'route53': - if ($this->_dnsVerboseLog) { - log_error("Route53 ({$this->_dnsHost}): DNS update() starting."); - } /* Setting Variables */ $hostname = "{$this->_dnsHost}."; @@ -671,9 +647,6 @@ break; case 'custom': case 'custom-v6': - if ($this->_dnsVerboseLog) { - log_error("Custom DDNS ({$this->_dnsHost}): DNS update() starting."); - } if (strstr($this->dnsUpdateURL, "%IP%")) {$needsIP = TRUE;} else {$needsIP = FALSE;} if ($this->_dnsUser != '') { if ($this->_curlIpresolveV4) { @@ -689,7 +662,7 @@ } $server = str_replace("%IP%", $this->_dnsIP, $this->_dnsUpdateURL); if ($this->_dnsVerboseLog) { - log_error("Sending request to: ".$server); + log_error(sprintf(gettext("Sending request to: %s"), $server)); } curl_setopt($ch, CURLOPT_URL, $server); break; @@ -733,9 +706,6 @@ break; case 'eurodns': $needsIP = TRUE; - if ($this->_dnsVerboseLog) { - log_error("EuroDynDns ({$this->_dnsHost}) DNS update() starting."); - } curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser.':'.$this->_dnsPass); $server = "https://update.eurodyndns.org/update/"; $port = ""; @@ -746,9 +716,6 @@ break; case 'gratisdns': $needsIP = TRUE; - if ($this->_dnsVerboseLog) { - log_error("GratisDNS.dk ({$this->_dnsHost}): DNS update() starting."); - } $server = "https://ssl.gratisdns.dk/ddns.phtml"; $host = trim($this->_dnsHost); $hostnames = explode(".", $host); @@ -762,9 +729,6 @@ break; case 'ovh-dynhost': $needsIP = FALSE; - if ($this->_dnsVerboseLog) { - log_error("OVH DynHOST: ({$this->_dnsHost}) DNS update() starting."); - } if (isset($this->_dnsWildcard) && $this->_dnsWildcard != "OFF") $this->_dnsWildcard = "ON"; curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser.':'.$this->_dnsPass); $server = "https://www.ovh.com/nic/update"; @@ -779,9 +743,6 @@ break; case 'citynetwork': $needsIP = TRUE; - if ($this->_dnsVerboseLog) { - log_error("City Network: ({$this->_dnsHost}) DNS update() starting."); - } curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser.':'.$this->_dnsPass); $server = 'https://dyndns.citynetwork.se/nic/update'; $port = ""; @@ -810,9 +771,6 @@ break; case 'googledomains': $needsIP = FALSE; - if ($this->_dnsVerboseLog) { - log_error("Google Domains: ({$this->_dnsHost}) DNS update() starting."); - } $post_data['username:password'] = $this->_dnsUser . ':' . $this->_dnsPass; $post_data['hostname'] = $this->_dnsHost; $post_data['myip'] = $this->_dnsIP; @@ -825,18 +783,12 @@ break; case 'dnsmadeeasy': $needsIP = TRUE; - if ($this->_dnsVerboseLog) { - log_error("DNS Made Easy ({$this->_dnsHost}): DNS update() starting."); - } $server = "https://cp.dnsmadeeasy.com/servlet/updateip"; curl_setopt($ch, CURLOPT_URL, $server . '?username=' . $this->_dnsUser . '&password=' . $this->_dnsPass . '&id=' . $this->_dnsHost . '&ip=' . $this->_dnsIP); break; case 'spdns': case 'spdns-v6': $needsIP = FALSE; - if ($this->_dnsVerboseLog) { - log_error("SPDNS: ({$this->_dnsHost}) DNS update() starting."); - } curl_setopt($ch, CURLOPT_USERPWD, $this->_dnsUser.':'.$this->_dnsPass); $server = "https://update.spdns.de/nic/update"; $port = ""; @@ -864,117 +816,122 @@ */ function _checkStatus($ch, $data) { if ($this->_dnsVerboseLog) { - log_error("DynDNS ({$this->_FQDN}): DynDns _checkStatus() starting."); - log_error("DynDNS ({$this->_FQDN}): Current Service: {$this->_dnsService}"); + log_error(sprintf(gettext('Dynamic DNS %1$s (%2$s): _checkStatus() starting.'), $this->_dnsService, $this->_FQDN)); } $successful_update = false; + $success_str = "(" . gettext("Success") . ") "; + $error_str = "(" . gettext("Error") . ") "; + $status_intro = "phpDynDNS ({$this->_dnsHost}): "; + if ($this->_dnsService != 'ods' and $this->_dnsService != 'route53' && @curl_error($ch)) { - $status = "Curl error occurred: " . curl_error($ch); + $status = gettext("Curl error occurred:") . " " . curl_error($ch); log_error($status); $this->status = $status; return; } switch ($this->_dnsService) { case 'glesys': + $status_intro = "GleSYS ({$this->_dnsHost}): "; if (preg_match('/Record updated/i', $data)) { - $status = "GleSYS ({$this->_dnsHost}): (Success) IP Address Changed Successfully! (" . $this->_dnsIP . ")"; + $status = $status_intro . $success_str . gettext("IP Address Changed Successfully!") . " (" . $this->_dnsIP . ")"; $successful_update = true; } else { - $status = "GleSYS ({$this->_dnsHost}): (Unknown Response)"; - log_error("GleSYS ({$this->_dnsHost}): PAYLOAD: {$data}"); + $status = $status_intro . "(" . gettext("Unknown Response") . ")"; + log_error($status_intro . gettext("PAYLOAD:") . " {$data}"); $this->_debug($data); } break; case 'dnsomatic': + $status_intro = "DNS-O-Matic ({$this->_dnsHost}): "; if (preg_match('/badauth/i', $data)) { - $status = "DNS-O-Matic ({$this->_dnsHost}): The DNS-O-Matic username or password specified are incorrect. No updates will be distributed to services until this is resolved."; + $status = $status_intro . gettext("The DNS-O-Matic username or password specified are incorrect. No updates will be distributed to services until this is resolved."); } else if (preg_match('/notfqdn /i', $data)) { - $status = "DNS-O-Matic ({$this->_dnsHost}): The hostname specified is not a fully-qualified domain name. If no hostnames included, notfqdn will be returned once."; + $status = $status_intro . gettext("The hostname specified is not a fully-qualified domain name. If no hostnames included, notfqdn will be returned once."); } else if (preg_match('/nohost/i', $data)) { - $status = "DNS-O-Matic ({$this->_dnsHost}): The hostname passed could not be matched to any services configured. The service field will be blank in the return code."; + $status = $status_intro . gettext("The hostname passed could not be matched to any services configured. The service field will be blank in the return code."); } else if (preg_match('/numhost/i', $data)) { - $status = "DNS-O-Matic ({$this->_dnsHost}): You may update up to 20 hosts. numhost is returned if you try to update more than 20 or update a round-robin."; + $status = $status_intro . gettext("You may update up to 20 hosts. numhost is returned if you try to update more than 20 or update a round-robin."); } else if (preg_match('/abuse/i', $data)) { - $status = "DNS-O-Matic ({$this->_dnsHost}): The hostname is blocked for update abuse."; + $status = $status_intro . gettext("The hostname is blocked for update abuse."); } else if (preg_match('/good/i', $data)) { - $status = "DNS-O-Matic ({$this->_dnsHost}): (Success) IP Address Changed Successfully! (" . $this->_dnsIP . ")"; + $status = $status_intro . $success_str . gettext("IP Address Changed Successfully!") . " (" . $this->_dnsIP . ")"; $successful_update = true; } else if (preg_match('/dnserr/i', $data)) { - $status = "DNS-O-Matic ({$this->_dnsHost}): DNS error encountered. Stop updating for 30 minutes."; + $status = $status_intro . gettext("DNS error encountered. Stop updating for 30 minutes."); } else { - $status = "DNS-O-Matic ({$this->_dnsHost}): (Unknown Response)"; - log_error("DNS-O-Matic ({$this->_dnsHost}): PAYLOAD: {$data}"); + $status = $status_intro . "(" . gettext("Unknown Response") . ")"; + log_error($status_intro . gettext("PAYLOAD:") . " {$data}"); $this->_debug($data); } break; case 'citynetwork': if (preg_match('/notfqdn/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Not A FQDN!"; + $status = $status_intro . $error_str . gettext("Not A FQDN!"); } else if (preg_match('/nohost/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) No such host"; + $status = $status_intro . $error_str . gettext("No such host"); } else if (preg_match('/nochg/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Success) No Change In IP Address"; + $status = $status_intro . $success_str . gettext("No Change In IP Address"); $successful_update = true; } else if (preg_match('/good/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Success) IP Address Changed Successfully! (" . $this->_dnsIP . ")"; + $status = $status_intro . $success_str . gettext("IP Address Changed Successfully!") . " (" . $this->_dnsIP . ")"; $successful_update = true; } else if (preg_match('/badauth/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) User Authorization Failed"; + $status = $status_intro . $error_str . gettext("User Authorization Failed"); } else { - $status = "phpDynDNS ({$this->_dnsHost}): (Unknown Response)"; - log_error("phpDynDNS ({$this->_dnsHost}): PAYLOAD: {$data}"); + $status = $status_intro . "(" . gettext("Unknown Response") . ")"; + log_error($status_intro . gettext("PAYLOAD:") . " {$data}"); $this->_debug($data); } break; case 'ovh-dynhost': case 'dyndns': if (preg_match('/notfqdn/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Not A FQDN!"; + $status = $status_intro . $error_str . gettext("Not A FQDN!"); } else if (preg_match('/nochg/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Success) No Change In IP Address"; + $status = $status_intro . $success_str . gettext("No Change In IP Address"); $successful_update = true; } else if (preg_match('/good/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Success) IP Address Changed Successfully! (" . $this->_dnsIP . ")"; + $status = $status_intro . $success_str . gettext("IP Address Changed Successfully!") . " (" . $this->_dnsIP . ")"; $successful_update = true; } else if (preg_match('/noauth/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) User Authorization Failed"; + $status = $status_intro . $error_str . gettext("User Authorization Failed"); } else { - $status = "phpDynDNS ({$this->_dnsHost}): (Unknown Response)"; - log_error("phpDynDNS ({$this->_dnsHost}): PAYLOAD: {$data}"); + $status = $status_intro . "(" . gettext("Unknown Response") . ")"; + log_error($status_intro . gettext("PAYLOAD:") . " {$data}"); $this->_debug($data); } break; case 'dyndns-static': if (preg_match('/notfqdn/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Not A FQDN!"; + $status = $status_intro . $error_str . gettext("Not A FQDN!"); } else if (preg_match('/nochg/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Success) No Change In IP Address"; + $status = $status_intro . $success_str . gettext("No Change In IP Address"); $successful_update = true; } else if (preg_match('/good/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Success) IP Address Changed Successfully!"; + $status = $status_intro . $success_str . gettext("IP Address Changed Successfully!"); $successful_update = true; } else if (preg_match('/noauth/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) User Authorization Failed"; + $status = $status_intro . $error_str . gettext("User Authorization Failed"); } else { - $status = "phpDynDNS ({$this->_dnsHost}): (Unknown Response)"; - log_error("phpDynDNS ({$this->_dnsHost}): PAYLOAD: {$data}"); + $status = $status_intro . "(" . gettext("Unknown Response") . ")"; + log_error($status_intro . gettext("PAYLOAD:") . " {$data}"); $this->_debug($data); } break; case 'dyndns-custom': if (preg_match('/notfqdn/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Not A FQDN!"; + $status = $status_intro . $error_str . gettext("Not A FQDN!"); } else if (preg_match('/nochg/i', $data)) { - $status = "phpDynDNS: (Success) No Change In IP Address"; + $status = $status_intro . $success_str . gettext("No Change In IP Address"); $successful_update = true; } else if (preg_match('/good/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Success) IP Address Changed Successfully!"; + $status = $status_intro . $success_str . gettext("IP Address Changed Successfully!"); $successful_update = true; } else if (preg_match('/noauth/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) User Authorization Failed"; + $status = $status_intro . $error_str . gettext("User Authorization Failed"); } else { - $status = "phpDynDNS ({$this->_dnsHost}): (Unknown Response)"; - log_error("phpDynDNS ({$this->_dnsHost}): PAYLOAD: {$data}"); + $status = $status_intro . "(" . gettext("Unknown Response") . ")"; + log_error($status_intro . gettext("PAYLOAD:") . " {$data}"); $this->_debug($data); } break; @@ -985,81 +942,81 @@ list($ip, $code) = explode(":", $data); switch ($code) { case 0: - $status = "phpDynDNS ({$this->_dnsHost}): (Success) IP address is current, no update performed."; + $status = $status_intro . $success_str . gettext("IP address is current, no update performed."); $successful_update = true; break; case 1: - $status = "phpDynDNS ({$this->_dnsHost}): (Success) DNS hostname update successful."; + $status = $status_intro . $success_str . gettext("DNS hostname update successful."); $successful_update = true; break; case 2: - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Hostname supplied does not exist."; + $status = $status_intro . $error_str . gettext("Hostname supplied does not exist."); break; case 3: - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Invalid Username."; + $status = $status_intro . $error_str . gettext("Invalid Username."); break; case 4: - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Invalid Password."; + $status = $status_intro . $error_str . gettext("Invalid Password."); break; case 5: - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Too many updates sent."; + $status = $status_intro . $error_str . gettext("Too many updates sent."); break; case 6: - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Account disabled due to violation of No-IP terms of service."; + $status = $status_intro . $error_str . gettext("Account disabled due to violation of No-IP terms of service."); break; case 7: - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Invalid IP. IP Address submitted is improperly formatted or is a private IP address or is on a blacklist."; + $status = $status_intro . $error_str . gettext("Invalid IP. IP Address submitted is improperly formatted or is a private IP address or is on a blacklist."); break; case 8: - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Disabled / Locked Hostname."; + $status = $status_intro . $error_str . gettext("Disabled / Locked Hostname."); break; case 9: - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Host updated is configured as a web redirect and no update was performed."; + $status = $status_intro . $error_str . gettext("Host updated is configured as a web redirect and no update was performed."); break; case 10: - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Group supplied does not exist."; + $status = $status_intro . $error_str . gettext("Group supplied does not exist."); break; case 11: - $status = "phpDynDNS ({$this->_dnsHost}): (Success) DNS group update is successful."; + $status = $status_intro . $success_str . gettext("DNS group update is successful."); $successful_update = true; break; case 12: - $status = "phpDynDNS ({$this->_dnsHost}): (Success) DNS group is current, no update performed."; + $status = $status_intro . $success_str . gettext("DNS group is current, no update performed."); $successful_update = true; break; case 13: - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Update client support not available for supplied hostname or group."; + $status = $status_intro . $error_str . gettext("Update client support not available for supplied hostname or group."); break; case 14: - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Hostname supplied does not have offline settings configured."; + $status = $status_intro . $error_str . gettext("Hostname supplied does not have offline settings configured."); break; case 99: - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Client disabled. Client should exit and not perform any more updates without user intervention."; + $status = $status_intro . $error_str . gettext("Client disabled. Client should exit and not perform any more updates without user intervention."); break; case 100: - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Client disabled. Client should exit and not perform any more updates without user intervention."; + $status = $status_intro . $error_str . gettext("Client disabled. Client should exit and not perform any more updates without user intervention."); break; default: - $status = "phpDynDNS ({$this->_dnsHost}): (Unknown Response)"; - $this->_debug("Unknown Response: ".$data); + $status = $status_intro . "(" . gettext("Unknown Response") . ")"; + $this->_debug(gettext("Unknown Response:") . " " . $data); break; } break; case 'easydns': if (preg_match('/NOACCESS/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Authentication Failed: Username and/or Password was Incorrect."; + $status = $status_intro . $error_str . gettext("Authentication Failed: Username and/or Password was Incorrect."); } else if (preg_match('/NOSERVICE/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) No Service: Dynamic DNS Service has been disabled for this domain."; + $status = $status_intro . $error_str . gettext("No Service: Dynamic DNS Service has been disabled for this domain."); } else if (preg_match('/ILLEGAL INPUT/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Illegal Input: Self-Explanatory"; + $status = $status_intro . $error_str . gettext("Illegal Input: Self-Explanatory"); } else if (preg_match('/TOOSOON/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Too Soon: Not Enough Time Has Elapsed Since Last Update"; + $status = $status_intro . $error_str . gettext("Too Soon: Not Enough Time Has Elapsed Since Last Update"); } else if (preg_match('/NOERROR/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Success) IP Updated Successfully!"; + $status = $status_intro . $success_str . gettext("IP Updated Successfully!"); $successful_update = true; } else { - $status = "phpDynDNS ({$this->_dnsHost}): (Unknown Response)"; - log_error("phpDynDNS ({$this->_dnsHost}): PAYLOAD: {$data}"); + $status = $status_intro . "(" . gettext("Unknown Response") . ")"; + log_error($status_intro . gettext("PAYLOAD:") . " " . $data); $this->_debug($data); } break; @@ -1068,130 +1025,130 @@ break; case 'zoneedit': if (preg_match('/799/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error 799) Update Failed!"; + $status = $status_intro . "(" . gettext("Error 799") . ") " . gettext("Update Failed!"); } else if (preg_match('/700/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error 700) Update Failed!"; + $status = $status_intro . "(" . gettext("Error 700") . ") " . gettext("Update Failed!"); } else if (preg_match('/200/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Success) IP Address Updated Successfully!"; + $status = $status_intro . $success_str . gettext("IP Address Updated Successfully!"); $successful_update = true; } else if (preg_match('/201/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Success) IP Address Updated Successfully!"; + $status = $status_intro . $success_str . gettext("IP Address Updated Successfully!"); $successful_update = true; } else { - $status = "phpDynDNS ({$this->_dnsHost}): (Unknown Response)"; - log_error("phpDynDNS ({$this->_dnsHost}): PAYLOAD: {$data}"); + $status = $status_intro . "(" . gettext("Unknown Response") . ")"; + log_error($status_intro . gettext("PAYLOAD:") . " " . $data); $this->_debug($data); } break; case 'dyns': if (preg_match("/400/i", $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Bad Request - The URL was malformed. Required parameters were not provided."; + $status = $status_intro . $error_str . gettext("Bad Request - The URL was malformed. Required parameters were not provided."); } else if (preg_match('/402/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Update Too Soon - You have tried updating to quickly since last change."; + $status = $status_intro . $error_str . gettext("Update Too Soon - You have tried updating to quickly since last change."); } else if (preg_match('/403/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Database Error - There was a server-sided database error."; + $status = $status_intro . $error_str . gettext("Database Error - There was a server-sided database error."); } else if (preg_match('/405/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Hostname Error - The hostname (".$this->_dnsHost.") doesn't belong to you."; + $status = $status_intro . $error_str . sprintf(gettext("Hostname Error - The hostname (%s) doesn't belong to you."), $this->_dnsHost); } else if (preg_match('/200/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Success) IP Address Updated Successfully!"; + $status = $status_intro . $success_str . gettext("IP Address Updated Successfully!"); $successful_update = true; } else { - $status = "phpDynDNS ({$this->_dnsHost}): (Unknown Response)"; - log_error("phpDynDNS ({$this->_dnsHost}): PAYLOAD: {$data}"); + $status = $status_intro . "(" . gettext("Unknown Response") . ")"; + log_error($status_intro . gettext("PAYLOAD:") . " " . $data); $this->_debug($data); } break; case 'ods': if (preg_match("/299/i", $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Success) IP Address Updated Successfully!"; + $status = $status_intro . $success_str . gettext("IP Address Updated Successfully!"); $successful_update = true; } else { - $status = "phpDynDNS ({$this->_dnsHost}): (Unknown Response)"; - log_error("phpDynDNS ({$this->_dnsHost}): PAYLOAD: {$data}"); + $status = $status_intro . "(" . gettext("Unknown Response") . ")"; + log_error($status_intro . gettext("PAYLOAD:") . " " . $data); $this->_debug($data); } break; case 'freedns': if (preg_match("/has not changed./i", $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Success) No Change In IP Address"; + $status = $status_intro . $success_str . gettext("No Change In IP Address"); $successful_update = true; } else if (preg_match("/Updated/i", $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Success) IP Address Changed Successfully!"; + $status = $status_intro . $success_str . gettext("IP Address Changed Successfully!"); $successful_update = true; } else { - $status = "phpDynDNS ({$this->_dnsHost}): (Unknown Response)"; - log_error("phpDynDNS ({$this->_dnsHost}): PAYLOAD: {$data}"); + $status = $status_intro . "(" . gettext("Unknown Response") . ")"; + log_error($status_intro . gettext("PAYLOAD:") . " " . $data); $this->_debug($data); } break; case 'dnsexit': if (preg_match("/is the same/i", $data)) { - $status = "phpDynDns ({$this->_dnsHost}): (Success) No Change In IP Address"; + $status = $status_intro . $success_str . gettext("No Change In IP Address"); $successful_update = true; } else if (preg_match("/Success/i", $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Success) IP Address Changed Successfully!"; + $status = $status_intro . $success_str . gettext("IP Address Changed Successfully!"); $successful_update = true; } else { - $status = "phpDynDNS ({$this->_dnsHost}): (Unknown Response)"; - log_error("phpDynDNS ({$this->_dnsHost}): PAYLOAD: {$data}"); + $status = $status_intro . "(" . gettext("Unknown Response") . ")"; + log_error($status_intro . gettext("PAYLOAD:") . " " . $data); $this->_debug($data); } break; case 'loopia': if (preg_match("/nochg/i", $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Success) No Change In IP Address"; + $status = $status_intro . $success_str . gettext("No Change In IP Address"); $successful_update = true; } else if (preg_match("/good/i", $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Success) IP Address Changed Successfully!"; + $status = $status_intro . $success_str . gettext("IP Address Changed Successfully!"); $successful_update = true; } else if (preg_match('/badauth/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) User Authorization Failed"; + $status = $status_intro . $error_str . gettext("User Authorization Failed"); } else { - $status = "phpDynDNS ({$this->_dnsHost}): (Unknown Response)"; - log_error("phpDynDNS ({$this->_dnsHost}): PAYLOAD: {$data}"); + $status = $status_intro . "(" . gettext("Unknown Response") . ")"; + log_error($status_intro . gettext("PAYLOAD:") . " " . $data); $this->_debug($data); } break; case 'opendns': if (preg_match('/badauth/i', $data)) { - $status = "phpDynDNS({$this->_dnsHost}): (Error) Not a valid username or password!"; + $status = $status_intro . $error_str . gettext("Not a valid username or password!"); } else if (preg_match('/nohost/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Hostname you are trying to update does not exist."; + $status = $status_intro . $error_str . gettext("Hostname you are trying to update does not exist."); $successful_update = true; } else if (preg_match('/good/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Success) IP Address Changed Successfully! (" . $this->_dnsIP . ")"; + $status = $status_intro . $success_str . gettext("IP Address Changed Successfully!") . " (" . $this->_dnsIP . ")"; $successful_update = true; } else if (preg_match('/yours/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) hostname specified exists, but not under the username specified."; + $status = $status_intro . $error_str . gettext("Hostname specified exists, but not under the username specified."); } else if (preg_match('/abuse/i', $data)) { - $status = "phpDynDns ({$this->_dnsHost}): (Error) Updating too frequently, considered abuse."; + $status = $status_intro . $error_str . gettext("Updating too frequently, considered abuse."); } else { - $status = "phpDynDNS ({$this->_dnsHost}): (Unknown Response)"; - log_error("phpDynDNS ({$this->_dnsHost}): PAYLOAD: {$data}"); + $status = $status_intro . "(" . gettext("Unknown Response") . ")"; + log_error($status_intro . gettext("PAYLOAD:") . " " . $data); $this->_debug($data); } break; case 'staticcling': if (preg_match("/invalid ip/i", $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Bad Request - The IP provided was invalid."; + $status = $status_intro . $error_str . gettext("Bad Request - The IP provided was invalid."); } else if (preg_match('/required info missing/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Bad Request - Required parameters were not provided."; + $status = $status_intro . $error_str . gettext("Bad Request - Required parameters were not provided."); } else if (preg_match('/invalid characters/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Bad Request - Illegal characters in either the username or the password."; + $status = $status_intro . $error_str . gettext("Bad Request - Illegal characters in either the username or the password."); } else if (preg_match('/bad password/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Invalid password."; + $status = $status_intro . $error_str . gettext("Invalid password."); } else if (preg_match('/account locked/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) This account has been administratively locked."; + $status = $status_intro . $error_str . gettext("This account has been administratively locked."); } else if (preg_match('/update too frequent/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Updating too frequently."; + $status = $status_intro . $error_str . gettext("Updating too frequently."); } else if (preg_match('/DB error/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Server side error."; + $status = $status_intro . $error_str . gettext("Server side error."); } else if (preg_match('/success/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Success) IP Address Updated Successfully!"; + $status = $status_intro . $success_str . gettext("IP Address Updated Successfully!"); $successful_update = true; } else { - $status = "phpDynDNS ({$this->_dnsHost}): (Unknown Response)"; - log_error("phpDynDNS ({$this->_dnsHost}): PAYLOAD: {$data}"); + $status = $status_intro . "(" . gettext("Unknown Response") . ")"; + log_error($status_intro . gettext("PAYLOAD:") . " " . $data); $this->_debug($data); } break; @@ -1199,18 +1156,18 @@ $tmp = str_replace("^M", "", $data); $ncresponse = @xml2array($tmp); if (preg_match("/internal server error/i", $data)) { - $status = "phpDynDNS: (Error) Server side error."; + $status = $status_intro . $error_str . gettext("Server side error."); } else if (preg_match("/request is badly formed/i", $data)) { - $status = "phpDynDNS: (Error) Badly Formed Request (check your settings)."; + $status = $status_intro . $error_str . gettext("Badly Formed Request (check your settings)."); } else if ($ncresponse['interface-response']['ErrCount'] === "0") { - $status = "phpDynDNS: (Success) IP Address Updated Successfully!"; + $status = $status_intro . $success_str . gettext("IP Address Updated Successfully!"); $successful_update = true; } else if (is_numeric($ncresponse['interface-response']['ErrCount']) && ($ncresponse['interface-response']['ErrCount'] > 0)) { - $status = "phpDynDNS: (Error) " . implode(", ", $ncresponse["interface-response"]["errors"]); + $status = $status_intro . $error_str . implode(", ", $ncresponse["interface-response"]["errors"]); $successful_update = true; } else { - $status = "phpDynDNS: (Unknown Response)"; - log_error("phpDynDNS: PAYLOAD: {$data}"); + $status = $status_intro . "(" . gettext("Unknown Response") . ")"; + log_error($status_intro . gettext("PAYLOAD:") . " " . $data); $this->_debug($data); } break; @@ -1218,20 +1175,20 @@ case 'he-net': case 'he-net-v6': if (preg_match("/badip/i", $data)) { - $status = "phpDynDNS: (Error) Bad Request - The IP provided was invalid."; + $status = $status_intro . $error_str . gettext("Bad Request - The IP provided was invalid."); } else if (preg_match('/nohost/i', $data)) { - $status = "phpDynDNS: (Error) Bad Request - A hostname was not provided."; + $status = $status_intro . $error_str . gettext("Bad Request - A hostname was not provided."); } else if (preg_match('/badauth/i', $data)) { - $status = "phpDynDNS: (Error) Invalid username or password."; + $status = $status_intro . $error_str . gettext("Invalid username or password."); } else if (preg_match('/good/i', $data)) { - $status = "phpDynDNS: (Success) IP Address Updated Successfully!"; + $status = $status_intro . $success_str . gettext("IP Address Updated Successfully!"); $successful_update = true; } else if (preg_match('/nochg/i', $data)) { - $status = "phpDynDNS: (Success) No Change In IP Address."; + $status = $status_intro . $success_str . gettext("No Change In IP Address."); $successful_update = true; } else { - $status = "phpDynDNS: (Unknown Response)"; - log_error("phpDynDNS: PAYLOAD: {$data}"); + $status = $status_intro . "(" . gettext("Unknown Response") . ")"; + log_error($status_intro . gettext("PAYLOAD:") . " " . $data); $this->_debug($data); } break; @@ -1245,37 +1202,37 @@ +OK: Tunnel endpoint updated to: x.x.x.x */ if (preg_match("/Missing parameter/i", $data)) { - $status = "phpDynDNS: (Error) Bad Request - Missing/Invalid Parameters."; + $status = $status_intro . $error_str . gettext("Bad Request - Missing/Invalid Parameters."); } else if (preg_match('/Tunnel not found/i', $data)) { - $status = "phpDynDNS: (Error) Bad Request - Invalid Tunnel ID."; + $status = $status_intro . $error_str . gettext("Bad Request - Invalid Tunnel ID."); } else if (preg_match('/Invalid API key or password/i', $data)) { - $status = "phpDynDNS: (Error) Invalid username or password."; + $status = $status_intro . $error_str . gettext("Invalid username or password."); } else if (preg_match('/OK:/i', $data)) { - $status = "phpDynDNS: (Success) IP Address Updated Successfully!"; + $status = $status_intro . $success_str . gettext("IP Address Updated Successfully!"); $successful_update = true; } else if (preg_match('/This tunnel is already associated with this IP address/i', $data)) { - $status = "phpDynDNS: (Success) No Change In IP Address."; + $status = $status_intro . $success_str . gettext("No Change In IP Address."); $successful_update = true; } else { - $status = "phpDynDNS: (Unknown Response)"; - log_error("phpDynDNS: PAYLOAD: {$data}"); + $status = $status_intro . "(" . gettext("Unknown Response") . ")"; + log_error($status_intro . gettext("PAYLOAD:") . " " . $data); $this->_debug($data); } break; case 'selfhost': if (preg_match('/notfqdn/i', $data)) { - $status = "phpDynDNS: (Error) Not A FQDN!"; + $status = $status_intro . $error_str . gettext("Not A FQDN!"); } else if (preg_match('/nochg/i', $data)) { - $status = "phpDynDNS: (Success) No Change In IP Address"; + $status = $status_intro . $success_str . gettext("No Change In IP Address."); $successful_update = true; } else if (preg_match('/good/i', $data)) { - $status = "phpDynDNS: (Success) IP Address Changed Successfully! (" . $this->_dnsIP . ")"; + $status = $status_intro . $success_str . gettext("IP Address Changed Successfully!") . " (" . $this->_dnsIP . ")"; $successful_update = true; } else if (preg_match('/noauth/i', $data)) { - $status = "phpDynDNS: (Error) User Authorization Failed"; + $status = $status_intro . $error_str . gettext("User Authorization Failed"); } else { - $status = "phpDynDNS: (Unknown Response)"; - log_error("phpDynDNS: PAYLOAD: {$data}"); + $status = $status_intro . "(" . gettext("Unknown Response") . ")"; + log_error($status_intro . gettext("PAYLOAD:") . " " . $data); $this->_debug($data); } break; @@ -1299,57 +1256,57 @@ unset ($matches); } if ($successful_update == true) { - $status = "phpDynDNS: (Success) IP Address Updated Successfully!"; + $status = $status_intro . $success_str . gettext("IP Address Updated Successfully!"); } else { - $status = "phpDynDNS: (Error) Result did not match. [$data]"; + $status = $status_intro . $error_str . gettext("Result did not match.") . " [" . $data . "]"; } break; case 'cloudflare': $output = json_decode($data); if ($output->result->content === $this->_dnsIP) { - $status = "DynDNS: (Success) {$this->_dnsHost} updated to {$this->_dnsIP}"; + $status = $status_intro . $success_str . sprintf(gettext('%1$s updated to %2$s'), $this->_dnsHost, $this->_dnsIP); $successful_update = true; } elseif ($output->errors[0]->code === 9103) { - $status = "DynDNS ({$this->_dnsHost}): ERROR - Invalid Credentials! Don't forget to use API Key for password field with CloudFlare."; + $status = $status_intro . $error_str . gettext("Invalid Credentials! Don't forget to use API Key for password field with CloudFlare."); } elseif (($output->success) && (!$output->result[0]->id)) { - $status = "DynDNS ({$this->_dnsHost}): ERROR - Zone or Host ID was not found, check your hostname."; + $status = $status_intro . $error_str . gettext("Zone or Host ID was not found, check your hostname."); } else { - $status = "DynDNS ({$this->_dnsHost}): UNKNOWN ERROR - {$output->errors[0]->message}"; - log_error("DynDNS ({$this->_dnsHost}): PAYLOAD: {$data}"); + $status = $status_intro . gettext("UNKNOWN ERROR") . " - " . $output->errors[0]->message; + log_error($status_intro . gettext("PAYLOAD:") . " " . $data); } break; case 'eurodns': if (preg_match('/notfqdn/i', $data)) { - $status = "phpDynDNS: (Error) Not A FQDN!"; + $status = $status_intro . $error_str . gettext("Not A FQDN!"); } else if (preg_match('/nochg/i', $data)) { - $status = "phpDynDNS: (Success) No Change In IP Address"; + $status = $status_intro . $success_str . gettext("No Change In IP Address"); $successful_update = true; } else if (preg_match('/good/i', $data)) { - $status = "phpDynDNS: (Success) IP Address Changed Successfully! (" . $this->_dnsIP . ")"; + $status = $status_intro . $success_str . gettext("IP Address Changed Successfully!") . " (" . $this->_dnsIP . ")"; $successful_update = true; } else if (preg_match('/badauth/i', $data)) { - $status = "phpDynDNS: (Error) User Authorization Failed"; + $status = $status_intro . $error_str . gettext("User Authorization Failed"); } else { - $status = "phpDynDNS: (Unknown Response)"; - log_error("phpDynDNS: PAYLOAD: {$data}"); + $status = $status_intro . "(" . gettext("Unknown Response") . ")"; + log_error($status_intro . gettext("PAYLOAD:") . " " . $data); $this->_debug($data); } break; case 'gratisdns': if (preg_match('/Forkerte værdier/i', $data)) { - $status = "phpDynDNS: (Error) Wrong values - Update could not be completed."; + $status = $status_intro . $error_str . gettext("Wrong values - Update could not be completed."); } else if (preg_match('/Bruger login: Bruger eksistere ikke/i', $data)) { - $status = "phpDynDNS: (Error) Unknown username - User does not exist."; + $status = $status_intro . $error_str . gettext("Unknown username - User does not exist."); } else if (preg_match('/Bruger login: 1Fejl i kodeord/i', $data)) { - $status = "phpDynDNS: (Error) Wrong password - Remember password is case sensitive."; + $status = $status_intro . $error_str . gettext("Wrong password - Remember password is case sensitive."); } else if (preg_match('/Domæne kan IKKE administreres af bruger/i', $data)) { - $status = "phpDynDNS: (Error) User unable to administer the selected domain."; + $status = $status_intro . $error_str . gettext("User unable to administer the selected domain."); } else if (preg_match('/OK/i', $data)) { - $status = "phpDynDNS: (Success) IP Address Updated Successfully!"; + $status = $status_intro . $success_str . gettext("IP Address Updated Successfully!"); $successful_update = true; } else { - $status = "phpDynDNS: (Unknown Response)"; - log_error("phpDynDNS: PAYLOAD: {$data}"); + $status = $status_intro . "(" . gettext("Unknown Response") . ")"; + log_error($status_intro . gettext("PAYLOAD:") . " " . $data); $this->_debug($data); } break; @@ -1361,7 +1318,7 @@ $header = substr($data, 0, $header_size); $body = substr($data, $header_size); if (preg_match("/Status: 200\s/i", $header)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Success) IP Address Updated Successfully!"; + $status = $status_intro . $success_str . gettext("IP Address Updated Successfully!"); $successful_update = true; } else if (preg_match("/Status: 4\d\d\s/i", $header)) { $arrbody = json_decode($body, true); @@ -1371,72 +1328,72 @@ $message .= " " . $content . "."; } } - $status = "phpDynDNS ({$this->_dnsHost}): (Error) " . $message; + $status = $status_intro . $error_str . $message; } else { - $status = "phpDynDNS ({$this->_dnsHost}): (Unknown Response)"; - log_error("phpDynDNS ({$this->_dnsHost}): PAYLOAD: {$body}"); + $status = $status_intro . "(" . gettext("Unknown Response") . ")"; + log_error($status_intro . gettext("PAYLOAD:") . " " . $body); $this->_debug($body); } break; case 'googledomains': if (preg_match('/notfqdn/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Not A FQDN"; + $status = $status_intro . $error_str . gettext("Not A FQDN"); } else if (preg_match('/nochg/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Success) No Change In IP Address"; + $status = $status_intro . $success_str . gettext("No Change In IP Address"); $successful_update = true; } else if (preg_match('/good/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Success) IP Address Changed Successfully! (" . $this->_dnsIP . ")"; + $status = $status_intro . $success_str . gettext("IP Address Changed Successfully!") . " (" . $this->_dnsIP . ")"; $successful_update = true; } else if (preg_match('/badauth/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) User Authorization Failed"; + $status = $status_intro . $error_str . gettext("User Authorization Failed"); } else if (preg_match('/nohost/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Hostname does not exist or DynDNS not enabled"; + $status = $status_intro . $error_str . gettext("Hostname does not exist or DynDNS not enabled"); } else if (preg_match('/badagent/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Bad request"; + $status = $status_intro . $error_str . gettext("Bad request"); } else if (preg_match('/abuse/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Dynamic DNS access has been blocked!"; + $status = $status_intro . $error_str . gettext("Dynamic DNS access has been blocked!"); } else if (preg_match('/911/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Error on Google's end, retry in 5 minutes"; + $status = $status_intro . $error_str . gettext("Error on Google's end, retry in 5 minutes"); } else { - $status = "phpDynDNS ({$this->_dnsHost}): (Unknown Response)"; - log_error("phpDynDNS ({$this->_dnsHost}): PAYLOAD: {$data}"); + $status = $status_intro . "(" . gettext("Unknown Response") . ")"; + log_error($status_intro . gettext("PAYLOAD:") . " " . $data); $this->_debug($data); } break; case 'dnsmadeeasy': switch ($data) { case 'success': - $status = "phpDynDNS({$this->_dnsHost}): (Success) IP Address Changed Successfully! (" . $this->_dnsIP . ")"; + $status = $status_intro . $success_str . gettext("IP Address Changed Successfully!") . " (" . $this->_dnsIP . ")"; $successful_update = true; break; case 'error-auth': - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Invalid username or password"; + $status = $status_intro . $error_str . gettext("Invalid username or password"); break; case 'error-auth-suspend': - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Account suspended"; + $status = $status_intro . $error_str . gettext("Account suspended"); break; case 'error-auth-voided': - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Account revoked"; + $status = $status_intro . $error_str . gettext("Account revoked"); break; case 'error-record-invalid': - $status = "phpDynDns ({$this->_dnsHost}): (Error) Record does not exist in the system. Unable to update record"; + $status = $status_intro . $error_str . gettext("Record does not exist in the system. Unable to update record"); break; case 'error-record-auth': - $status = "phpDynDns ({$this->_dnsHost}): (Error) User does not have access to this record"; + $status = $status_intro . $error_str . gettext("User does not have access to this record"); break; case 'error-record-ip-same': - $status = "phpDynDns ({$this->_dnsHost}): (Success) No change in IP Address"; + $status = $status_intro . $success_str . gettext("No Change In IP Address"); $successful_update = true; break; case 'error-system': - $status = "phpDynDns ({$this->_dnsHost}): (Error) General system error recognized by the system"; + $status = $status_intro . $error_str . gettext("General system error recognized by the system"); break; case 'error': - $status = "phpDynDns ({$this->_dnsHost}): (Error) General system error unrecognized by the system"; + $status = $status_intro . $error_str . gettext("General system error unrecognized by the system"); break; default: - $status = "phpDynDNS ({$this->_dnsHost}): (Unknown Response)"; - log_error("phpDynDNS ({$this->_dnsHost}): PAYLOAD: {$data}"); + $status = $status_intro . "(" . gettext("Unknown Response") . ")"; + log_error($status_intro . gettext("PAYLOAD:") . " " . $data); $this->_debug($data); break; } @@ -1444,21 +1401,21 @@ case 'spdns': case 'spdns-v6': if (preg_match('/notfqdn/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) Not A FQDN!"; + $status = $status_intro . $error_str . gettext("Not A FQDN!"); } else if (preg_match('/nohost/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) No such host"; + $status = $status_intro . $error_str . gettext("No such host"); } else if (preg_match('/nochg/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Success) No Change In IP Address"; - $successful_update = true; + $status = $status_intro . $success_str . gettext("No Change In IP Address"); + $successful_update = true; } else if (preg_match('/good/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Success) IP Address Changed Successfully! (".$this->_dnsIP.")"; - $successful_update = true; + $status = $status_intro . $success_str . gettext("IP Address Changed Successfully!") . " (" . $this->_dnsIP . ")"; + $successful_update = true; } else if (preg_match('/badauth/i', $data)) { - $status = "phpDynDNS ({$this->_dnsHost}): (Error) User Authorization Failed"; + $status = $status_intro . $error_str . gettext("User Authorization Failed"); } else { - $status = "phpDynDNS ({$this->_dnsHost}): (Unknown Response)"; - log_error("phpDynDNS ({$this->_dnsHost}): PAYLOAD: {$data}"); - $this->_debug($data); + $status = $status_intro . "(" . gettext("Unknown Response") . ")"; + log_error($status_intro . gettext("PAYLOAD:") . " " . $data); + $this->_debug($data); } break; } @@ -1469,8 +1426,8 @@ conf_mount_rw(); if ($this->_useIPv6 == false && $wan_ip > 0) { $currentTime = time(); - notify_all_remote(sprintf(gettext("DynDNS updated IP Address on %s (%s) to %s"), convert_real_interface_to_friendly_descr($this->_if), $this->_if, $wan_ip)); - log_error("phpDynDNS: updating cache file {$this->_cacheFile}: {$wan_ip}"); + notify_all_remote(sprintf(gettext('DynDNS updated IP Address on %1$s (%2$s) to %3$s'), convert_real_interface_to_friendly_descr($this->_if), $this->_if, $wan_ip)); + log_error(sprintf(gettext('phpDynDNS: updating cache file %1$s: %2$s'), $this->_cacheFile, $wan_ip)); @file_put_contents($this->_cacheFile, "{$wan_ip}:{$currentTime}"); } else { @unlink($this->_cacheFile); @@ -1478,7 +1435,7 @@ if ($this->_useIPv6 == true && $wan_ip > 0) { $currentTime = time(); notify_all_remote(sprintf(gettext("DynDNS updated IPv6 Address on %s (%s) to %s"), convert_real_interface_to_friendly_descr($this->_if), $this->_if, $wan_ip)); - log_error("phpDynDNS: updating cache file {$this->_cacheFile_v6}: {$wan_ip}"); + log_error(sprintf(gettext('phpDynDNS: updating cache file %1$s: %2$s'), $this->_cacheFile_v6, $wan_ip)); @file_put_contents($this->_cacheFile_v6, "{$wan_ip}|{$currentTime}"); } else { @unlink($this->_cacheFile_v6); @@ -1494,38 +1451,40 @@ * Return Error, Set Last Error, and Die. */ function _error($errorNumber = '1') { + $err_str = 'phpDynDNS: (' . gettext('ERROR!') . ') '; + $err_str_r53 = 'Route 53: (' . gettext('Error') . ') '; switch ($errorNumber) { case 0: break; case 2: - $error = 'phpDynDNS: (ERROR!) No Dynamic DNS Service provider was selected.'; + $error = $err_str . gettext('No Dynamic DNS Service provider was selected.'); break; case 3: - $error = 'phpDynDNS: (ERROR!) No Username Provided.'; + $error = $err_str . gettext('No Username Provided.'); break; case 4: - $error = 'phpDynDNS: (ERROR!) No Password Provided.'; + $error = $err_str . gettext('No Password Provided.'); break; case 5: - $error = 'phpDynDNS: (ERROR!) No Hostname Provided.'; + $error = $err_str . gettext('No Hostname Provided.'); break; case 6: - $error = 'phpDynDNS: (ERROR!) The Dynamic DNS Service provided is not yet supported.'; + $error = $err_str . gettext('The Dynamic DNS Service provided is not yet supported.'); break; case 7: - $error = 'phpDynDNS: (ERROR!) No Update URL Provided.'; + $error = $err_str . gettext('No Update URL Provided.'); break; case 8: - $status = "Route 53: (Error) Invalid ZoneID"; + $status = $err_str_r53 . gettext("Invalid ZoneID"); break; case 9: - $status = "Route 53: (Error) Invalid TTL"; + $status = $err_str_r53 . gettext("Invalid TTL"); break; case 10: - $error = "phpDynDNS ({$this->_FQDN}): No change in my IP address and/or " . $this->_dnsMaxCacheAgeDays . " days has not passed. Not updating dynamic DNS entry."; + $error = "phpDynDNS ({$this->_FQDN}): " . sprintf(gettext("No change in my IP address and/or %s days has not passed. Not updating dynamic DNS entry."), $this->_dnsMaxCacheAgeDays); break; default: - $error = "phpDynDNS: (ERROR!) Unknown Response."; + $error = $err_str . gettext('Unknown Response.'); /* FIXME: $data isn't in scope here */ /* $this->_debug($data); */ break; @@ -1544,17 +1503,17 @@ global $debug; if ($debug) { - log_error("DynDns ({$this->_FQDN}): _detectChange() starting."); + log_error(sprintf(gettext('Dynamic DNS %1$s (%2$s): _detectChange() starting.'), $this->_dnsService, $this->_FQDN)); } $currentTime = time(); $wan_ip = $this->_checkIP(); if ($wan_ip == 0) { - log_error("DynDns ({$this->_FQDN}): Current WAN IP could not be determined, skipping update process."); + log_error(sprintf(gettext("Dynamic Dns (%s): Current WAN IP could not be determined, skipping update process."), $this->_FQDN)); return false; } - $log_error = "DynDns ({$this->_FQDN}): Current WAN IP: {$wan_ip} "; + $log_error = sprintf(gettext('Dynamic Dns (%1$s): Current WAN IP: %2$s'), $this->_FQDN, $wan_ip) . " "; if ($this->_useIPv6 == true) { if (file_exists($this->_cacheFile_v6)) { @@ -1562,7 +1521,7 @@ list($cacheIP, $cacheTime) = explode('|', $contents); $this->_debug($cacheIP.'/'.$cacheTime); $initial = false; - $log_error .= "Cached IPv6: {$cacheIP} "; + $log_error .= sprintf(gettext("Cached IPv6: %s"), $cacheIP); } else { conf_mount_rw(); $cacheIP = '::'; @@ -1570,7 +1529,7 @@ conf_mount_ro(); $cacheTime = $currentTime; $initial = true; - $log_error .= "No Cached IPv6 found."; + $log_error .= gettext("No Cached IPv6 found."); } } else { if (file_exists($this->_cacheFile)) { @@ -1578,7 +1537,7 @@ list($cacheIP, $cacheTime) = explode(':', $contents); $this->_debug($cacheIP.'/'.$cacheTime); $initial = false; - $log_error .= "Cached IP: {$cacheIP} "; + $log_error .= sprintf(gettext("Cached IP: %s"), $cacheIP); } else { conf_mount_rw(); $cacheIP = '0.0.0.0'; @@ -1586,7 +1545,7 @@ conf_mount_ro(); $cacheTime = $currentTime; $initial = true; - $log_error .= "No Cached IP found."; + $log_error .= gettext("No Cached IP found."); } } if ($this->_dnsVerboseLog) { @@ -1600,18 +1559,18 @@ /* lets determine if the item needs updating */ if ($cacheIP != $wan_ip) { $needs_updating = true; - $update_reason = "DynDns: cacheIP != wan_ip. Updating. "; - $update_reason .= "Cached IP: {$cacheIP} WAN IP: {$wan_ip} "; + $update_reason = gettext("Dynamic Dns: cacheIP != wan_ip. Updating.") . " "; + $update_reason .= sprintf(gettext('Cached IP: %1$s WAN IP: %2$s'), $cacheIP, $wan_ip) . " "; } if (($currentTime - $cacheTime) > $maxCacheAgeSecs) { $needs_updating = true; $this->_forceUpdateNeeded = true; - $update_reason = "DynDns: More than " . $this->_dnsMaxCacheAgeDays . " days. Updating. "; - $update_reason .= "{$currentTime} - {$cacheTime} > {$maxCacheAgeSecs} "; + $update_reason = sprintf(gettext("Dynamic Dns: More than %s days. Updating."), $this->_dnsMaxCacheAgeDays); + $update_reason .= " {$currentTime} - {$cacheTime} > {$maxCacheAgeSecs} "; } if ($initial == true) { $needs_updating = true; - $update_reason .= "Initial update. "; + $update_reason .= gettext("Initial update."); } /* finally if we need updating then store the @@ -1650,7 +1609,7 @@ global $debug; if ($debug) { - log_error("DynDns ({$this->_FQDN}): _checkIP() starting."); + log_error(sprintf(gettext('Dynamic DNS %1$s (%2$s): _checkIP() starting.'), $this->_dnsService, $this->_FQDN)); } if ($this->_useIPv6 == true) { @@ -1675,7 +1634,7 @@ $try++; } if ($try >= 3) { - log_error("Dyndns debug information ({$this->_FQDN}): Could not resolve {$hosttocheck} to IP using interface IP {$ip_address}."); + log_error(sprintf(gettext('Dynamic DNS %1$s debug information (%2$s): Could not resolve %3$s to IP using interface IP %4$s.'), $this->_dnsService, $this->_FQDN, $hosttocheck, $ip_address)); return 0; } $ip_ch = curl_init("http://{$checkip}"); @@ -1694,15 +1653,15 @@ $ip_address = trim($matches[1]); if (is_ipaddr($ip_address)) { if ($this->_dnsVerboseLog) { - log_error("DynDns ({$this->_FQDN}): {$ip_address} extracted from {$hosttocheck}"); + log_error(sprintf(gettext('Dynamic DNS %1$s (%2$s): %3$s extracted from %4$s'), $this->_dnsService, $this->_FQDN, $ip_address, $hosttocheck)); } } else { - log_error("DynDns ({$this->_FQDN}): IP address could not be extracted from {$hosttocheck}"); + log_error(sprintf(gettext('Dynamic DNS %1$s (%2$s): IP address could not be extracted from %3$s'), $this->_dnsService, $this->_FQDN, $hosttocheck)); return 0; } } else { if ($this->_dnsVerboseLog) { - log_error("DynDns ({$this->_FQDN}): {$ip_address} extracted from local system."); + log_error(sprintf(gettext('Dynamic DNS %1$s (%2$s): %3$s extracted from local system.'), $this->_dnsService, $this->_FQDN, $ip_address)); } } $this->_dnsIP = $ip_address; diff --git a/src/etc/inc/gmirror.inc b/src/etc/inc/gmirror.inc index bacd77f..5520674 100644 --- a/src/etc/inc/gmirror.inc +++ b/src/etc/inc/gmirror.inc @@ -93,11 +93,7 @@ function gmirror_html_status() { $mirrors = gmirror_get_status(); $output = ""; if (count($mirrors) < 1) { -?> -<div class="alert alert-warning" role="alert"> - <p>No Mirrors Found</p> -</div> -<?php + print_info_box(gettext("No mirrors found."), 'warning', false); return; } diff --git a/src/etc/inc/interfaces.inc b/src/etc/inc/interfaces.inc index af0d11f..fb9a766 100644 --- a/src/etc/inc/interfaces.inc +++ b/src/etc/inc/interfaces.inc @@ -1766,6 +1766,8 @@ EOD; } } +/* Omit this, we maintain the default route by other means, and it causes problems with + * default gateway switching. See redmine #1837 if (($interface == "wan" && $founddefaultgw == false) || $setdefaultgw == true) { $setdefaultgw = true; $mpdconf .= <<<EOD @@ -1773,6 +1775,7 @@ EOD; EOD; } +*/ $mpdconf .= <<<EOD set iface {$ondemand} on-demand set iface idle {$ppp['idletimeout']} @@ -3117,18 +3120,18 @@ function interface_mtu_wanted_for_pppoe($realif) { continue; } + $mtus = array(); + if (!empty($ppp['mtu'])) { + $mtus = explode(',', $ppp['mtu']); + } $ports = explode(',', $ppp['ports']); + $mtu_wanted = 1500; foreach ($ports as $pid => $port) { if (get_real_interface($port) != $realif) { continue; } - if (!empty($ppp['mtu'])) { - $mtus = explode(',', $ppp['mtu']); - } else { - $mtus = array(); - } // there is an MTU configured on the port in question if (!empty($mtus[$pid])) { $mtu_wanted = intval($mtus[$pid]) + 8; @@ -3142,7 +3145,6 @@ function interface_mtu_wanted_for_pppoe($realif) { } } } - unset($mtus); if ($mtu_wanted > $mtu) { $mtu = $mtu_wanted; diff --git a/src/etc/inc/pfsense-utils.inc b/src/etc/inc/pfsense-utils.inc index e18c385..1abd642 100644 --- a/src/etc/inc/pfsense-utils.inc +++ b/src/etc/inc/pfsense-utils.inc @@ -423,33 +423,27 @@ function get_carp_interface_status($carpinterface) { global $config; foreach ($config['virtualip']['vip'] as $carp) { - if ($carp['mode'] != "carp") { + if ($carp['mode'] != "carp") continue; - } - $carpif = "_vip{$carp['uniqid']}"; - if ($carpinterface !== $carpif) { + if ($carpinterface !== "_vip{$carp['uniqid']}") continue; - } $interface = get_real_interface($carp['interface']); $vhid = $carp['vhid']; $carp_query = ''; $_gb = exec("/sbin/ifconfig $interface | /usr/bin/grep carp: | /usr/bin/grep \"vhid $vhid\"", $carp_query); foreach ($carp_query as $int) { - if (stripos($int, "MASTER")) { + if (stripos($int, "MASTER")) return "MASTER"; - } - if (stripos($int, "BACKUP")) { + elseif (stripos($int, "BACKUP")) return "BACKUP"; - } - if (stripos($int, "INIT")) { + elseif (stripos($int, "INIT")) return "INIT"; - } } break; } - return; + return ""; } /* diff --git a/src/etc/inc/priv.defs.inc b/src/etc/inc/priv.defs.inc index 2e01ea6..c54ab43 100644 --- a/src/etc/inc/priv.defs.inc +++ b/src/etc/inc/priv.defs.inc @@ -98,14 +98,14 @@ $priv_list['page-status-ipsec-leases']['match'] = array(); $priv_list['page-status-ipsec-leases']['match'][] = "status_ipsec_leases.php*"; $priv_list['page-status-ipsec-sad'] = array(); -$priv_list['page-status-ipsec-sad']['name'] = gettext("WebCfg - Status: IPsec: SAD"); -$priv_list['page-status-ipsec-sad']['descr'] = gettext("Allow access to the 'Status: IPsec: SAD' page."); +$priv_list['page-status-ipsec-sad']['name'] = gettext("WebCfg - Status: IPsec: SADs"); +$priv_list['page-status-ipsec-sad']['descr'] = gettext("Allow access to the 'Status: IPsec: SADs' page."); $priv_list['page-status-ipsec-sad']['match'] = array(); $priv_list['page-status-ipsec-sad']['match'][] = "status_ipsec_sad.php*"; $priv_list['page-status-ipsec-spd'] = array(); -$priv_list['page-status-ipsec-spd']['name'] = gettext("WebCfg - Status: IPsec: SPD"); -$priv_list['page-status-ipsec-spd']['descr'] = gettext("Allow access to the 'Status: IPsec: SPD' page."); +$priv_list['page-status-ipsec-spd']['name'] = gettext("WebCfg - Status: IPsec: SPDs"); +$priv_list['page-status-ipsec-spd']['descr'] = gettext("Allow access to the 'Status: IPsec: SPDs' page."); $priv_list['page-status-ipsec-spd']['match'] = array(); $priv_list['page-status-ipsec-spd']['match'][] = "status_ipsec_spd.php*"; @@ -200,8 +200,8 @@ $priv_list['page-diagnostics-routingtables']['match'] = array(); $priv_list['page-diagnostics-routingtables']['match'][] = "diag_routes.php*"; $priv_list['page-diagnostics-smart'] = array(); -$priv_list['page-diagnostics-smart']['name'] = gettext("WebCfg - Diagnostics: S.M.A.R.T. Monitor Tools"); -$priv_list['page-diagnostics-smart']['descr'] = gettext("Allow access to the 'Diagnostics: S.M.A.R.T. Monitor Tools' page."); +$priv_list['page-diagnostics-smart']['name'] = gettext("WebCfg - Diagnostics: S.M.A.R.T. Status"); +$priv_list['page-diagnostics-smart']['descr'] = gettext("Allow access to the 'Diagnostics: S.M.A.R.T. Status' page."); $priv_list['page-diagnostics-smart']['match'] = array(); $priv_list['page-diagnostics-smart']['match'][] = "diag_smart.php*"; @@ -370,8 +370,8 @@ $priv_list['page-firewall-trafficshaper-queues']['match'] = array(); $priv_list['page-firewall-trafficshaper-queues']['match'][] = "firewall_shaper_queues.php*"; $priv_list['page-firewall-trafficshaper-limiter'] = array(); -$priv_list['page-firewall-trafficshaper-limiter']['name'] = gettext("WebCfg - Firewall: Traffic Shaper: Limiter"); -$priv_list['page-firewall-trafficshaper-limiter']['descr'] = gettext("Allow access to the 'Firewall: Traffic Shaper: Limiter' page."); +$priv_list['page-firewall-trafficshaper-limiter']['name'] = gettext("WebCfg - Firewall: Traffic Shaper: Limiters"); +$priv_list['page-firewall-trafficshaper-limiter']['descr'] = gettext("Allow access to the 'Firewall: Traffic Shaper: Limiters' page."); $priv_list['page-firewall-trafficshaper-limiter']['match'] = array(); $priv_list['page-firewall-trafficshaper-limiter']['match'][] = "firewall_shaper_vinterface.php*"; @@ -869,14 +869,14 @@ $priv_list['page-services-dnsresolver-edithost']['match'] = array(); $priv_list['page-services-dnsresolver-edithost']['match'][] = "services_unbound_host_edit.php*"; $priv_list['page-services-wakeonlan'] = array(); -$priv_list['page-services-wakeonlan']['name'] = gettext("WebCfg - Services: Wake on LAN"); -$priv_list['page-services-wakeonlan']['descr'] = gettext("Allow access to the 'Services: Wake on LAN' page."); +$priv_list['page-services-wakeonlan']['name'] = gettext("WebCfg - Services: Wake-on-LAN"); +$priv_list['page-services-wakeonlan']['descr'] = gettext("Allow access to the 'Services: Wake-on-LAN' page."); $priv_list['page-services-wakeonlan']['match'] = array(); $priv_list['page-services-wakeonlan']['match'][] = "services_wol.php*"; $priv_list['page-services-wakeonlan-edit'] = array(); -$priv_list['page-services-wakeonlan-edit']['name'] = gettext("WebCfg - Services: Wake on LAN: Edit"); -$priv_list['page-services-wakeonlan-edit']['descr'] = gettext("Allow access to the 'Services: Wake on LAN: Edit' page."); +$priv_list['page-services-wakeonlan-edit']['name'] = gettext("WebCfg - Services: Wake-on-LAN: Edit"); +$priv_list['page-services-wakeonlan-edit']['descr'] = gettext("Allow access to the 'Services: Wake-on-LAN: Edit' page."); $priv_list['page-services-wakeonlan-edit']['match'] = array(); $priv_list['page-services-wakeonlan-edit']['match'][] = "services_wol_edit.php*"; @@ -1257,8 +1257,8 @@ $priv_list['page-vpn-vpnl2tp-users-edit']['match'] = array(); $priv_list['page-vpn-vpnl2tp-users-edit']['match'][] = "vpn_l2tp_users_edit.php*"; $priv_list['page-openvpn-client'] = array(); -$priv_list['page-openvpn-client']['name'] = gettext("WebCfg - OpenVPN: Client"); -$priv_list['page-openvpn-client']['descr'] = gettext("Allow access to the 'OpenVPN: Client' page."); +$priv_list['page-openvpn-client']['name'] = gettext("WebCfg - OpenVPN: Clients"); +$priv_list['page-openvpn-client']['descr'] = gettext("Allow access to the 'OpenVPN: Clients' page."); $priv_list['page-openvpn-client']['match'] = array(); $priv_list['page-openvpn-client']['match'][] = "vpn_openvpn_client.php*"; @@ -1269,8 +1269,8 @@ $priv_list['page-openvpn-csc']['match'] = array(); $priv_list['page-openvpn-csc']['match'][] = "vpn_openvpn_csc.php*"; $priv_list['page-openvpn-server'] = array(); -$priv_list['page-openvpn-server']['name'] = gettext("WebCfg - OpenVPN: Server"); -$priv_list['page-openvpn-server']['descr'] = gettext("Allow access to the 'OpenVPN: Server' page."); +$priv_list['page-openvpn-server']['name'] = gettext("WebCfg - OpenVPN: Servers"); +$priv_list['page-openvpn-server']['descr'] = gettext("Allow access to the 'OpenVPN: Servers' page."); $priv_list['page-openvpn-server']['match'] = array(); $priv_list['page-openvpn-server']['match'][] = "vpn_openvpn_server.php*"; diff --git a/src/etc/inc/priv/user.priv.inc b/src/etc/inc/priv/user.priv.inc index fca9be2..ebd4e80 100644 --- a/src/etc/inc/priv/user.priv.inc +++ b/src/etc/inc/priv/user.priv.inc @@ -67,8 +67,8 @@ $priv_list['user-pppoe-dialin']['name'] = gettext("User - VPN: PPPOE Dialin"); $priv_list['user-pppoe-dialin']['descr'] = gettext("Indicates whether the user is allowed to dial in via PPPOE"); $priv_list['page-status-systemlogs-portalauth'] = array(); -$priv_list['page-status-systemlogs-portalauth']['name'] = gettext("WebCfg - Status: System logs: Portal Auth"); -$priv_list['page-status-systemlogs-portalauth']['descr'] = gettext("Allow access to the 'Status: System logs: Portal Auth' page."); +$priv_list['page-status-systemlogs-portalauth']['name'] = gettext("WebCfg - Status: System Logs: Portal Auth"); +$priv_list['page-status-systemlogs-portalauth']['descr'] = gettext("Allow access to the 'Status: System Logs: Portal Auth' page."); $priv_list['page-status-systemlogs-portalauth']['match'] = array(); $priv_list['page-status-systemlogs-portalauth']['match'][] = "status_logs.php?logfile=portalauth"; @@ -91,44 +91,44 @@ $priv_list['page-diagnostics-logs-resolver']['match'] = array(); $priv_list['page-diagnostics-logs-resolver']['match'][] = "status_logs.php?logfile=resolver"; $priv_list['page-status-systemlogs-ipsecvpn'] = array(); -$priv_list['page-status-systemlogs-ipsecvpn']['name'] = gettext("WebCfg - Status: System logs: IPsec VPN"); -$priv_list['page-status-systemlogs-ipsecvpn']['descr'] = gettext("Allow access to the 'Status: System logs: IPsec VPN' page."); +$priv_list['page-status-systemlogs-ipsecvpn']['name'] = gettext("WebCfg - Status: System Logs: IPsec VPN"); +$priv_list['page-status-systemlogs-ipsecvpn']['descr'] = gettext("Allow access to the 'Status: System Logs: IPsec VPN' page."); $priv_list['page-status-systemlogs-ipsecvpn']['match'] = array(); $priv_list['page-status-systemlogs-ipsecvpn']['match'][] = "status_logs.php?logfile=ipsec"; $priv_list['page-status-systemlogs-ntpd'] = array(); -$priv_list['page-status-systemlogs-ntpd']['name'] = gettext("WebCfg - Status: System logs: NTP"); -$priv_list['page-status-systemlogs-ntpd']['descr'] = gettext("Allow access to the 'Status: System logs: NTP' page."); +$priv_list['page-status-systemlogs-ntpd']['name'] = gettext("WebCfg - Status: System Logs: NTP"); +$priv_list['page-status-systemlogs-ntpd']['descr'] = gettext("Allow access to the 'Status: System Logs: NTP' page."); $priv_list['page-status-systemlogs-ntpd']['match'] = array(); $priv_list['page-status-systemlogs-ntpd']['match'][] = "status_logs.php?logfile=ntpd"; $priv_list['page-status-systemlogs-openvpn'] = array(); -$priv_list['page-status-systemlogs-openvpn']['name'] = gettext("WebCfg - Status: System logs: OpenVPN"); -$priv_list['page-status-systemlogs-openvpn']['descr'] = gettext("Allow access to the 'Status: System logs: OpenVPN' page."); +$priv_list['page-status-systemlogs-openvpn']['name'] = gettext("WebCfg - Status: System Logs: OpenVPN"); +$priv_list['page-status-systemlogs-openvpn']['descr'] = gettext("Allow access to the 'Status: System Logs: OpenVPN' page."); $priv_list['page-status-systemlogs-openvpn']['match'] = array(); $priv_list['page-status-systemlogs-openvpn']['match'][] = "status_logs.php?logfile=openvpn"; $priv_list['page-status-systemlogs-ppp'] = array(); -$priv_list['page-status-systemlogs-ppp']['name'] = gettext("WebCfg - Status: System logs: IPsec VPN"); -$priv_list['page-status-systemlogs-ppp']['descr'] = gettext("Allow access to the 'Status: System logs: IPsec VPN' page."); +$priv_list['page-status-systemlogs-ppp']['name'] = gettext("WebCfg - Status: System Logs: IPsec VPN"); +$priv_list['page-status-systemlogs-ppp']['descr'] = gettext("Allow access to the 'Status: System Logs: IPsec VPN' page."); $priv_list['page-status-systemlogs-ppp']['match'] = array(); $priv_list['page-status-systemlogs-ppp']['match'][] = "status_logs.php?logfile=ppp"; $priv_list['page-status-systemlogs-loadbalancer'] = array(); -$priv_list['page-status-systemlogs-loadbalancer']['name'] = gettext("WebCfg - Status: System logs: Load Balancer"); -$priv_list['page-status-systemlogs-loadbalancer']['descr'] = gettext("Allow access to the 'Status: System logs: Load Balancer' page."); +$priv_list['page-status-systemlogs-loadbalancer']['name'] = gettext("WebCfg - Status: System Logs: Load Balancer"); +$priv_list['page-status-systemlogs-loadbalancer']['descr'] = gettext("Allow access to the 'Status: System Logs: Load Balancer' page."); $priv_list['page-status-systemlogs-loadbalancer']['match'] = array(); $priv_list['page-status-systemlogs-loadbalancer']['match'][] = "status_logs.php?logfile=relayd"; $priv_list['page-status-systemlogs-routing'] = array(); -$priv_list['page-status-systemlogs-routing']['name'] = gettext("WebCfg - Status: System logs: Routing"); -$priv_list['page-status-systemlogs-routing']['descr'] = gettext("Allow access to the 'Status: System logs: System: Routing' page."); +$priv_list['page-status-systemlogs-routing']['name'] = gettext("WebCfg - Status: System Logs: Routing"); +$priv_list['page-status-systemlogs-routing']['descr'] = gettext("Allow access to the 'Status: System Logs: System: Routing' page."); $priv_list['page-status-systemlogs-routing']['match'] = array(); $priv_list['page-status-systemlogs-routing']['match'][] = "status_logs.php?logfile=routing"; $priv_list['page-status-systemlogs-wireless'] = array(); -$priv_list['page-status-systemlogs-wireless']['name'] = gettext("WebCfg - Status: System logs: Wireless"); -$priv_list['page-status-systemlogs-wireless']['descr'] = gettext("Allow access to the 'Status: System logs: System: Wireless' page."); +$priv_list['page-status-systemlogs-wireless']['name'] = gettext("WebCfg - Status: System Logs: Wireless"); +$priv_list['page-status-systemlogs-wireless']['descr'] = gettext("Allow access to the 'Status: System Logs: System: Wireless' page."); $priv_list['page-status-systemlogs-wireless']['match'] = array(); $priv_list['page-status-systemlogs-wireless']['match'][] = "status_logs.php?logfile=wireless"; diff --git a/src/usr/local/sbin/ppp-linkdown b/src/usr/local/sbin/ppp-linkdown index 6fca066..3faf5f1 100755 --- a/src/usr/local/sbin/ppp-linkdown +++ b/src/usr/local/sbin/ppp-linkdown @@ -13,9 +13,13 @@ fi if [ "${PROTOCOL}" == "inet" && -s "/tmp/${IF}_defaultgw" ]; then GW=`head -n 1 /tmp/${IF}_defaultgw` - [ -n "${GW}" ] \ - && /sbin/route -q delete default ${GW} + DGW=`/sbin/route -n get -inet default | /usr/bin/awk '/gateway:/ {print $2}'` + # Only remove the default gateway if it matches the gateway for this interface. See redmine #1837 + if [ "${GW}" = "${DGW}" ]; then + /sbin/route -q delete default ${GW} + fi fi + if [ "${PROTOCOL}" == "inet6" ]; then /usr/local/sbin/ppp-ipv6 ${IF} down fi diff --git a/src/usr/local/www/crash_reporter.php b/src/usr/local/www/crash_reporter.php index d24e1b5..cfffd0d 100644 --- a/src/usr/local/www/crash_reporter.php +++ b/src/usr/local/www/crash_reporter.php @@ -87,7 +87,7 @@ function upload_crash_report($files) { return $response; } -$pgtitle = array(gettext("Diagnostics"), gettext("Crash reporter")); +$pgtitle = array(gettext("Diagnostics"), gettext("Crash Reporter")); include('head.inc'); $crash_report_header = "Crash report begins. Anonymous machine information:\n\n"; diff --git a/src/usr/local/www/diag_authentication.php b/src/usr/local/www/diag_authentication.php index 03164b3..6adb424 100644 --- a/src/usr/local/www/diag_authentication.php +++ b/src/usr/local/www/diag_authentication.php @@ -81,7 +81,7 @@ if ($_POST) { if (authenticate_user($_POST['username'], $_POST['password'], $authcfg, $attributes)) { $savemsg = gettext("User") . ": " . $_POST['username'] . " " . gettext("authenticated successfully."); $groups = getUserGroups($_POST['username'], $authcfg, $attributes); - $savemsg .= " " . gettext("This user is a member of groups") . ": <br />"; + $savemsg .= " " . gettext("This user is a member of groups") . ": <br /><br />"; $savemsg .= "<ul>"; foreach ($groups as $group) { $savemsg .= "<li>" . "{$group} " . "</li>"; @@ -109,7 +109,7 @@ if ($input_errors) { } if ($savemsg) { - print('<div class="alert alert-success" role="alert">'. $savemsg.'</div>'); + print_info_box($savemsg, 'success', false); } $form = new Form('Test'); diff --git a/src/usr/local/www/diag_backup.php b/src/usr/local/www/diag_backup.php index 6021346..ea9bbb5 100644 --- a/src/usr/local/www/diag_backup.php +++ b/src/usr/local/www/diag_backup.php @@ -347,7 +347,7 @@ if ($_POST) { conf_mount_ro(); } filter_configure(); - $savemsg = gettext("The configuration area has been restored. You may need to reboot the firewall."); + $savemsg = gettext("The configuration area has been restored. You may need to reboot the firewall."); } } } else { @@ -527,7 +527,7 @@ if ($_POST) { exit; } else if ($mode == "clearpackagelock") { clear_subsystem_dirty('packagelock'); - $savemsg = "Package Lock Cleared"; + $savemsg = "Package lock cleared."; } else if ($mode == "restore_ver") { $input_errors[] = gettext("XXX - this feature may hose your config (do NOT backrev configs!) - billm"); if ($ver2restore <> "") { @@ -575,7 +575,7 @@ function build_area_list($showall) { "snmpd" => gettext("SNMP Server"), "shaper" => gettext("Traffic Shaper"), "vlans" => gettext("VLANS"), - "wol" => gettext("Wake on LAN") + "wol" => gettext("Wake-on-LAN") ); $list = array("" => gettext("All")); @@ -593,7 +593,7 @@ function build_area_list($showall) { } } -$pgtitle = array(gettext("Diagnostics"), gettext("Backup/Restore")); +$pgtitle = array(gettext("Diagnostics"), gettext("Backup/Restore"), gettext("Backup/Restore")); include("head.inc"); if ($input_errors) { diff --git a/src/usr/local/www/diag_confbak.php b/src/usr/local/www/diag_confbak.php index 495f9f7..7ba6c91 100644 --- a/src/usr/local/www/diag_confbak.php +++ b/src/usr/local/www/diag_confbak.php @@ -132,7 +132,7 @@ cleanup_backupcache(false); $confvers = get_backups(); unset($confvers['versions']); -$pgtitle = array(gettext("Diagnostics"), gettext("Configuration History")); +$pgtitle = array(gettext("Diagnostics"), gettext("Backup/Restore"), gettext("Config History")); include("head.inc"); if ($savemsg) { diff --git a/src/usr/local/www/diag_defaults.php b/src/usr/local/www/diag_defaults.php index 62a31af..d8233a1 100755 --- a/src/usr/local/www/diag_defaults.php +++ b/src/usr/local/www/diag_defaults.php @@ -70,7 +70,7 @@ if ($_POST['Submit'] == " " . gettext("No") . " ") { exit; } -$pgtitle = array(gettext("Diagnostics"), gettext("Factory defaults")); +$pgtitle = array(gettext("Diagnostics"), gettext("Factory Defaults")); include("head.inc"); ?> diff --git a/src/usr/local/www/diag_dns.php b/src/usr/local/www/diag_dns.php index 367d166..e74ebba 100755 --- a/src/usr/local/www/diag_dns.php +++ b/src/usr/local/www/diag_dns.php @@ -212,11 +212,11 @@ include("head.inc"); if ($input_errors) { print_input_errors($input_errors); } else if (!$resolved && $type) { - print('<div class="alert alert-warning" role="alert">' . sprintf(gettext('Host "%s" could not be resolved'), $host) . '</div>'); + print_info_box(sprintf(gettext('Host "%s" could not be resolved.'), $host), 'warning', false); } if ($createdalias) { - print('<div class="alert alert-success" role="alert">' . gettext("Alias was created/updated successfully") . '</div>'); + print_info_box(gettext("Alias was created/updated successfully."), 'success', false); } $form = new Form('Lookup'); diff --git a/src/usr/local/www/diag_dump_states.php b/src/usr/local/www/diag_dump_states.php index 76d312b..6e11e6e 100755 --- a/src/usr/local/www/diag_dump_states.php +++ b/src/usr/local/www/diag_dump_states.php @@ -105,7 +105,7 @@ if (isset($_POST['filter']) && isset($_POST['killfilter'])) { } } -$pgtitle = array(gettext("Diagnostics"), gettext("Show States")); +$pgtitle = array(gettext("Diagnostics"), gettext("States"), gettext("States")); include("head.inc"); ?> @@ -289,12 +289,12 @@ print $form; if ($states == 0) { if (isset($_POST['filter']) && !empty($_POST['filter'])) { - $errmsg = gettext('No states were found that match the current filter'); + $errmsg = gettext('No states were found that match the current filter.'); } else { - $errmsg = gettext('No states were found'); + $errmsg = gettext('No states were found.'); } - print('<p class="alert alert-warning">' . $errmsg . '</p>'); + print_info_box($errmsg, 'warning', false); } include("foot.inc"); diff --git a/src/usr/local/www/diag_dump_states_sources.php b/src/usr/local/www/diag_dump_states_sources.php index 23877e8..4aab13d 100644 --- a/src/usr/local/www/diag_dump_states_sources.php +++ b/src/usr/local/www/diag_dump_states_sources.php @@ -84,7 +84,7 @@ if ($_POST['filter']) { } -$pgtitle = array(gettext("Diagnostics"), gettext("Show Source Tracking")); +$pgtitle = array(gettext("Diagnostics"), gettext("States"), gettext("Source Tracking")); include("head.inc"); $tab_array = array(); @@ -190,7 +190,7 @@ if (count($sources) > 0) { </div> <?php if ($row == 0) { - print('<p class="alert alert-warning">' . gettext('No source tracking entries were found.') . '</p>'); + print_info_box(gettext('No source tracking entries were found.'), 'warning', false); } include("foot.inc"); diff --git a/src/usr/local/www/diag_halt.php b/src/usr/local/www/diag_halt.php index 7e45554..848d96b 100755 --- a/src/usr/local/www/diag_halt.php +++ b/src/usr/local/www/diag_halt.php @@ -75,17 +75,15 @@ if ($_POST['save'] == 'No') { exit; } -$pgtitle = array(gettext("Diagnostics"), gettext("Halt system")); +$pgtitle = array(gettext("Diagnostics"), gettext("Halt System")); include('head.inc'); if ($_SERVER['REQUEST_METHOD'] == 'POST') { ?> <meta http-equiv="refresh" content="70;url=/"> - <div class="alert alert-success" role="alert"> - <?=gettext("The system is halting now. This may take one minute or so.")?> - </div> - <?php + print_info_box(gettext("The system is halting now. This may take one minute or so."), 'success', false); + if (DEBUG) { print(sprintf(gettext("Not actually halting (DEBUG is set true)%s"), "<br />")); } else { diff --git a/src/usr/local/www/diag_nanobsd.php b/src/usr/local/www/diag_nanobsd.php index 0183325..95b15c2 100644 --- a/src/usr/local/www/diag_nanobsd.php +++ b/src/usr/local/www/diag_nanobsd.php @@ -90,7 +90,7 @@ if ($_POST['bootslice']) { sleep(4); } - $savemsg = sprintf(gettext("The boot slice has been set to %s"), nanobsd_get_active_slice()); + $savemsg = sprintf(gettext("The boot slice has been set to %s."), nanobsd_get_active_slice()); $class = 'alert-success'; // Survey slice info nanobsd_detect_slice_info(); @@ -103,7 +103,7 @@ if ($_POST['destslice'] && $_POST['duplicateslice']) { $savemsg = gettext("The slice has been duplicated.") . "<p/>" . gettext("If you would like to boot from this newly duplicated slice please set it using the bootup information area."); $class = 'alert-success'; } else { - $savemsg = gettext("There was an error while duplicating the slice. Operation aborted."); + $savemsg = gettext("There was an error while duplicating the slice. Operation aborted."); $class = 'alert-danger'; } // Re-Survey slice info @@ -134,7 +134,7 @@ if ($_POST['setrw']) { write_config(gettext("Changed Permanent Read/Write Setting")); conf_mount_ro(); } else { - $savemsg = gettext('Saved r/w permanently'); + $savemsg = gettext('Saved read/write permanently.'); $class = 'alert-success'; } } diff --git a/src/usr/local/www/diag_packet_capture.php b/src/usr/local/www/diag_packet_capture.php index 29e434d..f938c08 100644 --- a/src/usr/local/www/diag_packet_capture.php +++ b/src/usr/local/www/diag_packet_capture.php @@ -463,7 +463,7 @@ if ($do_tcpdump) : if ($action == gettext("Start")) { $matchstr = implode($matches, " and "); - print_info_box(gettext('Packet Capture is running'), 'info'); + print_info_box(gettext('Packet capture is running.'), 'info'); $cmd = "/usr/sbin/tcpdump -i {$selectedif} {$disablepromiscuous} {$searchcount} -s {$snaplen} -w {$fp}{$fn} " . escapeshellarg($matchstr); // Debug diff --git a/src/usr/local/www/diag_reboot.php b/src/usr/local/www/diag_reboot.php index d00ee82..be3a2dd 100755 --- a/src/usr/local/www/diag_reboot.php +++ b/src/usr/local/www/diag_reboot.php @@ -73,13 +73,13 @@ require("captiveportal.inc"); $guitimeout = 90; // Seconds to wait before reloading the page after reboot $guiretry = 20; // Seconds to try again if $guitimeout was not long enough -$pgtitle = array(gettext("Diagnostics"), gettext("Reboot System")); +$pgtitle = array(gettext("Diagnostics"), gettext("Reboot")); include("head.inc"); if ($_SERVER['REQUEST_METHOD'] == 'POST') { if (DEBUG) { - print_info_box(gettext("Not actually rebooting (DEBUG is set true)"), 'success'); + print_info_box(gettext("Not actually rebooting (DEBUG is set true)."), 'success'); } else { print('<div><pre>'); system_reboot(); diff --git a/src/usr/local/www/diag_resetstate.php b/src/usr/local/www/diag_resetstate.php index 4206d91..d8d5a7f 100644 --- a/src/usr/local/www/diag_resetstate.php +++ b/src/usr/local/www/diag_resetstate.php @@ -86,7 +86,7 @@ if ($_POST) { } } -$pgtitle = array(gettext("Diagnostics"), gettext("Reset state")); +$pgtitle = array(gettext("Diagnostics"), gettext("States"), gettext("Reset States")); include("head.inc"); if ($input_errors) { @@ -94,7 +94,7 @@ if ($input_errors) { } if ($savemsg) { - print_info_box($savemsg, 'alert-success'); + print_info_box($savemsg, 'success'); } $statetablehelp = sprintf(gettext('Resetting the state tables will remove all entries from the corresponding tables. This means that all open connections ' . diff --git a/src/usr/local/www/diag_routes.php b/src/usr/local/www/diag_routes.php index cc68313..3cb7f63 100644 --- a/src/usr/local/www/diag_routes.php +++ b/src/usr/local/www/diag_routes.php @@ -94,7 +94,7 @@ if (isset($_REQUEST['isAjax'])) { exit; } -$pgtitle = array(gettext("Diagnostics"), gettext("Routing tables")); +$pgtitle = array(gettext("Diagnostics"), gettext("Routes")); $shortcut_section = "routing"; include('head.inc'); diff --git a/src/usr/local/www/diag_smart.php b/src/usr/local/www/diag_smart.php index 57fe59b..812c674 100644 --- a/src/usr/local/www/diag_smart.php +++ b/src/usr/local/www/diag_smart.php @@ -56,14 +56,14 @@ ##|+PRIV ##|*IDENT=page-diagnostics-smart -##|*NAME=Diagnostics: S.M.A.R.T. Monitor Tools -##|*DESCR=Allow access to the 'Diagnostics: S.M.A.R.T. Monitor Tools' page. +##|*NAME=Diagnostics: S.M.A.R.T. Status +##|*DESCR=Allow access to the 'Diagnostics: S.M.A.R.T. Status' page. ##|*MATCH=diag_smart.php* ##|-PRIV require("guiconfig.inc"); -$pgtitle = array(gettext("Diagnostics"), gettext("S.M.A.R.T. Monitor Tools")); +$pgtitle = array(gettext("Diagnostics"), gettext("S.M.A.R.T. Status")); $smartctl = "/usr/local/sbin/smartctl"; $smartd = "/usr/local/sbin/smartd"; $start_script = "/usr/local/etc/rc.d/smartd.sh"; @@ -327,7 +327,7 @@ switch ($action) { $group->add(new Form_Checkbox( 'type', null, - 'SMART Capabilities', + 'S.M.A.R.T. Capabilities', false, 'c' ))->displayAsRadio(); diff --git a/src/usr/local/www/diag_states_summary.php b/src/usr/local/www/diag_states_summary.php index a8a9cfd..0dbdfe1 100644 --- a/src/usr/local/www/diag_states_summary.php +++ b/src/usr/local/www/diag_states_summary.php @@ -218,7 +218,7 @@ function print_summary_table($label, $iparr, $sort = TRUE) { <?php } -$pgtitle = array(gettext("Diagnostics"), gettext("State Table Summary")); +$pgtitle = array(gettext("Diagnostics"), gettext("States Summary")); require_once("guiconfig.inc"); include("head.inc"); diff --git a/src/usr/local/www/diag_tables.php b/src/usr/local/www/diag_tables.php index 769fab4..8a160d3 100644 --- a/src/usr/local/www/diag_tables.php +++ b/src/usr/local/www/diag_tables.php @@ -127,7 +127,7 @@ if ($savemsg) { } if ($tablename == "webConfiguratorlockout") { - $displayname = gettext("Web Configurator Lockout Table"); + $displayname = gettext("webConfigurator Lockout Table"); } else { $displayname = sprintf(gettext("%s Table"), ucfirst($tablename)); } @@ -169,9 +169,9 @@ if ($bogons || !empty($entries)) { <?php $last_updated = exec('/usr/bin/grep -i -m 1 -E "^# last updated" /etc/' . escapeshellarg($tablename) . '|cut -d"(" -f2|tr -d ")" '); if ($last_updated != "") { - print_info_box(gettext("Table last updated on ") . $last_updated, 'info', false); + print_info_box(gettext("Table last updated on ") . $last_updated . ".", 'info', false); } else { - print_info_box(gettext("Date of last update of table is unknown"), 'info', false); + print_info_box(gettext("Date of last update of table is unknown."), 'info', false); } ?> </div> @@ -241,10 +241,8 @@ events.push(function() { </div> </div> -<?php if (empty($entries)): ?> - <div class="alert alert-warning" role="alert"><?=gettext("No entries exist in this table")?></div> -<?php endif ?> - <?php - +if (empty($entries)) { + print_info_box(gettext("No entries exist in this table."), 'warning', false); +} include("foot.inc"); diff --git a/src/usr/local/www/diag_testport.php b/src/usr/local/www/diag_testport.php index ccdb41e..570289b 100644 --- a/src/usr/local/www/diag_testport.php +++ b/src/usr/local/www/diag_testport.php @@ -225,25 +225,24 @@ if ($input_errors) { // User asked for a port test if ($retval == 0) { // Good host & port - $alert_text = '<div class="alert alert-success" role="alert">' . sprintf(gettext('Port test to host: %1$s Port: %2$s successful'), $host, $port); + $alert_text = sprintf(gettext('Port test to host: %1$s Port: %2$s successful.'), $host, $port); if ($showtext) { $alert_text .= ' ' . gettext('Any text received from the host will be shown below the form.'); } + print_info_box($alert_text, 'success', false); } else { // netcat exit value != 0 - $alert_text = '<div class="alert alert-danger" role="alert">'; if ($showtext) { - $alert_text .= gettext('No output received, or connection failed. Try with "Show Remote Text" unchecked first.'); + $alert_text = gettext('No output received, or connection failed. Try with "Show Remote Text" unchecked first.'); } else { - $alert_text .= gettext('Connection failed.'); + $alert_text = gettext('Connection failed.'); } + print_info_box($alert_text, 'danger', false); } - print ($alert_text . '</div>'); } else { // First time, new page - print('<div class="alert alert-warning" role="alert">' . - gettext('This page allows you to perform a simple TCP connection test to determine if a host is up and accepting connections on a given port.') . " " . - gettext('This test does not function for UDP since there is no way to reliably determine if a UDP port accepts connections in this manner.') . '</div>'); + print_info_box(gettext('This page allows you to perform a simple TCP connection test to determine if a host is up and accepting connections on a given port.') . " " . + gettext('This test does not function for UDP since there is no way to reliably determine if a UDP port accepts connections in this manner.'), 'warning', false); } $form = new Form('Test'); diff --git a/src/usr/local/www/edit.php b/src/usr/local/www/edit.php index a9b8637..6b78a83 100644 --- a/src/usr/local/www/edit.php +++ b/src/usr/local/www/edit.php @@ -62,25 +62,30 @@ ##|*MATCH=filebrowser/browser.php* ##|-PRIV -$pgtitle = array(gettext("Diagnostics"), gettext("Edit file")); +$pgtitle = array(gettext("Diagnostics"), gettext("Edit File")); require("guiconfig.inc"); if ($_POST['action']) { - $button_html = '<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">×</span></button>'; - $alert_danger_html = '<div class="alert alert-danger" role="alert">' . $button_html; - $alert_success_html = '<div class="alert alert-success" role="alert">' . $button_html; switch ($_POST['action']) { case 'load': if (strlen($_POST['file']) < 1) { - print('|5|' . $alert_danger_html . gettext("No file name specified") . '</div>' . '|'); + print('|5|'); + print_info_box(gettext("No file name specified."), 'danger', false); + print('|'); } elseif (is_dir($_POST['file'])) { - print('|4|' . $alert_danger_html . gettext("Loading a directory is not supported") . '</div>' . '|'); + print('|4|'); + print_info_box(gettext("Loading a directory is not supported."), 'danger', false); + print('|'); } elseif (!is_file($_POST['file'])) { - print('|3|' . $alert_danger_html . gettext("File does not exist or is not a regular file") . '</div>' . '|'); + print('|3|'); + print_info_box(gettext("File does not exist or is not a regular file."), 'danger', false); + print('|'); } else { $data = file_get_contents(urldecode($_POST['file'])); if ($data === false) { - print('|1|' . $alert_danger_html . gettext("Failed to read file") . '</div>' . '|'); + print('|1|'); + print_info_box(gettext("Failed to read file."), 'danger', false); + print('|'); } else { $data = base64_encode($data); print("|0|{$_POST['file']}|{$data}|"); @@ -90,7 +95,9 @@ if ($_POST['action']) { case 'save': if (strlen($_POST['file']) < 1) { - print('|' . $alert_danger_html . gettext("No file name specified") . '</div>' . '|'); + print('|'); + print_info_box(gettext("No file name specified."), 'danger', false); + print('|'); } else { conf_mount_rw(); $_POST['data'] = str_replace("\r", "", base64_decode($_POST['data'])); @@ -103,11 +110,17 @@ if ($_POST['action']) { disable_security_checks(); } if ($ret === false) { - print('|' . $alert_danger_html . gettext("Failed to write file") . '</div>' . '|'); + print('|'); + print_info_box(gettext("Failed to write file."), 'danger', false); + print('|'); } elseif ($ret != strlen($_POST['data'])) { - print('|' . $alert_danger_html . gettext("Error while writing file") . '</div>' . '|'); + print('|'); + print_info_box(gettext("Error while writing file."), 'danger', false); + print('|'); } else { - print('|' . $alert_success_html . gettext("File saved successfully") . '</div>' . '|'); + print('|'); + print_info_box(gettext("File saved successfully."), 'success', false); + print('|'); } } exit; @@ -119,7 +132,7 @@ require("head.inc"); ?> <!-- file status box --> <div style="display:none; background:#eeeeee;" id="fileStatusBox"> - <strong id="fileStatus"></strong> + <div id="fileStatus"></div> </div> <div class="panel panel-default"> diff --git a/src/usr/local/www/exec.php b/src/usr/local/www/exec.php index 39d5a33..1b3f7aa 100644 --- a/src/usr/local/www/exec.php +++ b/src/usr/local/www/exec.php @@ -90,7 +90,7 @@ if (($_POST['submit'] == "DOWNLOAD") && file_exists($_POST['dlPath'])) { exit; } else if (($_POST['submit'] == "UPLOAD") && is_uploaded_file($_FILES['ulfile']['tmp_name'])) { move_uploaded_file($_FILES['ulfile']['tmp_name'], "/tmp/" . $_FILES['ulfile']['name']); - $ulmsg = sprintf(gettext('Uploaded file to /tmp/%s'), htmlentities($_FILES['ulfile']['name'])); + $ulmsg = sprintf(gettext('Uploaded file to /tmp/%s.'), htmlentities($_FILES['ulfile']['name'])); unset($_POST['txtCommand']); } @@ -122,7 +122,7 @@ $ScriptName = $REQUEST['SCRIPT_NAME']; $arrDT = localtime(); $intYear = $arrDT[5] + 1900; -$pgtitle = array(gettext("Diagnostics"), gettext("Execute command")); +$pgtitle = array(gettext("Diagnostics"), gettext("Command Prompt")); include("head.inc"); ?> <script type="text/javascript"> @@ -218,7 +218,7 @@ if (isBlank($_POST['txtRecallBuffer'])) { <?php if (isBlank($_POST['txtCommand']) && isBlank($_POST['txtPHPCommand']) && isBlank($ulmsg)) { - print('<div class="alert alert-warning" role="alert">' . gettext("The capabilities offered here can be dangerous. No support is available. Use them at your own risk!") . '</div>'); + print_info_box(gettext("The capabilities offered here can be dangerous. No support is available. Use them at your own risk!"), 'warning', false); } if (!isBlank($_POST['txtCommand'])):?> @@ -269,7 +269,7 @@ if (!isBlank($_POST['txtCommand'])):?> <?php if ($ulmsg) { - print('<div class="alert alert-success" role="alert">' . $ulmsg . '</div>'); + print_info_box($ulmsg, 'success', false); } ?> <div class="panel panel-default"> diff --git a/src/usr/local/www/firewall_aliases.php b/src/usr/local/www/firewall_aliases.php index a07da68..88d0d43 100644 --- a/src/usr/local/www/firewall_aliases.php +++ b/src/usr/local/www/firewall_aliases.php @@ -130,7 +130,7 @@ if ($_GET['act'] == "del") { // Static routes find_alias_reference(array('staticroutes', 'route'), array('network'), $alias_name, $is_alias_referenced, $referenced_by); if ($is_alias_referenced == true) { - $savemsg = sprintf(gettext("Cannot delete alias. Currently in use by %s"), htmlspecialchars($referenced_by)); + $savemsg = sprintf(gettext("Cannot delete alias. Currently in use by %s."), htmlspecialchars($referenced_by)); } else { if (preg_match("/urltable/i", $a_aliases[$_GET['id']]['type'])) { // this is a URL table type alias, delete its file as well diff --git a/src/usr/local/www/firewall_rules.php b/src/usr/local/www/firewall_rules.php index 2d262fb..c6c9206 100644 --- a/src/usr/local/www/firewall_rules.php +++ b/src/usr/local/www/firewall_rules.php @@ -78,9 +78,10 @@ function get_pf_rules($rules, $tracker) { return (NULL); $arr = array(); - for ($i = 0; $i < count($rules); $i++) { - if ($rules[$i]['tracker'] === $tracker) - $arr[] = $rules[$i]; + foreach ($rules as $rule) { + if ($rule['tracker'] === $tracker) { + $arr[] = $rule; + } } if (count($arr) == 0) @@ -99,16 +100,20 @@ function print_states($tracker) { $evaluations = 0; $stcreations = 0; $rules = get_pf_rules($rulescnt, $tracker); - for ($j = 0; is_array($rules) && $j < count($rules); $j++) { - $bytes += $rules[$j]['bytes']; - $states += $rules[$j]['states']; - $packets += $rules[$j]['packets']; - $evaluations += $rules[$j]['evaluations']; - $stcreations += $rules[$j]['state creations']; - if (strlen($rulesid) > 0) - $rulesid .= ","; - $rulesid .= "{$rules[$j]['id']}"; + if (is_array($rules)) { + foreach ($rules as $rule) { + $bytes += $rule['bytes']; + $states += $rule['states']; + $packets += $rule['packets']; + $evaluations += $rule['evaluations']; + $stcreations += $rule['state creations']; + if (strlen($rulesid) > 0) { + $rulesid .= ","; + } + $rulesid .= "{$rule['id']}"; + } } + printf("<a href=\"diag_dump_states.php?ruleid=%s\" data-toggle=\"popover\" data-trigger=\"hover focus\" title=\"%s\" ", $rulesid, gettext("States details")); printf("data-content=\"evaluations: %s<br>packets: %s<br>bytes: %s<br>states: %s<br>state creations: %s\" data-html=\"true\">", @@ -208,7 +213,7 @@ if ($_POST) { clear_subsystem_dirty('filter'); - $savemsg = sprintf(gettext("The settings have been applied. The firewall rules are now reloading in the background.<br />You can also %s monitor %s the reload progress"), + $savemsg = sprintf(gettext("The settings have been applied. The firewall rules are now reloading in the background.<br />You can also %s monitor %s the reload progress."), "<a href='status_filter_reload.php'>", "</a>"); } } @@ -479,8 +484,9 @@ $separators = $config['filter']['separator'][strtolower($if)]; // More efficient than looping through the list of separators on every row. $seprows = separator_rows($separators); -for ($i = 0; isset($a_filter[$i]); $i++): - $filterent = $a_filter[$i]; +foreach ($a_filter as $filteri => $filterent): + + $i = $filteri; if (($filterent['interface'] == $if && !isset($filterent['floating'])) || (isset($filterent['floating']) && "FloatingRules" == $if)) { @@ -794,7 +800,7 @@ for ($i = 0; isset($a_filter[$i]); $i++): <?php $nrules++; } -endfor; +endforeach; // There can be separator(s) after the last rule listed. if ($seprows[$nrules]) { diff --git a/src/usr/local/www/firewall_rules_edit.php b/src/usr/local/www/firewall_rules_edit.php index 16fb991..444e461 100644 --- a/src/usr/local/www/firewall_rules_edit.php +++ b/src/usr/local/www/firewall_rules_edit.php @@ -1379,7 +1379,7 @@ $section->addInput(new Form_Checkbox( $pconfig['log'] ))->setHelp('Hint: the firewall has limited local log space. Don\'t turn on logging '. 'for everything. If you want to do a lot of logging, consider using a remote '. - 'syslog server (see the <a href="status_logs_settings.php">Status: System logs: '. + 'syslog server (see the <a href="status_logs_settings.php">Status: System Logs: '. 'Settings</a> page).'); $section->addInput(new Form_Input( diff --git a/src/usr/local/www/firewall_schedule.php b/src/usr/local/www/firewall_schedule.php index c44a53a..e531a80 100644 --- a/src/usr/local/www/firewall_schedule.php +++ b/src/usr/local/www/firewall_schedule.php @@ -99,7 +99,7 @@ if ($_GET['act'] == "del") { } if ($is_schedule_referenced == true) { - $savemsg = sprintf(gettext("Cannot delete Schedule. Currently in use by %s"), $referenced_by); + $savemsg = sprintf(gettext("Cannot delete schedule. Currently in use by %s."), $referenced_by); } else { unset($a_schedules[$_GET['id']]); write_config(); @@ -280,7 +280,7 @@ endforeach; </nav> <div class="infoblock"> - <?=print_info_box(gettext('Schedules act as placeholders for time ranges to be used in Firewall Rules.'), 'info', false)?> + <?=print_info_box(gettext('Schedules act as placeholders for time ranges to be used in firewall rules.'), 'info', false)?> </div> <?php diff --git a/src/usr/local/www/firewall_shaper.php b/src/usr/local/www/firewall_shaper.php index 837d200..37efc22 100644 --- a/src/usr/local/www/firewall_shaper.php +++ b/src/usr/local/www/firewall_shaper.php @@ -166,7 +166,7 @@ if ($_GET) { $class = 'warning'; } } else { - $savemsg = gettext("Unable to write config.xml (Access Denied?)"); + $savemsg = gettext("Unable to write config.xml (Access Denied?)."); $class = 'warning'; } @@ -402,7 +402,6 @@ if ($queue) { } } -//$pgtitle = "Firewall: Shaper: By Interface View"; include("head.inc"); $tree = '<ul class="tree" >'; @@ -436,7 +435,7 @@ if (is_subsystem_dirty('shaper')) { $tab_array = array(); $tab_array[] = array(gettext("By Interface"), true, "firewall_shaper.php"); $tab_array[] = array(gettext("By Queue"), false, "firewall_shaper_queues.php"); -$tab_array[] = array(gettext("Limiter"), false, "firewall_shaper_vinterface.php"); +$tab_array[] = array(gettext("Limiters"), false, "firewall_shaper_vinterface.php"); $tab_array[] = array(gettext("Wizards"), false, "firewall_shaper_wizards.php"); display_top_tabs($tab_array); diff --git a/src/usr/local/www/firewall_shaper_queues.php b/src/usr/local/www/firewall_shaper_queues.php index 501ee53..65bfa9a 100644 --- a/src/usr/local/www/firewall_shaper_queues.php +++ b/src/usr/local/www/firewall_shaper_queues.php @@ -242,7 +242,7 @@ if (is_subsystem_dirty('shaper')) { $tab_array = array(); $tab_array[] = array(gettext("By Interface"), false, "firewall_shaper.php"); $tab_array[] = array(gettext("By Queue"), true, "firewall_shaper_queues.php"); -$tab_array[] = array(gettext("Limiter"), false, "firewall_shaper_vinterface.php"); +$tab_array[] = array(gettext("Limiters"), false, "firewall_shaper_vinterface.php"); $tab_array[] = array(gettext("Wizards"), false, "firewall_shaper_wizards.php"); display_top_tabs($tab_array); diff --git a/src/usr/local/www/firewall_shaper_vinterface.php b/src/usr/local/www/firewall_shaper_vinterface.php index ccea421..1965b89 100644 --- a/src/usr/local/www/firewall_shaper_vinterface.php +++ b/src/usr/local/www/firewall_shaper_vinterface.php @@ -55,8 +55,8 @@ ##|+PRIV ##|*IDENT=page-firewall-trafficshaper-limiter -##|*NAME=Firewall: Traffic Shaper: Limiter -##|*DESCR=Allow access to the 'Firewall: Traffic Shaper: Limiter' page. +##|*NAME=Firewall: Traffic Shaper: Limiters +##|*DESCR=Allow access to the 'Firewall: Traffic Shaper: Limiters' page. ##|*MATCH=firewall_shaper_vinterface.php* ##|-PRIV @@ -70,7 +70,7 @@ if ($_GET['reset'] != "") { exit; } -$pgtitle = array(gettext("Firewall"), gettext("Traffic Shaper"), gettext("Limiter")); +$pgtitle = array(gettext("Firewall"), gettext("Traffic Shaper"), gettext("Limiters")); $shortcut_section = "trafficshaper-limiters"; $dfltmsg = false; @@ -180,7 +180,7 @@ if ($_GET) { } } else { - $savemsg = gettext("Unable to write config.xml (Access Denied?)"); + $savemsg = gettext("Unable to write config.xml (Access Denied?)."); $class = 'danger'; } @@ -414,7 +414,7 @@ if (is_subsystem_dirty('shaper')) { $tab_array = array(); $tab_array[] = array(gettext("By Interface"), false, "firewall_shaper.php"); $tab_array[] = array(gettext("By Queue"), false, "firewall_shaper_queues.php"); -$tab_array[] = array(gettext("Limiter"), true, "firewall_shaper_vinterface.php"); +$tab_array[] = array(gettext("Limiters"), true, "firewall_shaper_vinterface.php"); $tab_array[] = array(gettext("Wizards"), false, "firewall_shaper_wizards.php"); display_top_tabs($tab_array); ?> diff --git a/src/usr/local/www/firewall_shaper_wizards.php b/src/usr/local/www/firewall_shaper_wizards.php index b1e8eb2..3e15bb7 100644 --- a/src/usr/local/www/firewall_shaper_wizards.php +++ b/src/usr/local/www/firewall_shaper_wizards.php @@ -110,7 +110,7 @@ if ($input_errors) { $tab_array = array(); $tab_array[] = array(gettext("By Interface"), false, "firewall_shaper.php"); $tab_array[] = array(gettext("By Queue"), false, "firewall_shaper_queues.php"); -$tab_array[] = array(gettext("Limiter"), false, "firewall_shaper_vinterface.php"); +$tab_array[] = array(gettext("Limiters"), false, "firewall_shaper_vinterface.php"); $tab_array[] = array(gettext("Wizards"), true, "firewall_shaper_wizards.php"); display_top_tabs($tab_array); diff --git a/src/usr/local/www/firewall_virtual_ip.php b/src/usr/local/www/firewall_virtual_ip.php index 945f48a..bbb8ea7 100644 --- a/src/usr/local/www/firewall_virtual_ip.php +++ b/src/usr/local/www/firewall_virtual_ip.php @@ -268,7 +268,7 @@ $types = array('proxyarp' => gettext('Proxy ARP'), 'ipalias' => gettext('IP Alias') ); -$pgtitle = array(gettext("Firewall"), gettext("Virtual IP Addresses")); +$pgtitle = array(gettext("Firewall"), gettext("Virtual IPs")); include("head.inc"); if ($input_errors) { @@ -373,8 +373,8 @@ endforeach; </nav> <div class="infoblock"> - <?=print_info_box(sprintf(gettext('The virtual IP addresses defined on this page may be used in %1$sNAT%2$s mappings'), '<a href="firewall_nat.php">', '</a>') . '<br />' . - sprintf(gettext('You can check the status of your CARP Virtual IPs and interfaces %1$shere%2$s'), '<a href="status_carp.php">', '</a>'), 'info', false)?> + <?=print_info_box(sprintf(gettext('The virtual IP addresses defined on this page may be used in %1$sNAT%2$s mappings.'), '<a href="firewall_nat.php">', '</a>') . '<br />' . + sprintf(gettext('You can check the status of your CARP Virtual IPs and interfaces %1$shere%2$s.'), '<a href="status_carp.php">', '</a>'), 'info', false)?> </div> <?php diff --git a/src/usr/local/www/firewall_virtual_ip_edit.php b/src/usr/local/www/firewall_virtual_ip_edit.php index b9a49c3..b7e973d 100644 --- a/src/usr/local/www/firewall_virtual_ip_edit.php +++ b/src/usr/local/www/firewall_virtual_ip_edit.php @@ -317,7 +317,7 @@ if ($_POST) { $ipaliashelp = gettext('The mask must be the network\'s subnet mask. It does not specify a CIDR range.'); $proxyarphelp = gettext('Enter a CIDR block of proxy ARP addresses.'); -$pgtitle = array(gettext("Firewall"), gettext("Virtual IP Address"), gettext("Edit")); +$pgtitle = array(gettext("Firewall"), gettext("Virtual IPs"), gettext("Edit")); include("head.inc"); function build_if_list() { diff --git a/src/usr/local/www/guiconfig.inc b/src/usr/local/www/guiconfig.inc index 9117b08..39d28d9 100644 --- a/src/usr/local/www/guiconfig.inc +++ b/src/usr/local/www/guiconfig.inc @@ -341,7 +341,7 @@ function print_info_box($msg, $class="alert-warning", $btnname = "close", $btnte } function print_apply_box($msg) { - print_info_box($msg, "warning", "apply", gettext("Apply changes")); + print_info_box($msg, "warning", "apply", gettext("Apply Changes")); } function get_std_save_message($ok) { diff --git a/src/usr/local/www/head.inc b/src/usr/local/www/head.inc index 515a6d6..dcc9ee4 100644 --- a/src/usr/local/www/head.inc +++ b/src/usr/local/www/head.inc @@ -270,7 +270,7 @@ if (count($config['interfaces']) > 1) { $services_menu[] = array(gettext("UPnP & NAT-PMP"), "/pkg_edit.php?xml=miniupnpd.xml"); } -$services_menu[] = array(gettext("Wake on LAN"), "/services_wol.php"); +$services_menu[] = array(gettext("Wake-on-LAN"), "/services_wol.php"); $services_menu = msort(array_merge($services_menu, return_ext_menu("Services")), 0); // VPN @@ -348,7 +348,7 @@ $diagnostics_menu[] = array(gettext("pfInfo"), "/diag_pf_info.php"); $diagnostics_menu[] = array(gettext("pfTop"), "/diag_pftop.php"); $diagnostics_menu[] = array(gettext("Reboot"), "/diag_reboot.php"); $diagnostics_menu[] = array(gettext("Routes"), "/diag_routes.php"); -$diagnostics_menu[] = array(gettext("SMART Status"), "/diag_smart.php"); +$diagnostics_menu[] = array(gettext("S.M.A.R.T. Status"), "/diag_smart.php"); $diagnostics_menu[] = array(gettext("Sockets"), "/diag_sockets.php"); $diagnostics_menu[] = array(gettext("States"), "/diag_dump_states.php"); $diagnostics_menu[] = array(gettext("States Summary"), "/diag_states_summary.php"); diff --git a/src/usr/local/www/index.php b/src/usr/local/www/index.php index 55de55e..4df74e9 100644 --- a/src/usr/local/www/index.php +++ b/src/usr/local/www/index.php @@ -107,7 +107,7 @@ if ($g['disablecrashreporter'] != true) { } if ($x > 0) { - $savemsg = sprintf(gettext("%s has detected a crash report or programming bug. Click <a href='crash_reporter.php'>here</a> for more information."), $g['product_name']); + $savemsg = sprintf(gettext("%s has detected a crash report or programming bug. Click <a href='crash_reporter.php'>here</a> for more information."), $g['product_name']); $class = "warning"; } } diff --git a/src/usr/local/www/interfaces.php b/src/usr/local/www/interfaces.php index 637492b..c9a3c16 100644 --- a/src/usr/local/www/interfaces.php +++ b/src/usr/local/www/interfaces.php @@ -1691,7 +1691,8 @@ if ($input_errors) { if (is_subsystem_dirty('interfaces')) { print_apply_box(sprintf(gettext("The %s configuration has been changed."), $wancfg['descr']) . "<br />" . - gettext("You must apply the changes in order for them to take effect. Don't forget to adjust the DHCP Server range if needed after applying.")); + gettext("You must apply the changes in order for them to take effect.") . "<br />" . + gettext("Don't forget to adjust the DHCP Server range if needed after applying.")); } if ($savemsg) { @@ -1903,18 +1904,18 @@ $section->addClass('dhcp'); $group = new Form_Group('Options'); $group->add(new Form_Checkbox( - 'dhcpadv', + 'adv_dhcp_config_advanced', null, - 'Show DHCP advanced options', - false -)); + 'Advanced Configuration', + $pconfig['adv_dhcp_config_advanced'] +))->setHelp('Use advanced DHCP configuration options.'); $group->add(new Form_Checkbox( - 'dhcpovr', + 'adv_dhcp_config_file_override', null, - 'Config file override', - false -)); + 'Configuration Override', + $pconfig['adv_dhcp_config_file_override'] +))->setHelp('Override the configuration from this file.'); $section->add($group); @@ -2023,16 +2024,16 @@ $group->add(new Form_Checkbox( ))->displayAsRadio(); $group->setHelp('The values in these fields are DHCP protocol timings used when requesting a lease.' . '<br />' . - '<a href="http://www.freebsd.org/cgi/man.cgi?query=dhclient.conf&sektion=5#PROTOCOL_TIMING">' . 'See here more information' . '</a>'); + '<a target="_blank" href="https://www.freebsd.org/cgi/man.cgi?query=dhclient.conf&sektion=5#PROTOCOL_TIMING">' . 'See here more information' . '</a>'); $section->add($group); $section->addInput(new Form_Input( 'adv_dhcp_config_file_override_path', - 'Config file override', + 'Configuration File Override', 'text', $pconfig['adv_dhcp_config_file_override_path'] -))->sethelp('The value in this field is the full absolute path to a DHCP client configuration file. [/[dirname/[.../]]filename[.ext]]' . '<br />' . +))->setWidth(9)->sethelp('The value in this field is the full absolute path to a DHCP client configuration file. [/[dirname/[.../]]filename[.ext]]' . '<br />' . 'Value Substitutions in Config File: {interface}, {hostname}, {mac_addr_asciiCD}, {mac_addr_hexCD}' . '<br />' . 'Where C is U(pper) or L(ower) Case, and D is ":-." Delimiter (space, colon, hyphen, or period) (omitted for none).' . '<br />' . 'Some ISPs may require certain options be or not be sent.'); @@ -2047,7 +2048,7 @@ $section->addInput(new Form_Input( 'Send options', 'text', $pconfig['adv_dhcp_send_options'] -))->sethelp('The values in this field are DHCP options to be sent when requesting a DHCP lease. [option declaration [, ...]]' . '<br />' . +))->setWidth(9)->sethelp('The values in this field are DHCP options to be sent when requesting a DHCP lease. [option declaration [, ...]]' . '<br />' . 'Value Substitutions: {interface}, {hostname}, {mac_addr_asciiCD}, {mac_addr_hexCD}' . '<br />' . 'Where C is U(pper) or L(ower) Case, and D is " :-." Delimiter (space, colon, hyphen, or period) (omitted for none).' . '<br />' . 'Some ISPs may require certain options be or not be sent.'); @@ -2057,7 +2058,7 @@ $section->addInput(new Form_Input( 'Request options', 'text', $pconfig['adv_dhcp_request_options'] -))->sethelp('The values in this field are DHCP option 55 to be sent when requesting a DHCP lease. [option [, ...]]' . '<br />' . +))->setWidth(9)->sethelp('The values in this field are DHCP option 55 to be sent when requesting a DHCP lease. [option [, ...]]' . '<br />' . 'Some ISPs may require certain options be or not be requested.'); $section->addInput(new Form_Input( @@ -2065,15 +2066,16 @@ $section->addInput(new Form_Input( 'Require options', 'text', $pconfig['adv_dhcp_required_options'] -))->sethelp('The values in this field are DHCP options required by the client when requesting a DHCP lease. [option [, ...]]'); +))->setWidth(9)->sethelp('The values in this field are DHCP options required by the client when requesting a DHCP lease. [option [, ...]]'); $section->addInput(new Form_Input( 'adv_dhcp_option_modifiers', 'Option modifiers', 'text', $pconfig['adv_dhcp_option_modifiers'] -))->sethelp('The values in this field are DHCP option modifiers applied to obtained DHCP lease. [modifier option declaration [, ...]]' . '<br />' . - 'modifiers: (default, supersede, prepend, append)'); +))->setWidth(9)->sethelp('The values in this field are DHCP option modifiers applied to obtained DHCP lease. [modifier option declaration [, ...]]' . '<br />' . + 'modifiers: (default, supersede, prepend, append)' . '<br />' . + '<a target="_blank" href="https://www.freebsd.org/cgi/man.cgi?query=dhclient.conf&sektion=5#LEASE_REQUIREMENTS_AND_REQUESTS">' . 'See here more information' . '</a>'); $form->add($section); @@ -2082,21 +2084,23 @@ $form->add($section); $section = new Form_Section('DHCP6 Client Configuration'); $section->addClass('dhcp6'); -$section->addInput(new Form_Checkbox( +$group = new Form_Group('Options'); + +$group->add(new Form_Checkbox( 'adv_dhcp6_config_advanced', - 'Advanced', - 'Show DHCPv6 advanced options', - $pconfig['adv_dhcp6_config_advanced'], - 'Selected' -)); + null, + 'Advanced Configuration', + $pconfig['adv_dhcp6_config_advanced'] +))->setHelp('Use advanced DHCPv6 configuration options.'); -$section->addInput(new Form_Checkbox( +$group->add(new Form_Checkbox( 'adv_dhcp6_config_file_override', - 'Config file override', - 'Override the configuration from this file', - $pconfig['adv_dhcp6_config_file_override'], - 'Selected' -)); + null, + 'Configuration Override', + $pconfig['adv_dhcp6_config_file_override'] +))->setHelp('Override the configuration from this file.'); + +$section->add($group); $section->addInput(new Form_Checkbox( 'dhcp6usev4iface', @@ -2138,9 +2142,9 @@ $section->addInput(new Form_Input( 'Configuration File Override', 'text', $pconfig['adv_dhcp6_config_file_override_path'] -))->setHelp('The value in this field is the full absolute path to a DHCP client configuration file. [/[dirname/[.../]]filename[.ext]]' . '<br />' . +))->setWidth(9)->setHelp('The value in this field is the full absolute path to a DHCP client configuration file. [/[dirname/[.../]]filename[.ext]]' . '<br />' . 'Value Substitutions in Config File: {interface}, {hostname}, {mac_addr_asciiCD}, {mac_addr_hexCD}' . '<br />' . - 'Where C is U(pper) or L(ower) Case, and D is \" :-.\" Delimiter (space, colon, hyphen, or period) (omitted for none).' . '<br />' . + 'Where C is U(pper) or L(ower) Case, and D is " :-." Delimiter (space, colon, hyphen, or period) (omitted for none).' . '<br />' . 'Some ISPs may require certain options be or not be sent.'); $form->add($section); @@ -2153,17 +2157,17 @@ $section->addClass('dhcp6advanced'); $section->addInput(new Form_Checkbox( 'adv_dhcp6_interface_statement_information_only_enable', 'Information only', - null, + 'Exchange Information Only', $pconfig['adv_dhcp6_interface_statement_information_only_enable'], 'Selected' -)); +))->setHelp('Only exchange informational configuration parameters with servers.'); $section->addInput(new Form_Input( 'adv_dhcp6_interface_statement_send_options', 'Send options', 'text', $pconfig['adv_dhcp6_interface_statement_send_options'] -))->sethelp('DHCP send options to be sent when requesting a DHCP lease. [option declaration [, ...]]' . '<br />' . +))->setWidth(9)->sethelp('DHCP send options to be sent when requesting a DHCP lease. [option declaration [, ...]]' . '<br />' . 'Value Substitutions: {interface}, {hostname}, {mac_addr_asciiCD}, {mac_addr_hexCD}' . '<br />' . 'Where C is U(pper) or L(ower) Case, and D is \" :-.\" Delimiter (space, colon, hyphen, or period) (omitted for none).' . '<br />' . 'Some DHCP services may require certain options be or not be sent.'); @@ -2173,7 +2177,7 @@ $section->addInput(new Form_Input( 'Request Options', 'text', $pconfig['adv_dhcp6_interface_statement_request_options'] -))->sethelp('DHCP request options to be sent when requesting a DHCP lease. [option [, ...]]' . '<br />' . +))->setWidth(9)->sethelp('DHCP request options to be sent when requesting a DHCP lease. [option [, ...]]' . '<br />' . 'Some DHCP services may require certain options be or not be requested.'); $section->addInput(new Form_Input( @@ -2181,7 +2185,7 @@ $section->addInput(new Form_Input( 'Scripts', 'text', $pconfig['adv_dhcp6_interface_statement_script'] -))->sethelp('Absolute path to a script invoked on certain conditions including when a reply message is received.' . '<br />' . +))->setWidth(9)->sethelp('Absolute path to a script invoked on certain conditions including when a reply message is received.' . '<br />' . '[/[dirname/[.../]]filename[.ext]].'); $group = new Form_Group('Identity Association Statement'); @@ -2354,6 +2358,8 @@ $group->add(new Form_Input( $pconfig['adv_dhcp6_key_info_statement_expire'] ))->sethelp('Expire'); +$group->setHelp('<a target="_blank" href="https://www.freebsd.org/cgi/man.cgi?query=dhcp6c.conf&sektion=5&apropos=0&manpath=FreeBSD+10.1-RELEASE+and+Ports#Interface_statement">' . 'See here more information' . '</a>'); + $section->add($group); $form->add($section); @@ -3531,8 +3537,8 @@ events.push(function() { } function setDHCPoptions() { - var adv = $('#dhcpadv').prop('checked'); - var ovr = $('#dhcpovr').prop('checked'); + var adv = $('#adv_dhcp_config_advanced').prop('checked'); + var ovr = $('#adv_dhcp_config_file_override').prop('checked'); if (ovr) { hideInput('dhcphostname', true); @@ -3637,7 +3643,7 @@ events.push(function() { prefill_provider(); }); - $('#dhcpadv, #dhcpovr').click(function () { + $('#adv_dhcp_config_advanced, #adv_dhcp_config_file_override').click(function () { setDHCPoptions(); }); diff --git a/src/usr/local/www/interfaces_assign.php b/src/usr/local/www/interfaces_assign.php index 8ffff9a..c6b730a 100644 --- a/src/usr/local/www/interfaces_assign.php +++ b/src/usr/local/www/interfaces_assign.php @@ -488,14 +488,14 @@ include("head.inc"); if (file_exists("/var/run/interface_mismatch_reboot_needed")) { if ($_POST) { if ($rebootingnow) { - $savemsg = gettext("The system is now rebooting. Please wait."); + $savemsg = gettext("The system is now rebooting. Please wait."); $class = "success"; } else { $savemsg = gettext("Reboot is needed. Please apply the settings in order to reboot."); $class = "warning"; } } else { - $savemsg = gettext("Interface mismatch detected. Please resolve the mismatch and click 'Apply changes'. The firewall will reboot afterwards."); + $savemsg = gettext("Interface mismatch detected. Please resolve the mismatch and click 'Apply Changes'. The firewall will reboot afterwards."); $class = "warning"; } } @@ -597,6 +597,9 @@ display_top_tabs($tab_array); <button name="Submit" type="submit" class="btn btn-primary" value="<?=gettext('Save')?>"><?=gettext('Save')?></button> </form> <br /> -<p class="alert alert-info"><?=gettext("Interfaces that are configured as members of a lagg(4) interface will not be shown.")?></p> + +<?php +print_info_box(gettext("Interfaces that are configured as members of a lagg(4) interface will not be shown."), 'info', false); +?> <?php include("foot.inc")?> diff --git a/src/usr/local/www/interfaces_bridge_edit.php b/src/usr/local/www/interfaces_bridge_edit.php index 7425d42..af49aac 100644 --- a/src/usr/local/www/interfaces_bridge_edit.php +++ b/src/usr/local/www/interfaces_bridge_edit.php @@ -357,7 +357,7 @@ function build_port_list($selecton) { return($portlist); } -$pgtitle = array(gettext("Interfaces"), gettext("Bridge"), gettext("Edit")); +$pgtitle = array(gettext("Interfaces"), gettext("Bridges"), gettext("Edit")); $shortcut_section = "interfaces"; include("head.inc"); diff --git a/src/usr/local/www/interfaces_gif_edit.php b/src/usr/local/www/interfaces_gif_edit.php index 6f04802..cbb853d 100644 --- a/src/usr/local/www/interfaces_gif_edit.php +++ b/src/usr/local/www/interfaces_gif_edit.php @@ -192,7 +192,7 @@ function build_parent_list() { return($parentlist); } -$pgtitle = array(gettext("Interfaces"), gettext("GIF"), gettext("Edit")); +$pgtitle = array(gettext("Interfaces"), gettext("GIFs"), gettext("Edit")); $shortcut_section = "interfaces"; include("head.inc"); diff --git a/src/usr/local/www/interfaces_gre_edit.php b/src/usr/local/www/interfaces_gre_edit.php index 6ce4a5f..6c34470 100644 --- a/src/usr/local/www/interfaces_gre_edit.php +++ b/src/usr/local/www/interfaces_gre_edit.php @@ -186,7 +186,7 @@ function build_parent_list() { return($parentlist); } -$pgtitle = array(gettext("Interfaces"), gettext("GRE"), gettext("Edit")); +$pgtitle = array(gettext("Interfaces"), gettext("GREs"), gettext("Edit")); $shortcut_section = "interfaces"; include("head.inc"); diff --git a/src/usr/local/www/interfaces_groups_edit.php b/src/usr/local/www/interfaces_groups_edit.php index 5545f84..7c62136 100644 --- a/src/usr/local/www/interfaces_groups_edit.php +++ b/src/usr/local/www/interfaces_groups_edit.php @@ -64,7 +64,7 @@ require("guiconfig.inc"); require_once("functions.inc"); -$pgtitle = array(gettext("Interfaces"), gettext("Groups"), gettext("Edit")); +$pgtitle = array(gettext("Interfaces"), gettext("Interface Groups"), gettext("Edit")); $shortcut_section = "interfaces"; if (!is_array($config['ifgroups']['ifgroupentry'])) { diff --git a/src/usr/local/www/interfaces_lagg_edit.php b/src/usr/local/www/interfaces_lagg_edit.php index 8417834..8bbb3d4 100644 --- a/src/usr/local/www/interfaces_lagg_edit.php +++ b/src/usr/local/www/interfaces_lagg_edit.php @@ -238,7 +238,7 @@ function build_member_list() { return($memberlist); } -$pgtitle = array(gettext("Interfaces"), gettext("LAGG"), gettext("Edit")); +$pgtitle = array(gettext("Interfaces"), gettext("LAGGs"), gettext("Edit")); $shortcut_section = "interfaces"; include("head.inc"); diff --git a/src/usr/local/www/interfaces_qinq_edit.php b/src/usr/local/www/interfaces_qinq_edit.php index 3a198d8..8657041 100644 --- a/src/usr/local/www/interfaces_qinq_edit.php +++ b/src/usr/local/www/interfaces_qinq_edit.php @@ -60,7 +60,7 @@ ##|*MATCH=interfaces_qinq_edit.php* ##|-PRIV -$pgtitle = array(gettext("Interfaces"), gettext("QinQ"), gettext("Edit")); +$pgtitle = array(gettext("Interfaces"), gettext("QinQs"), gettext("Edit")); $shortcut_section = "interfaces"; require("guiconfig.inc"); diff --git a/src/usr/local/www/interfaces_vlan.php b/src/usr/local/www/interfaces_vlan.php index cb0b03f..d4e3905 100644 --- a/src/usr/local/www/interfaces_vlan.php +++ b/src/usr/local/www/interfaces_vlan.php @@ -180,7 +180,7 @@ display_top_tabs($tab_array); </form> <div class="infoblock"> - <?=print_info_box(sprintf(gettext('NOTE: Not all drivers/NICs support 802.1Q '. + <?=print_info_box(sprintf(gettext('Not all drivers/NICs support 802.1Q '. 'VLAN tagging properly. <br />On cards that do not explicitly support it, VLAN '. 'tagging will still work, but the reduced MTU may cause problems.<br />See the '. '%s handbook for information on supported cards.'), $g['product_name']), 'info', false)?> diff --git a/src/usr/local/www/interfaces_vlan_edit.php b/src/usr/local/www/interfaces_vlan_edit.php index f760813..a6743d0 100644 --- a/src/usr/local/www/interfaces_vlan_edit.php +++ b/src/usr/local/www/interfaces_vlan_edit.php @@ -199,7 +199,7 @@ function build_interfaces_list() { return($list); } -$pgtitle = array(gettext("Interfaces"), gettext("VLAN"), gettext("Edit")); +$pgtitle = array(gettext("Interfaces"), gettext("VLANs"), gettext("Edit")); $shortcut_section = "interfaces"; include("head.inc"); diff --git a/src/usr/local/www/load_balancer_setting.php b/src/usr/local/www/load_balancer_setting.php index fe63c7d..6e04d2b 100644 --- a/src/usr/local/www/load_balancer_setting.php +++ b/src/usr/local/www/load_balancer_setting.php @@ -131,8 +131,7 @@ if ($savemsg) { } if (is_subsystem_dirty('loadbalancer')) { - print_apply_box(gettext("The load balancer configuration has been changed.") . ' ' . - gettext("You must apply the changes in order for them to take effect.")); + print_apply_box(gettext("The load balancer configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect.")); } /* active tabs */ diff --git a/src/usr/local/www/load_balancer_virtual_server.php b/src/usr/local/www/load_balancer_virtual_server.php index b361106..360cbcb 100644 --- a/src/usr/local/www/load_balancer_virtual_server.php +++ b/src/usr/local/www/load_balancer_virtual_server.php @@ -187,7 +187,7 @@ if (!empty($a_vs)) { } else { ?> <tr> <td colspan="8"> <?php - print_info_box(gettext('No virtual servers have been configured')); + print_info_box(gettext('No virtual servers have been configured.')); ?> </td> </tr> <?php } diff --git a/src/usr/local/www/pkg.php b/src/usr/local/www/pkg.php index ac4f532..c468319 100755 --- a/src/usr/local/www/pkg.php +++ b/src/usr/local/www/pkg.php @@ -71,7 +71,7 @@ $xml = $_REQUEST['xml']; if ($xml == "") { include("head.inc"); - print_info_box(gettext("ERROR: No valid package defined.")); + print_info_box(gettext("No valid package defined."), 'danger', false); include("foot.inc"); exit; } else { @@ -79,14 +79,14 @@ if ($xml == "") { $pkg_full_path = "{$pkg_xml_prefix}/{$xml}"; $pkg_realpath = realpath($pkg_full_path); if (empty($pkg_realpath)) { - $path_error = sprintf(gettext("ERROR: Package path %s not found."), htmlspecialchars($pkg_full_path)); + $path_error = sprintf(gettext("Package path %s not found."), htmlspecialchars($pkg_full_path)); } else if (substr_compare($pkg_realpath, $pkg_xml_prefix, 0, strlen($pkg_xml_prefix))) { - $path_error = sprintf(gettext("ERROR: Invalid path %s specified."), htmlspecialchars($pkg_full_path)); + $path_error = sprintf(gettext("Invalid path %s specified."), htmlspecialchars($pkg_full_path)); } if (!empty($path_error)) { include("head.inc"); - print_info_box($path_error . "<br />" . gettext("Try reinstalling the package.")); + print_info_box($path_error . "<br />" . gettext("Try reinstalling the package."), 'danger', false); include("foot.inc"); die; } @@ -95,7 +95,7 @@ if ($xml == "") { $pkg = parse_xml_config_pkg($pkg_full_path, "packagegui"); } else { include("head.inc"); - print_info_box(sprintf(gettext("File not found %s"), htmlspecialchars($xml))); + print_info_box(sprintf(gettext("File not found %s."), htmlspecialchars($xml)), 'danger', false); include("foot.inc"); exit; } diff --git a/src/usr/local/www/pkg_edit.php b/src/usr/local/www/pkg_edit.php index 4694eea..8a1aae4 100644 --- a/src/usr/local/www/pkg_edit.php +++ b/src/usr/local/www/pkg_edit.php @@ -82,7 +82,7 @@ $xml_fullpath = realpath('/usr/local/pkg/' . $xml); if ($xml == "" || $xml_fullpath === false || substr($xml_fullpath, 0, strlen('/usr/local/pkg/')) != '/usr/local/pkg/') { include("head.inc"); - print_info_box(gettext("ERROR: No valid package defined.")); + print_info_box(gettext("No valid package defined."), 'danger', false); include("foot.inc"); die; } else { diff --git a/src/usr/local/www/pkg_mgr.php b/src/usr/local/www/pkg_mgr.php index ecc4cad..04908c4 100644 --- a/src/usr/local/www/pkg_mgr.php +++ b/src/usr/local/www/pkg_mgr.php @@ -207,11 +207,11 @@ display_top_tabs($tab_array); <div class="panel-heading"><h2 class="panel-title"><?=gettext('Packages')?></h2></div> <div id="pkgtbl" class="panel-body table-responsive"> <div id="waitmsg"> - <?=print_info_box(gettext("Please wait while the list of packages is retrieved and formatted") . ' <i class="fa fa-cog fa-spin"></i>')?> + <?=print_info_box(gettext("Please wait while the list of packages is retrieved and formatted.") . ' <i class="fa fa-cog fa-spin"></i>')?> </div> <div id="errmsg" style="display: none;"> - <?=print_info_box("<ul><li>" . gettext("Error: Unable to retrieve package information.") . "</li></ul>", 'danger')?> + <?=print_info_box("<ul><li>" . gettext("Unable to retrieve package information.") . "</li></ul>", 'danger')?> </div> </div> </div> diff --git a/src/usr/local/www/pkg_mgr_install.php b/src/usr/local/www/pkg_mgr_install.php index e9c33e0..e8e9943 100644 --- a/src/usr/local/www/pkg_mgr_install.php +++ b/src/usr/local/www/pkg_mgr_install.php @@ -386,7 +386,7 @@ if ($input_errors) { <?php endif; if ($firmwareupdate && !$firmwareversion) { - print_info_box(gettext("Unable to retrieve system versions"), 'danger'); + print_info_box(gettext("Unable to retrieve system versions."), 'danger'); } if ($_POST) { diff --git a/src/usr/local/www/pkg_mgr_installed.php b/src/usr/local/www/pkg_mgr_installed.php index 93fd475..6804f67 100644 --- a/src/usr/local/www/pkg_mgr_installed.php +++ b/src/usr/local/www/pkg_mgr_installed.php @@ -89,11 +89,9 @@ foreach ($package_list as $pkg) { $installed_packages[] = $pkg; } -if (empty($installed_packages)):?> - <div class="alert alert-warning"> - <?=gettext("There are no packages currently installed.")?> - </div> -<?php else:?> +if (empty($installed_packages)): + print_info_box(gettext("There are no packages currently installed."), 'warning', false); +else:?> <div class="panel panel-default"> <div class="panel-heading"><h2 class="panel-title"><?=gettext('Installed Packages')?></h2></div> <div class="table-responsive"> diff --git a/src/usr/local/www/services_captiveportal.php b/src/usr/local/www/services_captiveportal.php index cdb5060..d6408e4 100644 --- a/src/usr/local/www/services_captiveportal.php +++ b/src/usr/local/www/services_captiveportal.php @@ -560,7 +560,7 @@ if ($savemsg) { $tab_array = array(); $tab_array[] = array(gettext("Configuration"), true, "services_captiveportal.php?zone={$cpzone}"); -$tab_array[] = array(gettext("MAC"), false, "services_captiveportal_mac.php?zone={$cpzone}"); +$tab_array[] = array(gettext("MACs"), false, "services_captiveportal_mac.php?zone={$cpzone}"); $tab_array[] = array(gettext("Allowed IP Addresses"), false, "services_captiveportal_ip.php?zone={$cpzone}"); $tab_array[] = array(gettext("Allowed Hostnames"), false, "services_captiveportal_hostname.php?zone={$cpzone}"); $tab_array[] = array(gettext("Vouchers"), false, "services_captiveportal_vouchers.php?zone={$cpzone}"); @@ -1186,7 +1186,7 @@ $section->addInput(new Form_Input( $form->add($section); print($form); -print_info_box(gettext('Warning:' . '<br />' . 'Don\'t forget to enable the DHCP server on your captive portal interface! ' . +print_info_box(gettext('Don\'t forget to enable the DHCP server on your captive portal interface! ' . 'Make sure that the default/maximum DHCP lease time is higher than the hard timeout entered on this page. ' . 'Also, the DNS Forwarder or Resolver must be enabled for DNS lookups by unauthenticated clients to work.')); diff --git a/src/usr/local/www/services_captiveportal_filemanager.php b/src/usr/local/www/services_captiveportal_filemanager.php index 95a951b..78518b3 100644 --- a/src/usr/local/www/services_captiveportal_filemanager.php +++ b/src/usr/local/www/services_captiveportal_filemanager.php @@ -170,7 +170,7 @@ if ($input_errors) { $tab_array = array(); $tab_array[] = array(gettext("Configuration"), false, "services_captiveportal.php?zone={$cpzone}"); -$tab_array[] = array(gettext("MAC"), false, "services_captiveportal_mac.php?zone={$cpzone}"); +$tab_array[] = array(gettext("MACs"), false, "services_captiveportal_mac.php?zone={$cpzone}"); $tab_array[] = array(gettext("Allowed IP Addresses"), false, "services_captiveportal_ip.php?zone={$cpzone}"); $tab_array[] = array(gettext("Allowed Hostnames"), false, "services_captiveportal_hostname.php?zone={$cpzone}"); $tab_array[] = array(gettext("Vouchers"), false, "services_captiveportal_vouchers.php?zone={$cpzone}"); diff --git a/src/usr/local/www/services_captiveportal_hostname.php b/src/usr/local/www/services_captiveportal_hostname.php index 8a21d12..09d0b2e 100644 --- a/src/usr/local/www/services_captiveportal_hostname.php +++ b/src/usr/local/www/services_captiveportal_hostname.php @@ -136,7 +136,7 @@ if ($savemsg) { $tab_array = array(); $tab_array[] = array(gettext("Configuration"), false, "services_captiveportal.php?zone={$cpzone}"); -$tab_array[] = array(gettext("MAC"), false, "services_captiveportal_mac.php?zone={$cpzone}"); +$tab_array[] = array(gettext("MACs"), false, "services_captiveportal_mac.php?zone={$cpzone}"); $tab_array[] = array(gettext("Allowed IP Addresses"), false, "services_captiveportal_ip.php?zone={$cpzone}"); $tab_array[] = array(gettext("Allowed Hostnames"), true, "services_captiveportal_hostname.php?zone={$cpzone}"); $tab_array[] = array(gettext("Vouchers"), false, "services_captiveportal_vouchers.php?zone={$cpzone}"); diff --git a/src/usr/local/www/services_captiveportal_hostname_edit.php b/src/usr/local/www/services_captiveportal_hostname_edit.php index 71fef4f..fb7b9f4 100644 --- a/src/usr/local/www/services_captiveportal_hostname_edit.php +++ b/src/usr/local/www/services_captiveportal_hostname_edit.php @@ -77,9 +77,6 @@ require("captiveportal.inc"); global $cpzone, $cpzoneid; -$pgtitle = array(gettext("Services"), gettext("Captive Portal"), gettext("Edit allowed Hostname")); -$shortcut_section = "captiveportal"; - $cpzone = $_GET['zone']; if (isset($_POST['zone'])) { $cpzone = $_POST['zone']; @@ -96,6 +93,9 @@ if (!is_array($config['captiveportal'])) { } $a_cp =& $config['captiveportal']; +$pgtitle = array(gettext("Services"), gettext("Captive Portal"), sprintf(gettext("Zone: %s"), $a_cp[$cpzone]['zone']), gettext("Allowed Hostnames"), gettext("Edit")); +$shortcut_section = "captiveportal"; + if (is_numericint($_GET['id'])) { $id = $_GET['id']; } diff --git a/src/usr/local/www/services_captiveportal_ip.php b/src/usr/local/www/services_captiveportal_ip.php index bd3b9f7..3aa8905 100644 --- a/src/usr/local/www/services_captiveportal_ip.php +++ b/src/usr/local/www/services_captiveportal_ip.php @@ -129,7 +129,7 @@ if ($savemsg) { $tab_array = array(); $tab_array[] = array(gettext("Configuration"), false, "services_captiveportal.php?zone={$cpzone}"); -$tab_array[] = array(gettext("MAC"), false, "services_captiveportal_mac.php?zone={$cpzone}"); +$tab_array[] = array(gettext("MACs"), false, "services_captiveportal_mac.php?zone={$cpzone}"); $tab_array[] = array(gettext("Allowed IP Addresses"), true, "services_captiveportal_ip.php?zone={$cpzone}"); $tab_array[] = array(gettext("Allowed Hostnames"), false, "services_captiveportal_hostname.php?zone={$cpzone}"); $tab_array[] = array(gettext("Vouchers"), false, "services_captiveportal_vouchers.php?zone={$cpzone}"); diff --git a/src/usr/local/www/services_captiveportal_ip_edit.php b/src/usr/local/www/services_captiveportal_ip_edit.php index 5daffa4..cac3369 100644 --- a/src/usr/local/www/services_captiveportal_ip_edit.php +++ b/src/usr/local/www/services_captiveportal_ip_edit.php @@ -80,9 +80,6 @@ require_once("filter.inc"); require("shaper.inc"); require("captiveportal.inc"); -$pgtitle = array(gettext("Services"), gettext("Captive Portal"), gettext("Edit allowed IP address")); -$shortcut_section = "captiveportal"; - $cpzone = $_GET['zone']; if (isset($_POST['zone'])) { $cpzone = $_POST['zone']; @@ -98,6 +95,9 @@ if (!is_array($config['captiveportal'])) { } $a_cp =& $config['captiveportal']; +$pgtitle = array(gettext("Services"), gettext("Captive Portal"), sprintf(gettext("Zone: %s"), $a_cp[$cpzone]['zone']), gettext("Allowed IP Addresses"), gettext("Edit")); +$shortcut_section = "captiveportal"; + if (is_numericint($_GET['id'])) { $id = $_GET['id']; } diff --git a/src/usr/local/www/services_captiveportal_mac.php b/src/usr/local/www/services_captiveportal_mac.php index 3e1b093..bbed7f0 100644 --- a/src/usr/local/www/services_captiveportal_mac.php +++ b/src/usr/local/www/services_captiveportal_mac.php @@ -88,7 +88,7 @@ if (!is_array($config['captiveportal'])) { } $a_cp =& $config['captiveportal']; -$pgtitle = array(gettext("Services"), gettext("Captive Portal"), sprintf(gettext("Zone: %s"), $a_cp[$cpzone]['zone']), gettext("MAC")); +$pgtitle = array(gettext("Services"), gettext("Captive Portal"), sprintf(gettext("Zone: %s"), $a_cp[$cpzone]['zone']), gettext("MACs")); $shortcut_section = "captiveportal"; $actsmbl = array('pass' => '<font color="green" size="4">✔</font> ' . gettext("Pass"), @@ -189,12 +189,12 @@ if ($savemsg) { } if (is_subsystem_dirty('passthrumac')) { - print_apply_box(gettext("The captive portal MAC address configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect.")); + print_apply_box(gettext("The Captive Portal MAC address configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect.")); } $tab_array = array(); $tab_array[] = array(gettext("Configuration"), false, "services_captiveportal.php?zone={$cpzone}"); -$tab_array[] = array(gettext("MAC"), true, "services_captiveportal_mac.php?zone={$cpzone}"); +$tab_array[] = array(gettext("MACs"), true, "services_captiveportal_mac.php?zone={$cpzone}"); $tab_array[] = array(gettext("Allowed IP Addresses"), false, "services_captiveportal_ip.php?zone={$cpzone}"); $tab_array[] = array(gettext("Allowed Hostnames"), false, "services_captiveportal_hostname.php?zone={$cpzone}"); $tab_array[] = array(gettext("Vouchers"), false, "services_captiveportal_vouchers.php?zone={$cpzone}"); diff --git a/src/usr/local/www/services_captiveportal_mac_edit.php b/src/usr/local/www/services_captiveportal_mac_edit.php index 22bb4c5..f226d73 100644 --- a/src/usr/local/www/services_captiveportal_mac_edit.php +++ b/src/usr/local/www/services_captiveportal_mac_edit.php @@ -83,9 +83,6 @@ require("captiveportal.inc"); global $cpzone; global $cpzoneid; -$pgtitle = array(gettext("Services"), gettext("Captive Portal"), gettext("Edit MAC address rules")); -$shortcut_section = "captiveportal"; - $cpzone = $_GET['zone']; if (isset($_POST['zone'])) { $cpzone = $_POST['zone']; @@ -101,6 +98,9 @@ if (!is_array($config['captiveportal'])) { } $a_cp =& $config['captiveportal']; +$pgtitle = array(gettext("Services"), gettext("Captive Portal"), sprintf(gettext("Zone: %s"), $a_cp[$cpzone]['zone']), gettext("MACs"), gettext("Edit")); +$shortcut_section = "captiveportal"; + if (is_numericint($_GET['id'])) { $id = $_GET['id']; } diff --git a/src/usr/local/www/services_captiveportal_vouchers.php b/src/usr/local/www/services_captiveportal_vouchers.php index a56faa3..5802ffd 100644 --- a/src/usr/local/www/services_captiveportal_vouchers.php +++ b/src/usr/local/www/services_captiveportal_vouchers.php @@ -436,7 +436,7 @@ if ($savemsg) { $tab_array = array(); $tab_array[] = array(gettext("Configuration"), false, "services_captiveportal.php?zone={$cpzone}"); -$tab_array[] = array(gettext("MAC"), false, "services_captiveportal_mac.php?zone={$cpzone}"); +$tab_array[] = array(gettext("MACs"), false, "services_captiveportal_mac.php?zone={$cpzone}"); $tab_array[] = array(gettext("Allowed IP Addresses"), false, "services_captiveportal_ip.php?zone={$cpzone}"); $tab_array[] = array(gettext("Allowed Hostnames"), false, "services_captiveportal_hostname.php?zone={$cpzone}"); $tab_array[] = array(gettext("Vouchers"), true, "services_captiveportal_vouchers.php?zone={$cpzone}"); diff --git a/src/usr/local/www/services_captiveportal_vouchers_edit.php b/src/usr/local/www/services_captiveportal_vouchers_edit.php index 2290806..5bb8231 100644 --- a/src/usr/local/www/services_captiveportal_vouchers_edit.php +++ b/src/usr/local/www/services_captiveportal_vouchers_edit.php @@ -68,9 +68,6 @@ require("shaper.inc"); require("captiveportal.inc"); require_once("voucher.inc"); -$pgtitle = array(gettext("Services"), gettext("Captive Portal"), gettext("Edit Voucher Rolls")); -$shortcut_section = "captiveportal-vouchers"; - $cpzone = $_GET['zone']; if (isset($_POST['zone'])) { $cpzone = $_POST['zone']; @@ -86,6 +83,9 @@ if (!is_array($config['captiveportal'])) { } $a_cp =& $config['captiveportal']; +$pgtitle = array(gettext("Services"), gettext("Captive Portal"), sprintf(gettext("Zone: %s"), $a_cp[$cpzone]['zone']), gettext("Vouchers"), gettext("Edit")); +$shortcut_section = "captiveportal-vouchers"; + if (!is_array($config['voucher'])) { $config['voucher'] = array(); } diff --git a/src/usr/local/www/services_dhcp.php b/src/usr/local/www/services_dhcp.php index 7306e68..b635175 100644 --- a/src/usr/local/www/services_dhcp.php +++ b/src/usr/local/www/services_dhcp.php @@ -784,10 +784,7 @@ if (!is_numeric($pool) && !($act == "newpool")) { $pconfig['enable'] )); } else { - $section->addInput(new Form_StaticText( - null, - '<div class="alert alert-info"> Editing Pool-Specific Options. To return to the Interface, click its tab above. </div>' - )); + print_info_box(gettext('Editing pool-specific options. To return to the Interface, click its tab above.'), 'info', false); } $section->addInput(new Form_Checkbox( diff --git a/src/usr/local/www/services_dhcp_edit.php b/src/usr/local/www/services_dhcp_edit.php index e5f9ab6..fc3d7c6 100644 --- a/src/usr/local/www/services_dhcp_edit.php +++ b/src/usr/local/www/services_dhcp_edit.php @@ -407,7 +407,7 @@ $ip = $_SERVER['REMOTE_ADDR']; $mymac = `/usr/sbin/arp -an | grep '('{$ip}')' | cut -d" " -f4`; $mymac = str_replace("\n", "", $mymac); -$pgtitle = array(gettext("Services"), gettext("DHCP"), gettext("Edit Static Mapping")); +$pgtitle = array(gettext("Services"), gettext("DHCP Server"), gettext("Edit Static Mapping")); $shortcut_section = "dhcp"; include("head.inc"); diff --git a/src/usr/local/www/services_dhcp_relay.php b/src/usr/local/www/services_dhcp_relay.php index ecb7186..acca7a9 100644 --- a/src/usr/local/www/services_dhcp_relay.php +++ b/src/usr/local/www/services_dhcp_relay.php @@ -156,7 +156,7 @@ $shortcut_section = "dhcp"; include("head.inc"); if ($dhcpd_enabled) { - echo '<div class="alert alert-danger">' . gettext("DHCP Server is currently enabled. Cannot enable the DHCP Relay service while the DHCP Server is enabled on any interface.") . '</div>'; + print_info_box(gettext("DHCP Server is currently enabled. Cannot enable the DHCP Relay service while the DHCP Server is enabled on any interface."), 'danger', false); include("foot.inc"); exit; } diff --git a/src/usr/local/www/services_dhcpv6.php b/src/usr/local/www/services_dhcpv6.php index 5a00c7a..905a407 100644 --- a/src/usr/local/www/services_dhcpv6.php +++ b/src/usr/local/www/services_dhcpv6.php @@ -894,7 +894,7 @@ print_info_box( ?> </div> <div class="panel panel-default"> - <div class="panel-heading"><h2 class="panel-title"><?=gettext("DHCPv6 Static Mappings for this Interface.");?></h2></div> + <div class="panel-heading"><h2 class="panel-title"><?=gettext("DHCPv6 Static Mappings for this Interface");?></h2></div> <div class="panel-body table-responsive"> <table class="table table-striped table-hover table-condensed"> <thead> diff --git a/src/usr/local/www/services_dhcpv6_edit.php b/src/usr/local/www/services_dhcpv6_edit.php index 1317937..0c27b1e 100644 --- a/src/usr/local/www/services_dhcpv6_edit.php +++ b/src/usr/local/www/services_dhcpv6_edit.php @@ -214,7 +214,7 @@ if ($_POST) { } } -$pgtitle = array(gettext("Services"), gettext("DHCPv6"), gettext("Edit Static Mapping")); +$pgtitle = array(gettext("Services"), gettext("DHCPv6 Server"), gettext("Edit Static Mapping")); $shortcut_section = "dhcp6"; include("head.inc"); diff --git a/src/usr/local/www/services_dhcpv6_relay.php b/src/usr/local/www/services_dhcpv6_relay.php index 974644a..61cb193 100644 --- a/src/usr/local/www/services_dhcpv6_relay.php +++ b/src/usr/local/www/services_dhcpv6_relay.php @@ -154,7 +154,7 @@ $shortcut_section = "dhcp6"; include("head.inc"); if ($dhcpd_enabled) { - echo '<div class="alert alert-danger">' . gettext("DHCPv6 Server is currently enabled. Cannot enable the DHCPv6 Relay service while the DHCPv6 Server is enabled on any interface.") . '</div>'; + print_info_box(gettext("DHCPv6 Server is currently enabled. Cannot enable the DHCPv6 Relay service while the DHCPv6 Server is enabled on any interface."), 'danger', false); include("foot.inc"); exit; } diff --git a/src/usr/local/www/services_pppoe_edit.php b/src/usr/local/www/services_pppoe_edit.php index e7b6053..371cbd7 100644 --- a/src/usr/local/www/services_pppoe_edit.php +++ b/src/usr/local/www/services_pppoe_edit.php @@ -598,7 +598,7 @@ $form->add($section); print($form); -print_info_box(gettext('Don\'t forget to add a firewall rule to permit traffic from PPPoE clients')); +print_info_box(gettext('Don\'t forget to add a firewall rule to permit traffic from PPPoE clients.')); ?> <script type="text/javascript"> //<![CDATA[ diff --git a/src/usr/local/www/services_router_advertisements.php b/src/usr/local/www/services_router_advertisements.php index c7a221b..1c33541 100644 --- a/src/usr/local/www/services_router_advertisements.php +++ b/src/usr/local/www/services_router_advertisements.php @@ -92,8 +92,8 @@ if ($config['installedpackages']['olsrd']) { } if (!$_GET['if']) { - $savemsg = "<p><b>" . gettext("The DHCPv6 Server can only be enabled on interfaces configured with static, non unique local IP addresses.") . "</b></p>" . - "<p><b>" . gettext("Only interfaces configured with a static IP will be shown.") . "</b></p>"; + $savemsg = gettext("The DHCPv6 Server can only be enabled on interfaces configured with static, non unique local IP addresses.") . "<br />" . + gettext("Only interfaces configured with a static IP will be shown."); } $iflist = get_configured_interface_with_descr(); diff --git a/src/usr/local/www/services_unbound.php b/src/usr/local/www/services_unbound.php index 40abcd0..d92e6d0 100644 --- a/src/usr/local/www/services_unbound.php +++ b/src/usr/local/www/services_unbound.php @@ -277,7 +277,7 @@ if ($savemsg) { } if (is_subsystem_dirty('unbound')) { - print_apply_box(gettext("The DNS Resolver configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect.")); + print_apply_box(gettext("The DNS resolver configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect.")); } $tab_array = array(); diff --git a/src/usr/local/www/services_unbound_acls.php b/src/usr/local/www/services_unbound_acls.php index 09be702..3ca1eff 100644 --- a/src/usr/local/www/services_unbound_acls.php +++ b/src/usr/local/www/services_unbound_acls.php @@ -218,7 +218,7 @@ if ($savemsg) { } if (is_subsystem_dirty('unbound')) { - print_apply_box(gettext("The DNS Resolver configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect.")); + print_apply_box(gettext("The DNS resolver configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect.")); } $tab_array = array(); diff --git a/src/usr/local/www/services_unbound_advanced.php b/src/usr/local/www/services_unbound_advanced.php index f1730f1..22b9b86 100644 --- a/src/usr/local/www/services_unbound_advanced.php +++ b/src/usr/local/www/services_unbound_advanced.php @@ -231,7 +231,7 @@ if ($savemsg) { } if (is_subsystem_dirty('unbound')) { - print_apply_box(gettext("The DNS Resolver configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect.")); + print_apply_box(gettext("The DNS resolver configuration has been changed.") . "<br />" . gettext("You must apply the changes in order for them to take effect.")); } $tab_array = array(); diff --git a/src/usr/local/www/services_unbound_domainoverride_edit.php b/src/usr/local/www/services_unbound_domainoverride_edit.php index 01d4cad..776b32e 100644 --- a/src/usr/local/www/services_unbound_domainoverride_edit.php +++ b/src/usr/local/www/services_unbound_domainoverride_edit.php @@ -142,7 +142,7 @@ if ($_POST) { } } -$pgtitle = array(gettext("Services"), gettext("DNS Resolver"), gettext("Edit Domain Override")); +$pgtitle = array(gettext("Services"), gettext("DNS Resolver"), gettext("General Settings"), gettext("Edit Domain Override")); $shortcut_section = "resolver"; include("head.inc"); diff --git a/src/usr/local/www/services_unbound_host_edit.php b/src/usr/local/www/services_unbound_host_edit.php index 88f50b1..47e3350 100644 --- a/src/usr/local/www/services_unbound_host_edit.php +++ b/src/usr/local/www/services_unbound_host_edit.php @@ -230,7 +230,7 @@ if ($_GET['act'] == "addopt") { array_push($pconfig['aliases']['item'], array('host' => null, 'domain' => null, 'description' => null)); } -$pgtitle = array(gettext("Services"), gettext("DNS Resolver"), gettext("Edit Host Override")); +$pgtitle = array(gettext("Services"), gettext("DNS Resolver"), gettext("General Settings"), gettext("Edit Host Override")); $shortcut_section = "resolver"; include("head.inc"); diff --git a/src/usr/local/www/services_wol.php b/src/usr/local/www/services_wol.php index 8e27cb8..516af74 100644 --- a/src/usr/local/www/services_wol.php +++ b/src/usr/local/www/services_wol.php @@ -58,8 +58,8 @@ ##|+PRIV ##|*IDENT=page-services-wakeonlan -##|*NAME=Services: Wake on LAN -##|*DESCR=Allow access to the 'Services: Wake on LAN' page. +##|*NAME=Services: Wake-on-LAN +##|*DESCR=Allow access to the 'Services: Wake-on-LAN' page. ##|*MATCH=services_wol.php* ##|-PRIV @@ -143,13 +143,13 @@ if ($_GET['act'] == "del") { } } -$pgtitle = array(gettext("Services"), gettext("Wake on LAN")); +$pgtitle = array(gettext("Services"), gettext("Wake-on-LAN")); include("head.inc"); ?> <div class="infoblock blockopen"> <?php print_info_box(gettext('This service can be used to wake up (power on) computers by sending special "Magic Packets".') . '<br />' . - gettext('The NIC in the computer that is to be woken up must support Wake on LAN and must be properly configured (WOL cable, BIOS settings).'), + gettext('The NIC in the computer that is to be woken up must support Wake-on-LAN and must be properly configured (WOL cable, BIOS settings).'), 'info', false); ?> @@ -166,7 +166,7 @@ if ($savemsg) { $form = new Form('Send'); -$section = new Form_Section('Wake on LAN'); +$section = new Form_Section('Wake-on-LAN'); $section->addInput(new Form_Select( 'interface', @@ -188,7 +188,7 @@ print $form; <div class="panel panel-default"> <div class="panel-heading"> - <h2 class="panel-title"><?=gettext("Wake on LAN Devices");?></h2> + <h2 class="panel-title"><?=gettext("Wake-on-LAN Devices");?></h2> </div> <div class="panel-body"> diff --git a/src/usr/local/www/services_wol_edit.php b/src/usr/local/www/services_wol_edit.php index 53fde8f..2debfd9 100644 --- a/src/usr/local/www/services_wol_edit.php +++ b/src/usr/local/www/services_wol_edit.php @@ -58,8 +58,8 @@ ##|+PRIV ##|*IDENT=page-services-wakeonlan-edit -##|*NAME=Services: Wake on LAN: Edit -##|*DESCR=Allow access to the 'Services: Wake on LAN: Edit' page. +##|*NAME=Services: Wake-on-LAN: Edit +##|*DESCR=Allow access to the 'Services: Wake-on-LAN: Edit' page. ##|*MATCH=services_wol_edit.php* ##|-PRIV @@ -134,7 +134,7 @@ if ($_POST) { } } -$pgtitle = array(gettext("Services"), gettext("Wake on LAN"), gettext("Edit")); +$pgtitle = array(gettext("Services"), gettext("Wake-on-LAN"), gettext("Edit")); include("head.inc"); if ($input_errors) { diff --git a/src/usr/local/www/status.php b/src/usr/local/www/status.php index b4a8afc..bac5b59 100755 --- a/src/usr/local/www/status.php +++ b/src/usr/local/www/status.php @@ -284,10 +284,10 @@ $pgtitle = array("{$g['product_name']}", "Status"); include("head.inc"); print_info_box(gettext("Make sure all sensitive information is removed! (Passwords, etc.) before posting " . - "information from this page in public places (like mailing lists)") . '<br />' . + "information from this page in public places (like mailing lists).") . '<br />' . gettext("Common password fields in config.xml have been automatically redacted.") . '<br />' . gettext("When the page has finished loading, the output will be stored in {$output_file}. It may be downloaded via scp or ") . - "<a href=\"/exec.php?dlPath={$output_file}\">" . gettext("Diagnostics > Command Prompt") . '</a>'); + "<a href=\"/exec.php?dlPath={$output_file}\">" . gettext("Diagnostics > Command Prompt.") . '</a>'); listCmds(); execCmds(); diff --git a/src/usr/local/www/status_captiveportal.php b/src/usr/local/www/status_captiveportal.php index 958e6cb..4262859 100644 --- a/src/usr/local/www/status_captiveportal.php +++ b/src/usr/local/www/status_captiveportal.php @@ -123,7 +123,11 @@ if (!empty($cpzone)) { } } -$pgtitle = array(gettext("Status"), gettext("Captive portal")); +if (!empty($cpzone) && isset($config['voucher'][$cpzone]['enable'])) { + $pgtitle = array(gettext("Status"), gettext("Captive Portal"), sprintf(gettext("Zone: %s"), $a_cp[$cpzone]['zone']), gettext("Active Users")); +} else { + $pgtitle = array(gettext("Status"), gettext("Captive Portal")); +} $shortcut_section = "captiveportal"; include("head.inc"); @@ -259,7 +263,7 @@ else: <div class="panel-heading"><h2 class="panel-title"><?=gettext("Captive Portal Status")?></h2></div> <div class="panel-body"><br /> <?php - print_info_box(sprintf(gettext('No captive portal zones have been configured. You may add new zones here: %1$sServices->Captive portal%2$s'), '<a href="services_captiveportal_zones.php">', '</a>')); + print_info_box(sprintf(gettext('No captive portal zones have been configured. You may add new zones here: %1$sServices->Captive Portal%2$s.'), '<a href="services_captiveportal_zones.php">', '</a>')); ?> </div> </div> diff --git a/src/usr/local/www/status_captiveportal_expire.php b/src/usr/local/www/status_captiveportal_expire.php index 27d99ca..9d89f2f 100644 --- a/src/usr/local/www/status_captiveportal_expire.php +++ b/src/usr/local/www/status_captiveportal_expire.php @@ -83,7 +83,7 @@ if (!is_array($config['captiveportal'])) { } $a_cp =& $config['captiveportal']; -$pgtitle = array(gettext("Status"), gettext("Captive portal"), gettext("Expire Vouchers"), $a_cp[$cpzone]['zone']); +$pgtitle = array(gettext("Status"), gettext("Captive Portal"), sprintf(gettext("Zone: %s"), $a_cp[$cpzone]['zone']), gettext("Expire Vouchers")); include("head.inc"); @@ -118,9 +118,9 @@ print($form); if ($_POST) { if ($_POST['vouchers']) { if (voucher_expire($_POST['vouchers'])) { - print_info_box(gettext('Voucher successfully marked'), 'success'); + print_info_box(gettext('Voucher successfully marked.'), 'success'); } else { - print_info_box(gettext('Error: Voucher could not be processed'), 'danger'); + print_info_box(gettext('Voucher could not be processed.'), 'danger'); } } } diff --git a/src/usr/local/www/status_captiveportal_test.php b/src/usr/local/www/status_captiveportal_test.php index 227669d..ad55e81 100644 --- a/src/usr/local/www/status_captiveportal_test.php +++ b/src/usr/local/www/status_captiveportal_test.php @@ -83,7 +83,7 @@ if (!is_array($config['captiveportal'])) { } $a_cp =& $config['captiveportal']; -$pgtitle = array(gettext("Status"), gettext("Captive portal"), gettext("Test Vouchers"), $a_cp[$cpzone]['zone']); +$pgtitle = array(gettext("Status"), gettext("Captive Portal"), sprintf(gettext("Zone: %s"), $a_cp[$cpzone]['zone']), gettext("Test Vouchers")); $shortcut_section = "captiveportal-vouchers"; include("head.inc"); diff --git a/src/usr/local/www/status_captiveportal_voucher_rolls.php b/src/usr/local/www/status_captiveportal_voucher_rolls.php index 2d8f2f3..81716c1 100644 --- a/src/usr/local/www/status_captiveportal_voucher_rolls.php +++ b/src/usr/local/www/status_captiveportal_voucher_rolls.php @@ -82,7 +82,7 @@ if (!is_array($config['captiveportal'])) { $config['captiveportal'] = array(); } $a_cp =& $config['captiveportal']; -$pgtitle = array(gettext("Status"), gettext("Captive portal"), gettext("Voucher Rolls"), $a_cp[$cpzone]['zone']); +$pgtitle = array(gettext("Status"), gettext("Captive Portal"), sprintf(gettext("Zone: %s"), $a_cp[$cpzone]['zone']), gettext("Voucher Rolls")); $shortcut_section = "captiveportal-vouchers"; if (!is_array($config['voucher'][$cpzone]['roll'])) { diff --git a/src/usr/local/www/status_captiveportal_vouchers.php b/src/usr/local/www/status_captiveportal_vouchers.php index 95a3c42..6757cef 100644 --- a/src/usr/local/www/status_captiveportal_vouchers.php +++ b/src/usr/local/www/status_captiveportal_vouchers.php @@ -82,7 +82,7 @@ if (!is_array($config['captiveportal'])) { $config['captiveportal'] = array(); } $a_cp =& $config['captiveportal']; -$pgtitle = array(gettext("Status"), gettext("Captive portal"), gettext("Vouchers"), $a_cp[$cpzone]['zone']); +$pgtitle = array(gettext("Status"), gettext("Captive Portal"), sprintf(gettext("Zone: %s"), $a_cp[$cpzone]['zone']), gettext("Active Vouchers")); $shortcut_section = "captiveportal-vouchers"; function clientcmp($a, $b) { diff --git a/src/usr/local/www/status_carp.php b/src/usr/local/www/status_carp.php index 224ef6f..0cb8e49 100644 --- a/src/usr/local/www/status_carp.php +++ b/src/usr/local/www/status_carp.php @@ -177,7 +177,7 @@ if (is_array($config['virtualip']['vip'])) { if ($carpcount == 0) { print_info_box(gettext('No CARP interfaces have been defined.') . '<br />' . '<a href="system_hasync.php" class="alert-link">' . - gettext("You can configure high availability sync settings here") . + gettext("You can configure high availability sync settings here.") . '</a>'); } else { ?> @@ -199,7 +199,7 @@ if ($carpcount == 0) { sprintf(gettext('Search the %1$sSystem Log%2$s for CARP demotion-related events.'), "<a href=\"/status_logs.php?filtertext=carp%3A+demoted+by\">", "</a>") . "<br/><br/>" . '<input type="submit" class="btn btn-warning" name="resetdemotion" id="resetdemotion" value="' . - gettext("Reset CARP Demotion Status") . + gettext("Reset CARP Demotion Status.") . '" />', 'danger' ); diff --git a/src/usr/local/www/status_dhcp_leases.php b/src/usr/local/www/status_dhcp_leases.php index b787257..a49ef87 100644 --- a/src/usr/local/www/status_dhcp_leases.php +++ b/src/usr/local/www/status_dhcp_leases.php @@ -66,7 +66,7 @@ require("guiconfig.inc"); require_once("config.inc"); -$pgtitle = array(gettext("Status"), gettext("DHCP leases")); +$pgtitle = array(gettext("Status"), gettext("DHCP Leases")); $shortcut_section = "dhcp"; $leasesfile = "{$g['dhcpd_chroot_path']}/var/db/dhcpd.leases"; diff --git a/src/usr/local/www/status_dhcpv6_leases.php b/src/usr/local/www/status_dhcpv6_leases.php index 73eef3c..87c1ad4 100644 --- a/src/usr/local/www/status_dhcpv6_leases.php +++ b/src/usr/local/www/status_dhcpv6_leases.php @@ -67,7 +67,7 @@ require("guiconfig.inc"); require_once("config.inc"); -$pgtitle = array(gettext("Status"), gettext("DHCPv6 leases")); +$pgtitle = array(gettext("Status"), gettext("DHCPv6 Leases")); $shortcut_section = "dhcp6"; $leasesfile = "{$g['dhcpd_chroot_path']}/var/db/dhcpd6.leases"; @@ -439,7 +439,7 @@ if (count($pools) > 0) { } if (empty($leases)) { - print '<div class="alert alert-warning" role="alert">' . gettext("No leases file found. Is the DHCP server active?") . '</div>'; + print_info_box(gettext("No leases file found. Is the DHCPv6 server active?"), 'warning', false); } ?> diff --git a/src/usr/local/www/status_gateway_groups.php b/src/usr/local/www/status_gateway_groups.php index ebf12cd..e670541 100755 --- a/src/usr/local/www/status_gateway_groups.php +++ b/src/usr/local/www/status_gateway_groups.php @@ -83,7 +83,7 @@ $changedesc = gettext("Gateway Groups") . ": "; $gateways_status = return_gateways_status(); -$pgtitle = array(gettext("Status"), gettext("Gateway Groups")); +$pgtitle = array(gettext("Status"), gettext("Gateways"), gettext("Gateway Groups")); $shortcut_section = "gateway-groups"; include("head.inc"); diff --git a/src/usr/local/www/status_gateways.php b/src/usr/local/www/status_gateways.php index deb5046..8049837 100644 --- a/src/usr/local/www/status_gateways.php +++ b/src/usr/local/www/status_gateways.php @@ -77,7 +77,7 @@ $gateways_status = return_gateways_status(true); $now = time(); $year = date("Y"); -$pgtitle = array(gettext("Status"), gettext("Gateways")); +$pgtitle = array(gettext("Status"), gettext("Gateways"), gettext("Gateways")); $shortcut_section = "gateways"; include("head.inc"); diff --git a/src/usr/local/www/status_interfaces.php b/src/usr/local/www/status_interfaces.php index 3d19bac..227933b 100644 --- a/src/usr/local/www/status_interfaces.php +++ b/src/usr/local/www/status_interfaces.php @@ -207,14 +207,11 @@ foreach ($ifdescrs as $ifdescr => $ifname): <?php endforeach; -?> - -<div class="alert alert-warning" role="alert"> - <?=gettext("Using dial-on-demand will bring the connection up again if any packet ". - "triggers it. To substantiate this point: disconnecting manually ". - "will <strong>not</strong> prevent dial-on-demand from making connections ". - "to the outside! Don't use dial-on-demand if you want to make sure that the line ". - "is kept disconnected.");?> -</div> -<?php include("foot.inc"); ?> +print_info_box(gettext("Using dial-on-demand will bring the connection up again if any packet ". + "triggers it. To substantiate this point: disconnecting manually ". + "will <strong>not</strong> prevent dial-on-demand from making connections ". + "to the outside! Don't use dial-on-demand if you want to make sure that the line ". + "is kept disconnected."), 'warning', false); +include("foot.inc"); +?> diff --git a/src/usr/local/www/status_ipsec.php b/src/usr/local/www/status_ipsec.php index 10b25b1..5009a6e 100644 --- a/src/usr/local/www/status_ipsec.php +++ b/src/usr/local/www/status_ipsec.php @@ -118,8 +118,8 @@ $status = ipsec_list_sa(); $tab_array = array(); $tab_array[] = array(gettext("Overview"), true, "status_ipsec.php"); $tab_array[] = array(gettext("Leases"), false, "status_ipsec_leases.php"); -$tab_array[] = array(gettext("SAD"), false, "status_ipsec_sad.php"); -$tab_array[] = array(gettext("SPD"), false, "status_ipsec_spd.php"); +$tab_array[] = array(gettext("SADs"), false, "status_ipsec_sad.php"); +$tab_array[] = array(gettext("SPDs"), false, "status_ipsec_spd.php"); display_top_tabs($tab_array); ?> @@ -528,7 +528,7 @@ if (ipsec_enabled()) { <div class="infoblock blockopen"> <?php } -print_info_box(sprintf(gettext('You can configure IPsec %1$shere%2$s'), '<a href="vpn_ipsec.php">', '</a>'), 'info', false); +print_info_box(sprintf(gettext('You can configure IPsec %1$shere%2$s.'), '<a href="vpn_ipsec.php">', '</a>'), 'info', false); ?> </div> <?php diff --git a/src/usr/local/www/status_ipsec_leases.php b/src/usr/local/www/status_ipsec_leases.php index 0778e90..6c2426c 100644 --- a/src/usr/local/www/status_ipsec_leases.php +++ b/src/usr/local/www/status_ipsec_leases.php @@ -74,8 +74,8 @@ $mobile = ipsec_dump_mobile(); $tab_array = array(); $tab_array[] = array(gettext("Overview"), false, "status_ipsec.php"); $tab_array[] = array(gettext("Leases"), true, "status_ipsec_leases.php"); -$tab_array[] = array(gettext("SAD"), false, "status_ipsec_sad.php"); -$tab_array[] = array(gettext("SPD"), false, "status_ipsec_spd.php"); +$tab_array[] = array(gettext("SADs"), false, "status_ipsec_sad.php"); +$tab_array[] = array(gettext("SPDs"), false, "status_ipsec_spd.php"); display_top_tabs($tab_array); if (isset($mobile['pool']) && is_array($mobile['pool'])) { @@ -161,7 +161,7 @@ if (ipsec_enabled()) { <div class="infoblock blockopen"> <?php } -print_info_box(sprintf(gettext('You can configure IPsec %1$shere%2$s'), '<a href="vpn_ipsec.php">', '</a>'), 'info', false); +print_info_box(sprintf(gettext('You can configure IPsec %1$shere%2$s.'), '<a href="vpn_ipsec.php">', '</a>'), 'info', false); ?> </div> <?php diff --git a/src/usr/local/www/status_ipsec_sad.php b/src/usr/local/www/status_ipsec_sad.php index e213e50..a831bb6 100644 --- a/src/usr/local/www/status_ipsec_sad.php +++ b/src/usr/local/www/status_ipsec_sad.php @@ -58,15 +58,15 @@ ##|+PRIV ##|*IDENT=page-status-ipsec-sad -##|*NAME=Status: IPsec: SAD -##|*DESCR=Allow access to the 'Status: IPsec: SAD' page. +##|*NAME=Status: IPsec: SADs +##|*DESCR=Allow access to the 'Status: IPsec: SADs' page. ##|*MATCH=status_ipsec_sad.php* ##|-PRIV require("guiconfig.inc"); require("ipsec.inc"); -$pgtitle = array(gettext("Status"), gettext("IPsec"), gettext("SAD")); +$pgtitle = array(gettext("Status"), gettext("IPsec"), gettext("SADs")); $shortcut_section = "ipsec"; include("head.inc"); @@ -85,8 +85,8 @@ if ($_GET['act'] == "del") { $tab_array = array(); $tab_array[] = array(gettext("Overview"), false, "status_ipsec.php"); $tab_array[] = array(gettext("Leases"), false, "status_ipsec_leases.php"); -$tab_array[] = array(gettext("SAD"), true, "status_ipsec_sad.php"); -$tab_array[] = array(gettext("SPD"), false, "status_ipsec_spd.php"); +$tab_array[] = array(gettext("SADs"), true, "status_ipsec_sad.php"); +$tab_array[] = array(gettext("SPDs"), false, "status_ipsec_spd.php"); display_top_tabs($tab_array); if (count($sad)) { @@ -158,7 +158,7 @@ if (ipsec_enabled()) { <div class="infoblock blockopen"> <?php } -print_info_box(sprintf(gettext('You can configure IPsec %1$shere%2$s'), '<a href="vpn_ipsec.php">', '</a>'), 'info', false); +print_info_box(sprintf(gettext('You can configure IPsec %1$shere%2$s.'), '<a href="vpn_ipsec.php">', '</a>'), 'info', false); ?> </div> <?php diff --git a/src/usr/local/www/status_ipsec_spd.php b/src/usr/local/www/status_ipsec_spd.php index f051d39..574783d 100644 --- a/src/usr/local/www/status_ipsec_spd.php +++ b/src/usr/local/www/status_ipsec_spd.php @@ -69,7 +69,7 @@ define(LEFTARROW, '◀'); require("guiconfig.inc"); require("ipsec.inc"); -$pgtitle = array(gettext("Status"), gettext("IPsec"), gettext("SPD")); +$pgtitle = array(gettext("Status"), gettext("IPsec"), gettext("SPDs")); $shortcut_section = "ipsec"; include("head.inc"); @@ -78,8 +78,8 @@ $spd = ipsec_dump_spd(); $tab_array = array(); $tab_array[0] = array(gettext("Overview"), false, "status_ipsec.php"); $tab_array[1] = array(gettext("Leases"), false, "status_ipsec_leases.php"); -$tab_array[2] = array(gettext("SAD"), false, "status_ipsec_sad.php"); -$tab_array[3] = array(gettext("SPD"), true, "status_ipsec_spd.php"); +$tab_array[2] = array(gettext("SADs"), false, "status_ipsec_sad.php"); +$tab_array[3] = array(gettext("SPDs"), true, "status_ipsec_spd.php"); display_top_tabs($tab_array); if (count($spd)) { @@ -142,7 +142,7 @@ if (ipsec_enabled()) { <div class="infoblock blockopen"> <?php } -print_info_box(sprintf(gettext('You can configure IPsec %1$shere%2$s'), '<a href="vpn_ipsec.php">', '</a>'), 'info', false); +print_info_box(sprintf(gettext('You can configure IPsec %1$shere%2$s.'), '<a href="vpn_ipsec.php">', '</a>'), 'info', false); ?> </div> <?php diff --git a/src/usr/local/www/status_lb_vs.php b/src/usr/local/www/status_lb_vs.php index e86293a..057051d 100644 --- a/src/usr/local/www/status_lb_vs.php +++ b/src/usr/local/www/status_lb_vs.php @@ -91,7 +91,7 @@ $tab_array[] = array(gettext("Virtual Servers"), true, "status_lb_vs.php"); display_top_tabs($tab_array); if (empty($a_vs)) { - print('<div class="alert alert-danger">' . gettext("No load balancers have been configured!") . '</div>'); + print_info_box(gettext("No load balancers have been configured."), 'danger', false); } else { ?> <div class="table-responsive"></div> diff --git a/src/usr/local/www/status_logs.php b/src/usr/local/www/status_logs.php index c0ef9d4..6d8a81c 100755 --- a/src/usr/local/www/status_logs.php +++ b/src/usr/local/www/status_logs.php @@ -75,7 +75,7 @@ $allowed_logs = array( "shortcut" => ""), "dhcpd" => array("name" => gettext("DHCP"), "shortcut" => "dhcp"), - "portalauth" => array("name" => gettext("Captive Portal Authentication"), + "portalauth" => array("name" => gettext("Captive Portal Auth"), "shortcut" => "captiveportal"), "ipsec" => array("name" => gettext("IPsec"), "shortcut" => "ipsec"), @@ -85,7 +85,7 @@ $allowed_logs = array( "shortcut" => "relayd"), "openvpn" => array("name" => gettext("OpenVPN"), "shortcut" => "openvpn"), - "ntpd" => array("name" => gettext("NTPd"), + "ntpd" => array("name" => gettext("NTP"), "shortcut" => "ntp"), "gateways" => array("name" => gettext("Gateways"), "shortcut" => "gateways"), @@ -125,7 +125,11 @@ if ($filtertext) { $filtertextmeta="?filtertext=$filtertext"; } -$pgtitle = array(gettext("Status"), gettext("System logs"), gettext($allowed_logs[$logfile]["name"])); +if (in_array($logfile, array('system', 'gateways', 'routing', 'resolver', 'wireless'))) { + $pgtitle = array(gettext("Status"), gettext("System Logs"), gettext("System"), $allowed_logs[$logfile]["name"]); +} else { + $pgtitle = array(gettext("Status"), gettext("System Logs"), $allowed_logs[$logfile]["name"]); +} include("head.inc"); if (!$input_errors && $savemsg) { @@ -196,7 +200,7 @@ if (!$rawfilter) { </table> <?php if (count($filterlog) == 0) { - print_info_box(gettext('No logs to display')); + print_info_box(gettext('No logs to display.')); } ?> </div> @@ -244,7 +248,7 @@ events.push(function() { <?php if ($rows == 0) { - print_info_box(gettext('No logs to display')); + print_info_box(gettext('No logs to display.')); } ?> </div> diff --git a/src/usr/local/www/status_logs_common.inc b/src/usr/local/www/status_logs_common.inc index 90d1574..6253c8a 100644 --- a/src/usr/local/www/status_logs_common.inc +++ b/src/usr/local/www/status_logs_common.inc @@ -110,7 +110,7 @@ function tab_array_logs_common() { $tab_array[] = array(gettext("System"), $is_system_log, "status_logs.php"); $tab_array[] = array(gettext("Firewall"), $is_filter_log, "status_logs_filter.php"); $tab_array[] = array(gettext("DHCP"), ($logfile == 'dhcpd'), "status_logs.php?logfile=dhcpd"); - $tab_array[] = array(gettext("Portal Auth"), ($logfile == 'portalauth'), "status_logs.php?logfile=portalauth"); + $tab_array[] = array(gettext("Captive Portal Auth"), ($logfile == 'portalauth'), "status_logs.php?logfile=portalauth"); $tab_array[] = array(gettext("IPsec"), ($logfile == 'ipsec'), "status_logs.php?logfile=ipsec"); $tab_array[] = array(gettext("PPP"), ($logfile == 'ppp'), "status_logs.php?logfile=ppp"); $tab_array[] = array(gettext("VPN"), $is_pppoe_l2tp_vpn_log, "status_logs_vpn.php"); @@ -125,7 +125,7 @@ function tab_array_logs_common() { $tab_array[] = array(gettext("General"), ($logfile == 'system'), "/status_logs.php"); $tab_array[] = array(gettext("Gateways"), ($logfile == 'gateways'), "/status_logs.php?logfile=gateways"); $tab_array[] = array(gettext("Routing"), ($logfile == 'routing'), "/status_logs.php?logfile=routing"); - $tab_array[] = array(gettext("Resolver"), ($logfile == 'resolver'), "/status_logs.php?logfile=resolver"); + $tab_array[] = array(gettext("DNS Resolver"), ($logfile == 'resolver'), "/status_logs.php?logfile=resolver"); $tab_array[] = array(gettext("Wireless"), ($logfile == 'wireless'), "/status_logs.php?logfile=wireless"); } else if ($is_filter_log) { diff --git a/src/usr/local/www/status_logs_filter.php b/src/usr/local/www/status_logs_filter.php index e1883d3..0b09961 100644 --- a/src/usr/local/www/status_logs_filter.php +++ b/src/usr/local/www/status_logs_filter.php @@ -132,7 +132,7 @@ manage_log_code(); status_logs_common_code(); -$pgtitle = array(gettext("Status"), gettext("System logs"), gettext($allowed_logs[$logfile]["name"]), $view_title); +$pgtitle = array(gettext("Status"), gettext("System Logs"), gettext($allowed_logs[$logfile]["name"]), $view_title); include("head.inc"); if (!$input_errors && $savemsg) { @@ -304,7 +304,7 @@ if (!$rawfilter) { </table> <?php if (count($filterlog) == 0) { - print_info_box(gettext('No logs to display')); + print_info_box(gettext('No logs to display.')); } ?> </div> @@ -347,7 +347,7 @@ events.push(function() { <?php if ($rows == 0) { - print_info_box(gettext('No logs to display')); + print_info_box(gettext('No logs to display.')); } ?> </div> @@ -359,7 +359,7 @@ events.push(function() { <div class="infoblock"> <?php print_info_box('<a href="https://doc.pfsense.org/index.php/What_are_TCP_Flags%3F">' . - gettext("TCP Flags") . '</a>: F - FIN, S - SYN, A or . - ACK, R - RST, P - PSH, U - URG, E - ECE, C - CWR' . '<br />' . + gettext("TCP Flags") . '</a>: F - FIN, S - SYN, A or . - ACK, R - RST, P - PSH, U - URG, E - ECE, C - CWR.' . '<br />' . '<i class="fa fa-minus-square-o icon-primary"></i> = Add to block list., <i class="fa fa-plus-square-o icon-primary"></i> = Pass traffic, <i class="fa fa-info icon-primary"></i> = Resolve', 'info', false); ?> </div> diff --git a/src/usr/local/www/status_logs_filter_dynamic.php b/src/usr/local/www/status_logs_filter_dynamic.php index 26bb6d1..03208b2 100755 --- a/src/usr/local/www/status_logs_filter_dynamic.php +++ b/src/usr/local/www/status_logs_filter_dynamic.php @@ -112,7 +112,7 @@ manage_log_code(); status_logs_common_code(); -$pgtitle = array(gettext("Status"), gettext("System logs"), gettext($allowed_logs[$logfile]["name"]), $view_title); +$pgtitle = array(gettext("Status"), gettext("System Logs"), gettext($allowed_logs[$logfile]["name"]), $view_title); include("head.inc"); if (!$input_errors && $savemsg) { @@ -482,7 +482,7 @@ function toggleListDescriptions() { if (count($filterlog) == 0) { print '<tr class="text-nowrap"><td colspan=6>'; - print_info_box(gettext('No logs to display')); + print_info_box(gettext('No logs to display.')); print '</td></tr>'; } ?> @@ -507,7 +507,7 @@ if ($tcpcnt > 0) { <div class="infoblock"> <?php print_info_box('<a href="https://doc.pfsense.org/index.php/What_are_TCP_Flags%3F">' . - gettext("TCP Flags") . '</a>: F - FIN, S - SYN, A or . - ACK, R - RST, P - PSH, U - URG, E - ECE, C - CWR', 'info', false); + gettext("TCP Flags") . '</a>: F - FIN, S - SYN, A or . - ACK, R - RST, P - PSH, U - URG, E - ECE, C - CWR.', 'info', false); ?> </div> <?php diff --git a/src/usr/local/www/status_logs_filter_summary.php b/src/usr/local/www/status_logs_filter_summary.php index 84256d8..5247caa 100644 --- a/src/usr/local/www/status_logs_filter_summary.php +++ b/src/usr/local/www/status_logs_filter_summary.php @@ -98,7 +98,7 @@ if ($view == 'summary') { $view_title = gettext("Summary View"); } status_logs_common_code(); -$pgtitle = array(gettext("Status"), gettext("System logs"), gettext($allowed_logs[$logfile]["name"]), $view_title); +$pgtitle = array(gettext("Status"), gettext("System Logs"), gettext($allowed_logs[$logfile]["name"]), $view_title); include("head.inc"); if (!$input_errors && $savemsg) { diff --git a/src/usr/local/www/status_logs_settings.php b/src/usr/local/www/status_logs_settings.php index 587b281..60dfcd5 100644 --- a/src/usr/local/www/status_logs_settings.php +++ b/src/usr/local/www/status_logs_settings.php @@ -206,7 +206,7 @@ if ($_POST['resetlogs'] == gettext("Reset Log Files")) { } } -$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("Settings")); +$pgtitle = array(gettext("Status"), gettext("System Logs"), gettext("Settings")); include("head.inc"); $logfilesizeHelp = gettext("Logs are held in constant-size circular log files. This field controls how large each log file is, and thus how many entries may exist inside the log. By default this is approximately 500KB per log file, and there are nearly 20 such log files.") . @@ -233,7 +233,7 @@ $tab_array = array(); $tab_array[] = array(gettext("System"), false, "status_logs.php"); $tab_array[] = array(gettext("Firewall"), false, "status_logs_filter.php"); $tab_array[] = array(gettext("DHCP"), false, "status_logs.php?logfile=dhcpd"); -$tab_array[] = array(gettext("Portal Auth"), false, "status_logs.php?logfile=portalauth"); +$tab_array[] = array(gettext("Captive Portal Auth"), false, "status_logs.php?logfile=portalauth"); $tab_array[] = array(gettext("IPsec"), false, "status_logs.php?logfile=ipsec"); $tab_array[] = array(gettext("PPP"), false, "status_logs.php?logfile=ppp"); $tab_array[] = array(gettext("VPN"), false, "status_logs_vpn.php"); diff --git a/src/usr/local/www/status_logs_vpn.php b/src/usr/local/www/status_logs_vpn.php index 69042eb..663cffc 100644 --- a/src/usr/local/www/status_logs_vpn.php +++ b/src/usr/local/www/status_logs_vpn.php @@ -114,7 +114,7 @@ if ($filtertext) { $filtertextmeta="?filtertext=$filtertext"; } -$pgtitle = array(gettext("Status"), gettext("System logs"), gettext("VPN"), gettext($allowed_logs[$logfile]["name"])); +$pgtitle = array(gettext("Status"), gettext("System Logs"), gettext("VPN"), gettext($allowed_logs[$logfile]["name"])); include("head.inc"); if (!$input_errors && $savemsg) { @@ -240,7 +240,7 @@ if (!$rawfilter) { </table> <?php if (count($filterlog) == 0) { - print_info_box(gettext('No logs to display')); + print_info_box(gettext('No logs to display.')); } ?> </div> @@ -272,7 +272,7 @@ events.push(function() { <?php if ($rows == 0) { - print_info_box(gettext('No logs to display')); + print_info_box(gettext('No logs to display.')); } ?> </div> diff --git a/src/usr/local/www/status_ntpd.php b/src/usr/local/www/status_ntpd.php index 8b6b121..9a451ec 100644 --- a/src/usr/local/www/status_ntpd.php +++ b/src/usr/local/www/status_ntpd.php @@ -299,10 +299,10 @@ if (($gps_ok) && ($gps_lat) && ($gps_lon)): <tbody> <tr> <td> - <?=printf("%.5f", $gps_lat); ?> (<?=printf("%d", $gps_lat_deg); ?>° <?=printf("%.5f", $gps_lat_min*60); ?><?=$gps_vars[4]; ?>) + <?=sprintf("%.5f", $gps_lat); ?> (<?=sprintf("%d", $gps_lat_deg); ?>° <?=sprintf("%.5f", $gps_lat_min*60); ?><?=$gps_vars[4]; ?>) </td> <td> - <?=printf("%.5f", $gps_lon); ?> (<?=printf("%d", $gps_lon_deg); ?>° <?=printf("%.5f", $gps_lon_min*60); ?><?=$gps_vars[6]; ?>) + <?=sprintf("%.5f", $gps_lon); ?> (<?=sprintf("%d", $gps_lon_deg); ?>° <?=sprintf("%.5f", $gps_lon_min*60); ?><?=$gps_vars[6]; ?>) </td> <?php diff --git a/src/usr/local/www/status_openvpn.php b/src/usr/local/www/status_openvpn.php index 58e6d55..3274b17 100644 --- a/src/usr/local/www/status_openvpn.php +++ b/src/usr/local/www/status_openvpn.php @@ -356,7 +356,7 @@ if ($DisplayNote) { } if ((empty($clients)) && (empty($servers)) && (empty($sk_servers))) { - print_info_box(gettext("No OpenVPN instances defined")); + print_info_box(gettext("No OpenVPN instances defined.")); } ?> </form> diff --git a/src/usr/local/www/status_pkglogs.php b/src/usr/local/www/status_pkglogs.php index 0be83ee..aa63ee1 100755 --- a/src/usr/local/www/status_pkglogs.php +++ b/src/usr/local/www/status_pkglogs.php @@ -101,7 +101,7 @@ if (!$apkg) { // If we aren't looking for a specific package, locate the first p } } -$pgtitle = array(gettext("Status"), gettext("Package logs")); +$pgtitle = array(gettext("Status"), gettext("Package Logs")); include("head.inc"); if ($pkgwithlogging == false) { @@ -126,7 +126,7 @@ if ($pkgwithlogging == false) { ?> <div class="panel panel-default"> - <div class="panel-heading"><h2 class="panel-title"><?=printf(gettext('Last %1$s %2$s Log Entries'), $nentries, $curtab)?></h2></div> + <div class="panel-heading"><h2 class="panel-title"><?=sprintf(gettext('Last %1$s %2$s Log Entries'), $nentries, $curtab)?></h2></div> <div class="panel-body"> <pre> <?php diff --git a/src/usr/local/www/status_queues.php b/src/usr/local/www/status_queues.php index 6b824ef..15baf2d 100644 --- a/src/usr/local/www/status_queues.php +++ b/src/usr/local/www/status_queues.php @@ -84,7 +84,7 @@ if (!file_exists("{$g['varrun_path']}/qstats.pid") || !isvalidpid("{$g['varrun_p } $fd = @fsockopen("unix://{$g['varrun_path']}/qstats"); if (!$fd) { - $error = gettext("Something wrong happened during communication with stat gathering"); + $error = gettext("Something wrong happened during communication with stat gathering."); } else { $stats = ""; while (!feof($fd)) { @@ -142,7 +142,7 @@ if ($_REQUEST['getactivity']) { echo $finscript; exit; } -$pgtitle = array(gettext("Status"), gettext("Traffic shaper"), gettext("Queues")); +$pgtitle = array(gettext("Status"), gettext("Queues")); $shortcut_section = "trafficshaper"; include("head.inc"); @@ -217,7 +217,7 @@ else: ?> <br /> <div class="infoblock blockopen"> <?php - print_info_box(gettext("Queue graphs take 5 seconds to sample data"), 'info', false); + print_info_box(gettext("Queue graphs take 5 seconds to sample data."), 'info', false); ?> </div> </div> diff --git a/src/usr/local/www/status_rrd_graph.php b/src/usr/local/www/status_rrd_graph.php index 8a051b6..e6f98b3 100644 --- a/src/usr/local/www/status_rrd_graph.php +++ b/src/usr/local/www/status_rrd_graph.php @@ -289,12 +289,24 @@ switch ($curcat) { case "vpnusers": $curcattext = gettext("VPN Users"); break; + case "captiveportal": + $curcattext = gettext("Captive Portal"); + break; + case "ntpd": + $curcattext = gettext("NTP"); + break; + case "dhcpd": + $curcattext = gettext("DHCP Server"); + break; + case "queuedrops": + $curcattext = gettext("QueueDrops"); + break; default: $curcattext = ucfirst($curcat); break; } -$pgtitle = array(gettext("Status"), gettext("RRD Graphs"), gettext($curcattext . " Graphs")); +$pgtitle = array(gettext("Status"), gettext("RRD Graphs"), gettext($curcattext)); /* Load all CP zones */ if ($captiveportal && is_array($config['captiveportal'])) { @@ -441,7 +453,7 @@ function make_tabs() { } if ($vpnusers) { - $tab_array[] = array(gettext("VPN"), ($curcat == "vpnusers"), "status_rrd_graph.php?cat=vpnusers"); + $tab_array[] = array(gettext("VPN Users"), ($curcat == "vpnusers"), "status_rrd_graph.php?cat=vpnusers"); } if ($captiveportal) { @@ -449,7 +461,7 @@ function make_tabs() { } if ($ntpd) { - $tab_array[] = array("NTPD", ($curcat == "ntpd"), "status_rrd_graph.php?cat=ntpd"); + $tab_array[] = array("NTP", ($curcat == "ntpd"), "status_rrd_graph.php?cat=ntpd"); } if ($dhcpd) { diff --git a/src/usr/local/www/status_rrd_graph_img.php b/src/usr/local/www/status_rrd_graph_img.php index 2840cf0..df3f3c3 100644 --- a/src/usr/local/www/status_rrd_graph_img.php +++ b/src/usr/local/www/status_rrd_graph_img.php @@ -65,7 +65,7 @@ global $g, $rrd_graph_list, $rrd_period_list, $rrd_graph_length_list; $rrddbpath = "/var/db/rrd/"; $rrdtmppath = "/tmp/"; -$pgtitle = array(gettext("System"), gettext("RRD Graphs"), gettext("Image viewer")); +$pgtitle = array(gettext("System"), gettext("RRD Graphs"), gettext("Image Viewer")); if ($_GET['database']) { $curdatabase = basename($_GET['database']); diff --git a/src/usr/local/www/status_rrd_graph_settings.php b/src/usr/local/www/status_rrd_graph_settings.php index 4e6161e..3b8243e 100644 --- a/src/usr/local/www/status_rrd_graph_settings.php +++ b/src/usr/local/www/status_rrd_graph_settings.php @@ -162,7 +162,7 @@ if ($cellular) { } if ($vpnusers) { - $tab_array[] = array(gettext("VPN"), ($curcat == "vpnusers"), "status_rrd_graph.php?cat=vpnusers"); + $tab_array[] = array(gettext("VPN Users"), ($curcat == "vpnusers"), "status_rrd_graph.php?cat=vpnusers"); } if ($captiveportal) { @@ -170,7 +170,7 @@ if ($captiveportal) { } if ($ntpd) { - $tab_array[] = array(gettext("NTPD"), ($curcat == "ntpd"), "status_rrd_graph.php?cat=ntpd"); + $tab_array[] = array(gettext("NTP"), ($curcat == "ntpd"), "status_rrd_graph.php?cat=ntpd"); } if ($dhcpd) { diff --git a/src/usr/local/www/status_services.php b/src/usr/local/www/status_services.php index 6f7cbb0..59bbd78 100755 --- a/src/usr/local/www/status_services.php +++ b/src/usr/local/www/status_services.php @@ -195,7 +195,7 @@ if (count($services) > 0) { </form> <?php } else { - print_info_box(gettext("No services found"), 'danger'); + print_info_box(gettext("No services found."), 'danger'); } ?> <script type="text/javascript"> diff --git a/src/usr/local/www/status_upnp.php b/src/usr/local/www/status_upnp.php index 9c63c66..961f29b 100644 --- a/src/usr/local/www/status_upnp.php +++ b/src/usr/local/www/status_upnp.php @@ -66,7 +66,7 @@ require("guiconfig.inc"); if ($_POST) { if ($_POST['clear']) { upnp_action('restart'); - $savemsg = gettext("Rules have been cleared and the daemon restarted"); + $savemsg = gettext("Rules have been cleared and the daemon restarted."); } } diff --git a/src/usr/local/www/status_wireless.php b/src/usr/local/www/status_wireless.php index 4bcae6c..af2b6d7 100644 --- a/src/usr/local/www/status_wireless.php +++ b/src/usr/local/www/status_wireless.php @@ -244,9 +244,9 @@ display_top_tabs($tab_array); </form> <div class="infoblock"> <?php -print_info_box(gettext('<b>Flags:</b> A = authorized, E = Extended Rate (802.11g), P = Power saving mode<br />' . +print_info_box(gettext('<b>Flags:</b> A = authorized, E = Extended Rate (802.11g), P = Power saving mode.<br />' . '<b>Capabilities:</b> E = ESS (infrastructure mode), I = IBSS (ad-hoc mode), P = privacy (WEP/TKIP/AES), ' . - 'S = Short preamble, s = Short slot time'), 'info', false); + 'S = Short preamble, s = Short slot time.'), 'info', false); ?> </div> <?php diff --git a/src/usr/local/www/system.php b/src/usr/local/www/system.php index 0cd77e7..7f4cce3 100644 --- a/src/usr/local/www/system.php +++ b/src/usr/local/www/system.php @@ -494,14 +494,14 @@ if (!isset($pconfig['webguicss']) || !isset($csslist[$pconfig['webguicss']])) { $pconfig['webguicss'] = "pfSense.css"; } -$section = new Form_Section('Web Configurator'); +$section = new Form_Section('webConfigurator'); $section->addInput(new Form_Select( 'webguicss', 'Theme', $pconfig['webguicss'], $csslist -))->setHelp('Choose an alternative css file (if installed) to change the appearance of the WebConfigurator. css files are located in /usr/local/www/bootstrap/css'); +))->setHelp('Choose an alternative css file (if installed) to change the appearance of the webConfigurator. css files are located in /usr/local/www/bootstrap/css'); $section->addInput(new Form_Select( 'webguifixedmenu', diff --git a/src/usr/local/www/system_advanced_admin.php b/src/usr/local/www/system_advanced_admin.php index e56e630..e54f5a6 100644 --- a/src/usr/local/www/system_advanced_admin.php +++ b/src/usr/local/www/system_advanced_admin.php @@ -336,7 +336,7 @@ display_top_tabs($tab_array); ?><div id="container"><?php $form = new Form; -$section = new Form_Section('WebConfigurator'); +$section = new Form_Section('webConfigurator'); $group = new Form_Group('Protocol'); $group->add(new Form_Checkbox( diff --git a/src/usr/local/www/system_advanced_notifications.php b/src/usr/local/www/system_advanced_notifications.php index d3c40c3..6b36e72 100644 --- a/src/usr/local/www/system_advanced_notifications.php +++ b/src/usr/local/www/system_advanced_notifications.php @@ -209,7 +209,7 @@ if ($_POST) { if (file_exists("/var/db/notices_lastmsg.txt")) { unlink("/var/db/notices_lastmsg.txt"); } - $savemsg = notify_via_smtp(sprintf(gettext("This is a test message from %s. It is safe to ignore this message."), $g['product_name']), true); + $savemsg = notify_via_smtp(sprintf(gettext("This is a test message from %s. It is safe to ignore this message."), $g['product_name']), true); } } diff --git a/src/usr/local/www/system_authservers.php b/src/usr/local/www/system_authservers.php index 33a3137..de192ed 100644 --- a/src/usr/local/www/system_authservers.php +++ b/src/usr/local/www/system_authservers.php @@ -111,7 +111,7 @@ if ($act == "del") { /* Remove server from temp list used later on this page. */ unset($a_server[$_GET['id']]); - $savemsg = sprintf(gettext("Authentication Server %s deleted"), htmlspecialchars($serverdeleted)); + $savemsg = sprintf(gettext("Authentication Server %s deleted."), htmlspecialchars($serverdeleted)); write_config($savemsg); } diff --git a/src/usr/local/www/system_camanager.php b/src/usr/local/www/system_camanager.php index e184779..cb7e952 100644 --- a/src/usr/local/www/system_camanager.php +++ b/src/usr/local/www/system_camanager.php @@ -128,7 +128,7 @@ if ($act == "del") { $name = $a_ca[$id]['descr']; unset($a_ca[$id]); write_config(); - $savemsg = sprintf(gettext("Certificate Authority %s and its CRLs (if any) successfully deleted"), htmlspecialchars($name)); + $savemsg = sprintf(gettext("Certificate Authority %s and its CRLs (if any) successfully deleted."), htmlspecialchars($name)); pfSenseHeader("system_camanager.php"); exit; } diff --git a/src/usr/local/www/system_certmanager.php b/src/usr/local/www/system_certmanager.php index 2544407..2e3a8c4 100644 --- a/src/usr/local/www/system_certmanager.php +++ b/src/usr/local/www/system_certmanager.php @@ -137,7 +137,7 @@ if ($act == "del") { unset($a_cert[$id]); write_config(); - $savemsg = sprintf(gettext("Certificate %s successfully deleted"), htmlspecialchars($a_cert[$id]['descr'])); + $savemsg = sprintf(gettext("Certificate %s successfully deleted."), htmlspecialchars($a_cert[$id]['descr'])); pfSenseHeader("system_certmanager.php"); exit; } diff --git a/src/usr/local/www/system_crlmanager.php b/src/usr/local/www/system_crlmanager.php index e8f69c9..15579a5 100644 --- a/src/usr/local/www/system_crlmanager.php +++ b/src/usr/local/www/system_crlmanager.php @@ -123,7 +123,7 @@ if (!$thiscrl && (($act != "") && ($act != "new"))) { if ($act == "del") { $name = htmlspecialchars($thiscrl['descr']); if (crl_in_use($id)) { - $savemsg = sprintf(gettext("Certificate Revocation List %s is in use and cannot be deleted"), $name); + $savemsg = sprintf(gettext("Certificate Revocation List %s is in use and cannot be deleted."), $name); } else { foreach ($a_crl as $cid => $acrl) { if ($acrl['refid'] == $thiscrl['refid']) { @@ -131,7 +131,7 @@ if ($act == "del") { } } write_config("Deleted CRL {$name}."); - $savemsg = sprintf(gettext("Certificate Revocation List %s successfully deleted"), $name); + $savemsg = sprintf(gettext("Certificate Revocation List %s successfully deleted."), $name); } } @@ -212,13 +212,13 @@ if ($act == "delcert") { $certname = htmlspecialchars($thiscert['descr']); $crlname = htmlspecialchars($thiscrl['descr']); if (cert_unrevoke($thiscert, $thiscrl)) { - $savemsg = sprintf(gettext("Deleted Certificate %s from CRL %s"), $certname, $crlname); + $savemsg = sprintf(gettext("Deleted Certificate %s from CRL %s."), $certname, $crlname); // refresh IPsec and OpenVPN CRLs openvpn_refresh_crls(); vpn_ipsec_configure(); write_config($savemsg); } else { - $savemsg = sprintf(gettext("Failed to delete Certificate %s from CRL %s"), $certname, $crlname); + $savemsg = sprintf(gettext("Failed to delete Certificate %s from CRL %s."), $certname, $crlname); } $act="edit"; } @@ -495,7 +495,7 @@ if ($act == "new" || $act == gettext("Save") || $input_errors) { <div class="panel-body table-responsive"> <?php if (!is_array($crl['cert']) || (count($crl['cert']) == 0)) { - print_info_box(gettext("No Certificates Found for this CRL."), 'danger'); + print_info_box(gettext("No certificates found for this CRL."), 'danger'); } else { ?> <table class="table table-striped table-hover table-condensed"> @@ -548,7 +548,7 @@ if ($act == "new" || $act == gettext("Save") || $input_errors) { } if (count($ca_certs) == 0) { - print_info_box(gettext("No Certificates Found for this CA."), 'danger'); + print_info_box(gettext("No certificates found for this CA."), 'danger'); } else { $section = new Form_Section('Choose a Certificate to Revoke'); $group = new Form_Group(null); diff --git a/src/usr/local/www/system_groupmanager.php b/src/usr/local/www/system_groupmanager.php index 4230f53..1cb6f2d 100644 --- a/src/usr/local/www/system_groupmanager.php +++ b/src/usr/local/www/system_groupmanager.php @@ -99,7 +99,7 @@ if ($act == "delgroup") { $groupdeleted = $a_group[$id]['name']; unset($a_group[$id]); write_config(); - $savemsg = sprintf(gettext("Group %s successfully deleted"), $groupdeleted); + $savemsg = sprintf(gettext("Group %s successfully deleted."), $groupdeleted); } if ($act == "delpriv") { @@ -123,7 +123,7 @@ if ($act == "delpriv") { write_config(); $act = "edit"; - $savemsg = sprintf(gettext("Privilege %s successfully deleted"), $privdeleted); + $savemsg = sprintf(gettext("Privilege %s successfully deleted."), $privdeleted); } if ($act == "edit") { @@ -150,7 +150,7 @@ if (isset($_GET['dellall_x'])) { unset($a_group[$groupid]); } } - $savemsg = gettext("Selected groups removed successfully!"); + $savemsg = gettext("Selected groups removed successfully."); write_config($savemsg); } } diff --git a/src/usr/local/www/system_hasync.php b/src/usr/local/www/system_hasync.php index f078910..bfbfa93 100755 --- a/src/usr/local/www/system_hasync.php +++ b/src/usr/local/www/system_hasync.php @@ -296,7 +296,7 @@ $group->add(new Form_MultiCheckbox( $group->add(new Form_MultiCheckbox( 'synchronizewol', - 'Synchronize Wake on LAN', + 'Synchronize Wake-on-LAN', 'WoL Server settings ', ($pconfig['synchronizewol'] === 'on'), 'on' diff --git a/src/usr/local/www/system_usermanager.php b/src/usr/local/www/system_usermanager.php index 94b7fe5..b92b873 100644 --- a/src/usr/local/www/system_usermanager.php +++ b/src/usr/local/www/system_usermanager.php @@ -118,7 +118,7 @@ if ($_GET['act'] == "deluser") { $userdeleted = $a_user[$id]['name']; unset($a_user[$id]); write_config(); - $savemsg = sprintf(gettext("User %s successfully deleted"), $userdeleted); + $savemsg = sprintf(gettext("User %s successfully deleted."), $userdeleted); } else if ($act == "new") { /* * set this value cause the text field is read only @@ -142,7 +142,7 @@ if (isset($_POST['dellall'])) { unset($a_user[$userid]); } } - $savemsg = gettext("Selected users removed successfully!"); + $savemsg = gettext("Selected users removed successfully."); write_config($savemsg); } } diff --git a/src/usr/local/www/system_usermanager_passwordmg.php b/src/usr/local/www/system_usermanager_passwordmg.php index 29d2dda..8773a1f 100644 --- a/src/usr/local/www/system_usermanager_passwordmg.php +++ b/src/usr/local/www/system_usermanager_passwordmg.php @@ -92,7 +92,7 @@ if (isset($_POST['save'])) { write_config(); - $savemsg = gettext("Password successfully changed"); + $savemsg = gettext("Password successfully changed."); } } diff --git a/src/usr/local/www/system_usermanager_settings.php b/src/usr/local/www/system_usermanager_settings.php index 27c5855..d4b6567 100644 --- a/src/usr/local/www/system_usermanager_settings.php +++ b/src/usr/local/www/system_usermanager_settings.php @@ -98,7 +98,7 @@ if ($_POST) { if ($authsrv['type'] == "ldap") { $save_and_test = true; } else { - $savemsg = gettext("Settings have been saved, but the test was not performed because it is supported only for ldap based backends."); + $savemsg = gettext("Settings have been saved, but the test was not performed because it is supported only for LDAP based backends."); } } } diff --git a/src/usr/local/www/vpn_ipsec.php b/src/usr/local/www/vpn_ipsec.php index 1d8d5c1..289118e 100644 --- a/src/usr/local/www/vpn_ipsec.php +++ b/src/usr/local/www/vpn_ipsec.php @@ -557,9 +557,8 @@ display_top_tabs($tab_array); </form> <div class="infoblock"> - <?=print_info_box('<strong>' . gettext("Note:") . '</strong><br />' . - sprintf(gettext("You can check your IPsec status at %s%s%s."), '<a href="status_ipsec.php">', gettext("Status:IPsec"), '</a>') . '<br />' . - sprintf(gettext("IPsec Debug Mode can be enabled at %s%s%s."), '<a href="vpn_ipsec_settings.php">', gettext("VPN:IPsec:Advanced Settings"), '</a>') . '<br />' . + <?=print_info_box(sprintf(gettext("You can check your IPsec status at %s%s%s."), '<a href="status_ipsec.php">', gettext("Status:IPsec"), '</a>') . '<br />' . + sprintf(gettext("IPsec debug mode can be enabled at %s%s%s."), '<a href="vpn_ipsec_settings.php">', gettext("VPN:IPsec:Advanced Settings"), '</a>') . '<br />' . sprintf(gettext("IPsec can be set to prefer older SAs at %s%s%s."), '<a href="vpn_ipsec_settings.php">', gettext("VPN:IPsec:Advanced Settings"), '</a>'), 'info', false)?> </div> diff --git a/src/usr/local/www/vpn_ipsec_keys.php b/src/usr/local/www/vpn_ipsec_keys.php index 2161831..00834c9 100644 --- a/src/usr/local/www/vpn_ipsec_keys.php +++ b/src/usr/local/www/vpn_ipsec_keys.php @@ -202,9 +202,8 @@ if (is_subsystem_dirty('ipsec')) { </a> </nav> -<div class="alert alert-info"> - <strong><?=gettext("Note"); ?>:</strong> - <?=gettext(" PSK for any user can be set by using an identifier of any")?> -</div> +<?php +print_info_box(gettext("PSK for any user can be set by using an identifier of any."), 'info', false); +?> <?php include("foot.inc"); ?> diff --git a/src/usr/local/www/vpn_ipsec_keys_edit.php b/src/usr/local/www/vpn_ipsec_keys_edit.php index 33a8faa..0bb99b9 100644 --- a/src/usr/local/www/vpn_ipsec_keys_edit.php +++ b/src/usr/local/www/vpn_ipsec_keys_edit.php @@ -152,7 +152,7 @@ if ($_POST) { } } -$pgtitle = array(gettext("VPN"), gettext("IPsec"), gettext("Pre-Shared Key"), gettext("Edit")); +$pgtitle = array(gettext("VPN"), gettext("IPsec"), gettext("Pre-Shared Keys"), gettext("Edit")); $shortcut_section = "ipsec"; include("head.inc"); @@ -203,9 +203,8 @@ print $form; ?> -<div class="alert alert-info"> - <strong><?=gettext("Note"); ?>:</strong><br /> - <?=gettext("PSK for any user can be set by using an identifier of any")?> -</div> +<?php +print_info_box(gettext("PSK for any user can be set by using an identifier of any."), 'info', false); +?> <?php include("foot.inc"); ?> diff --git a/src/usr/local/www/vpn_ipsec_mobile.php b/src/usr/local/www/vpn_ipsec_mobile.php index 21e365a..3040be6 100644 --- a/src/usr/local/www/vpn_ipsec_mobile.php +++ b/src/usr/local/www/vpn_ipsec_mobile.php @@ -445,7 +445,7 @@ foreach ($a_phase1 as $ph1ent) { } } if ($pconfig['enable'] && !$ph1found) { - print_info_box(gettext("Support for IPsec Mobile clients is enabled but a Phase1 definition was not found") . ".<br />" . gettext("Please click Create to define one."), "warning", "create", gettext("Create Phase1")); + print_info_box(gettext("Support for IPsec Mobile Clients is enabled but a Phase 1 definition was not found") . ".<br />" . gettext("Please click Create to define one."), "warning", "create", gettext("Create Phase 1")); } if ($input_errors) { diff --git a/src/usr/local/www/vpn_ipsec_phase1.php b/src/usr/local/www/vpn_ipsec_phase1.php index 035827e..14f1ff4 100644 --- a/src/usr/local/www/vpn_ipsec_phase1.php +++ b/src/usr/local/www/vpn_ipsec_phase1.php @@ -651,10 +651,10 @@ function build_eal_list() { } if ($pconfig['mobile']) { - $pgtitle = array(gettext("VPN"), gettext("IPsec"), gettext("Mobile Client"), gettext("Edit Phase 1")); + $pgtitle = array(gettext("VPN"), gettext("IPsec"), gettext("Mobile Clients"), gettext("Edit Phase 1")); $editing_mobile = true; } else { - $pgtitle = array(gettext("VPN"), gettext("IPsec"), gettext("Tunnel"), gettext("Edit Phase 1")); + $pgtitle = array(gettext("VPN"), gettext("IPsec"), gettext("Tunnels"), gettext("Edit Phase 1")); $editing_mobile = false; } diff --git a/src/usr/local/www/vpn_ipsec_phase2.php b/src/usr/local/www/vpn_ipsec_phase2.php index 20e033e..4632e05 100644 --- a/src/usr/local/www/vpn_ipsec_phase2.php +++ b/src/usr/local/www/vpn_ipsec_phase2.php @@ -438,10 +438,10 @@ if ($_POST) { } if ($pconfig['mobile']) { - $pgtitle = array(gettext("VPN"), gettext("IPsec"), gettext("Mobile Client"), gettext("Edit Phase 2")); + $pgtitle = array(gettext("VPN"), gettext("IPsec"), gettext("Mobile Clients"), gettext("Edit Phase 2")); $editing_mobile = true; } else { - $pgtitle = array(gettext("VPN"), gettext("IPsec"), gettext("Tunnel"), gettext("Edit Phase 2")); + $pgtitle = array(gettext("VPN"), gettext("IPsec"), gettext("Tunnels"), gettext("Edit Phase 2")); $editing_mobile = false; } $shortcut_section = "ipsec"; diff --git a/src/usr/local/www/vpn_l2tp.php b/src/usr/local/www/vpn_l2tp.php index 5c13369..2541def 100644 --- a/src/usr/local/www/vpn_l2tp.php +++ b/src/usr/local/www/vpn_l2tp.php @@ -366,7 +366,7 @@ print($form); ?> <div class="infoblock blockopen"> <?php - print_info_box(gettext("Don't forget to add a firewall rule to permit traffic from L2TP clients!"), 'info', false); + print_info_box(gettext("Don't forget to add a firewall rule to permit traffic from L2TP clients."), 'info', false); ?> </div> diff --git a/src/usr/local/www/vpn_l2tp_users.php b/src/usr/local/www/vpn_l2tp_users.php index a5c5a0e..931eef2 100644 --- a/src/usr/local/www/vpn_l2tp_users.php +++ b/src/usr/local/www/vpn_l2tp_users.php @@ -106,11 +106,11 @@ if ($savemsg) { } if (isset($config['l2tp']['radius']['enable'])) { - print_info_box(gettext("Warning: RADIUS is enabled. The local user database will not be used.")); + print_info_box(gettext("RADIUS is enabled. The local user database will not be used.")); } if (is_subsystem_dirty('l2tpusers')) { - print_apply_box(gettext("The l2tp user list has been modified.") . "<br />" . gettext("You must apply the changes in order for them to take effect") . ".<br /><b>" . gettext("Warning: this will terminate all current l2tp sessions!") . "</b>"); + print_apply_box(gettext("The L2TP user list has been modified.") . "<br />" . gettext("You must apply the changes in order for them to take effect") . ".<br /><b>" . gettext("Warning: this will terminate all current L2TP sessions!") . "</b>"); } diff --git a/src/usr/local/www/vpn_l2tp_users_edit.php b/src/usr/local/www/vpn_l2tp_users_edit.php index a0caea6..673f088 100644 --- a/src/usr/local/www/vpn_l2tp_users_edit.php +++ b/src/usr/local/www/vpn_l2tp_users_edit.php @@ -60,7 +60,7 @@ ##|*MATCH=vpn_l2tp_users_edit.php* ##|-PRIV -$pgtitle = array(gettext("VPN"), gettext("L2TP"), gettext("User"), gettext("Edit")); +$pgtitle = array(gettext("VPN"), gettext("L2TP"), gettext("Users"), gettext("Edit")); $shortcut_section = "l2tps"; function l2tpusercmp($a, $b) { diff --git a/src/usr/local/www/vpn_openvpn_client.php b/src/usr/local/www/vpn_openvpn_client.php index 3b9ae7e..96b4fc4 100644 --- a/src/usr/local/www/vpn_openvpn_client.php +++ b/src/usr/local/www/vpn_openvpn_client.php @@ -56,8 +56,8 @@ ##|+PRIV ##|*IDENT=page-openvpn-client -##|*NAME=OpenVPN: Client -##|*DESCR=Allow access to the 'OpenVPN: Client' page. +##|*NAME=OpenVPN: Clients +##|*DESCR=Allow access to the 'OpenVPN: Clients' page. ##|*MATCH=vpn_openvpn_client.php* ##|-PRIV @@ -67,7 +67,7 @@ require_once("pkg-utils.inc"); global $openvpn_topologies; -$pgtitle = array(gettext("VPN"), gettext("OpenVPN"), gettext("Client")); +$pgtitle = array(gettext("VPN"), gettext("OpenVPN"), gettext("Clients")); $shortcut_section = "openvpn"; if (!is_array($config['openvpn']['openvpn-client'])) { @@ -123,7 +123,7 @@ if ($_GET['act'] == "del") { } unset($a_client[$id]); write_config(); - $savemsg = gettext("Client successfully deleted"); + $savemsg = gettext("Client successfully deleted."); } if ($_GET['act'] == "new") { @@ -441,8 +441,8 @@ if ($savemsg) { } $tab_array = array(); -$tab_array[] = array(gettext("Server"), false, "vpn_openvpn_server.php"); -$tab_array[] = array(gettext("Client"), true, "vpn_openvpn_client.php"); +$tab_array[] = array(gettext("Servers"), false, "vpn_openvpn_server.php"); +$tab_array[] = array(gettext("Clients"), true, "vpn_openvpn_client.php"); $tab_array[] = array(gettext("Client Specific Overrides"), false, "vpn_openvpn_csc.php"); $tab_array[] = array(gettext("Wizards"), false, "wizard.php?xml=openvpn_wizard.xml"); add_package_tabs("OpenVPN", $tab_array); diff --git a/src/usr/local/www/vpn_openvpn_csc.php b/src/usr/local/www/vpn_openvpn_csc.php index 10d7ade..d836f3b 100644 --- a/src/usr/local/www/vpn_openvpn_csc.php +++ b/src/usr/local/www/vpn_openvpn_csc.php @@ -97,7 +97,7 @@ if ($_GET['act'] == "del") { openvpn_delete_csc($a_csc[$id]); unset($a_csc[$id]); write_config(); - $savemsg = gettext("Client Specific Override successfully deleted"); + $savemsg = gettext("Client specific override successfully deleted."); } if ($_GET['act'] == "edit") { @@ -319,8 +319,8 @@ if ($savemsg) { } $tab_array = array(); -$tab_array[] = array(gettext("Server"), false, "vpn_openvpn_server.php"); -$tab_array[] = array(gettext("Client"), false, "vpn_openvpn_client.php"); +$tab_array[] = array(gettext("Servers"), false, "vpn_openvpn_server.php"); +$tab_array[] = array(gettext("Clients"), false, "vpn_openvpn_client.php"); $tab_array[] = array(gettext("Client Specific Overrides"), true, "vpn_openvpn_csc.php"); $tab_array[] = array(gettext("Wizards"), false, "wizard.php?xml=openvpn_wizard.xml"); add_package_tabs("OpenVPN", $tab_array); diff --git a/src/usr/local/www/vpn_openvpn_server.php b/src/usr/local/www/vpn_openvpn_server.php index da65de9..0a4234f 100644 --- a/src/usr/local/www/vpn_openvpn_server.php +++ b/src/usr/local/www/vpn_openvpn_server.php @@ -56,8 +56,8 @@ ##|+PRIV ##|*IDENT=page-openvpn-server -##|*NAME=OpenVPN: Server -##|*DESCR=Allow access to the 'OpenVPN: Server' page. +##|*NAME=OpenVPN: Servers +##|*DESCR=Allow access to the 'OpenVPN: Servers' page. ##|*MATCH=vpn_openvpn_server.php* ##|-PRIV @@ -126,7 +126,7 @@ if ($_GET['act'] == "del") { } unset($a_server[$id]); write_config(); - $savemsg = gettext("Server successfully deleted"); + $savemsg = gettext("Server successfully deleted."); } if ($_GET['act'] == "new") { @@ -589,7 +589,7 @@ if ($_POST) { } } -$pgtitle = array(gettext("VPN"), gettext("OpenVPN"), gettext("Server")); +$pgtitle = array(gettext("VPN"), gettext("OpenVPN"), gettext("Servers")); $shortcut_section = "openvpn"; include("head.inc"); @@ -607,8 +607,8 @@ if ($savemsg) { } $tab_array = array(); -$tab_array[] = array(gettext("Server"), true, "vpn_openvpn_server.php"); -$tab_array[] = array(gettext("Client"), false, "vpn_openvpn_client.php"); +$tab_array[] = array(gettext("Servers"), true, "vpn_openvpn_server.php"); +$tab_array[] = array(gettext("Clients"), false, "vpn_openvpn_client.php"); $tab_array[] = array(gettext("Client Specific Overrides"), false, "vpn_openvpn_csc.php"); $tab_array[] = array(gettext("Wizards"), false, "wizard.php?xml=openvpn_wizard.xml"); add_package_tabs("OpenVPN", $tab_array); diff --git a/src/usr/local/www/widgets/include/smart_status.inc b/src/usr/local/www/widgets/include/smart_status.inc index cfcb9a9..26e29b3 100644 --- a/src/usr/local/www/widgets/include/smart_status.inc +++ b/src/usr/local/www/widgets/include/smart_status.inc @@ -1,5 +1,5 @@ <?php //set variable for custom title -$smart_status_title = gettext("SMART Status"); +$smart_status_title = gettext("S.M.A.R.T. Status"); $smart_status_title_link = "diag_smart.php"; ?> diff --git a/src/usr/local/www/widgets/include/wake_on_lan.inc b/src/usr/local/www/widgets/include/wake_on_lan.inc index accab90..7c85d91 100644 --- a/src/usr/local/www/widgets/include/wake_on_lan.inc +++ b/src/usr/local/www/widgets/include/wake_on_lan.inc @@ -1,7 +1,7 @@ <?php //set variable for custom title -$wake_on_lan_title = gettext("Wake On Lan"); +$wake_on_lan_title = gettext("Wake-on-Lan"); $wake_on_lan_title_link = "services_wol.php"; ?>
\ No newline at end of file diff --git a/src/usr/local/www/widgets/widgets/installed_packages.widget.php b/src/usr/local/www/widgets/widgets/installed_packages.widget.php index dca7c0d..2fa5d6f 100644 --- a/src/usr/local/www/widgets/widgets/installed_packages.widget.php +++ b/src/usr/local/www/widgets/widgets/installed_packages.widget.php @@ -73,10 +73,7 @@ if ($_REQUEST && $_REQUEST['ajax']) { }); if (empty($installed_packages)) { - print("<div class=\"alert alert-warning\" role=\"alert\">\n"); - print(" <strong>". gettext("No packages installed.") . "</strong>\n"); - print(" " . gettext('You can install packages <a href="pkg_mgr.php" class="alert-link">here</a>.') . "\n"); - print("</div>\n"); + print_info_box(gettext("No packages installed.") . " " . gettext('You can install packages <a href="pkg_mgr.php" class="alert-link">here</a>.'), 'warning', false); exit; } diff --git a/src/usr/local/www/widgets/widgets/smart_status.widget.php b/src/usr/local/www/widgets/widgets/smart_status.widget.php index dce74a1..c55d39a 100644 --- a/src/usr/local/www/widgets/widgets/smart_status.widget.php +++ b/src/usr/local/www/widgets/widgets/smart_status.widget.php @@ -69,7 +69,7 @@ require_once("/usr/local/www/widgets/include/smart_status.inc"); <th></th> <th><?=gettext("Drive")?></th> <th><?=gettext("Ident")?></th> - <th><?=gettext("SMART Status")?></th> + <th><?=gettext("S.M.A.R.T. Status")?></th> </tr> </thead> <tbody> diff --git a/src/usr/local/www/wizard.php b/src/usr/local/www/wizard.php index b3eb88a..28a9216 100644 --- a/src/usr/local/www/wizard.php +++ b/src/usr/local/www/wizard.php @@ -89,25 +89,25 @@ if ($_POST['xml']) { if (empty($xml)) { $xml = "not_defined"; - print_info_box(sprintf(gettext("ERROR: Could not open %s."), $xml)); + print_info_box(sprintf(gettext("Could not open %s."), $xml), 'danger'); die; } else { $wizard_xml_prefix = "{$g['www_path']}/wizards"; $wizard_full_path = "{$wizard_xml_prefix}/{$xml}"; if (substr_compare(realpath($wizard_full_path), $wizard_xml_prefix, 0, strlen($wizard_xml_prefix))) { - print_info_box(gettext("ERROR: Invalid path specified.")); + print_info_box(gettext("Invalid path specified."), 'danger'); die; } if (file_exists($wizard_full_path)) { $pkg = parse_xml_config_pkg($wizard_full_path, "pfsensewizard"); } else { - print_info_box(sprintf(gettext("ERROR: Could not open %s."), $xml)); + print_info_box(sprintf(gettext("Could not open %s."), $xml), 'danger'); die; } } if (!is_array($pkg)) { - print_info_box(sprintf(gettext("ERROR: Could not parse %s/wizards/%s file."), $g['www_path'], $xml)); + print_info_box(sprintf(gettext("Could not parse %s/wizards/%s file."), $g['www_path'], $xml), 'danger'); die; } diff --git a/src/usr/local/www/wizards/setup_wizard.xml b/src/usr/local/www/wizards/setup_wizard.xml index 4914c89..ad807b7 100644 --- a/src/usr/local/www/wizards/setup_wizard.xml +++ b/src/usr/local/www/wizards/setup_wizard.xml @@ -621,7 +621,7 @@ <stepsubmitphpaction> <![CDATA[ if(empty($_POST['lanipaddress']) || !is_ipaddr($_POST['lanipaddress'])) { - print_info_box("Invalid LAN IP Address. Please press back in your browser window and correct."); + print_info_box("Invalid LAN IP address. Please press back in your browser window and correct."); die; } @@ -709,7 +709,7 @@ local_user_set($admin_user); write_config(); } else { - print_info_box("Passwords do not match! Please press back in your browser window and correct."); + print_info_box("Passwords do not match! Please press back in your browser window and correct."); die; } } |