summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Dörre <felix@dogcraft.de>2014-09-09 23:32:59 +0200
committerFelix Dörre <felix@dogcraft.de>2014-09-09 23:32:59 +0200
commit2bf1684067b9b12b88a9144eb1aade57da17d58f (patch)
treeb6f1e526cffdfa4a391bcffcc5af1df69b9604ef
parent556cd8460d360017ecf66c82d4f24d615fa5e93a (diff)
downloadcacert-devel-2bf1684067b9b12b88a9144eb1aade57da17d58f.tar.gz
cacert-devel-2bf1684067b9b12b88a9144eb1aade57da17d58f.tar.xz
cacert-devel-2bf1684067b9b12b88a9144eb1aade57da17d58f.zip
bug-612: small fixups in code style
-rw-r--r--includes/general.php8
-rw-r--r--pages/account/13.php2
2 files changed, 5 insertions, 5 deletions
diff --git a/includes/general.php b/includes/general.php
index 43c0ce7..ff8e90e 100644
--- a/includes/general.php
+++ b/includes/general.php
@@ -804,8 +804,6 @@
/**
* Returns the given ip address truncated to /16 (ipv4) or to /48 (ipv6)
- *
- *
*/
function anonymizeIP($ip){
$bits = @inet_pton($ip);
@@ -816,16 +814,18 @@
$bits[2] = "\0";
$bits[3] = "\0";
$newIP = @inet_ntop($bits);
- if($newIP !== false)
+ if($newIP !== false) {
$newIP .= "/16";
+ }
return $newIP;
} else if(strlen($bits) == 16) {
for($i=6;$i<16;$i++){
$bits[$i]="\0";
}
$newIP = @inet_ntop($bits);
- if($newIP !== false)
+ if($newIP !== false) {
$newIP .= "/48";
+ }
return $newIP;
}
return false;
diff --git a/pages/account/13.php b/pages/account/13.php
index 5bbbfcb..c982a2d 100644
--- a/pages/account/13.php
+++ b/pages/account/13.php
@@ -29,7 +29,7 @@
$body = sprintf(_("Hi %s,"),$user['fname'])."\n\n";
$ip = anonymizeIp($_SERVER['REMOTE_ADDR']);
if($ip === false)
- $ip = "Error";
+ $ip = _("Error");
$body .= sprintf(_("You receive this automatic mail since you yourself or someone ".
"else looked up your secret questions and answers for a forgotten ".
"password.\n\n".