git.shiar.nl
/
minimedit.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
6cd8dc5
)
contact: fix login indicator, omit unresolved host names
author
Mischa POSLAWSKY
<perl@shiar.org>
Tue, 7 Aug 2018 14:22:12 +0000
(16:22 +0200)
committer
Mischa POSLAWSKY
<perl@shiar.org>
Tue, 7 Aug 2018 14:22:12 +0000
(16:22 +0200)
contact.php
patch
|
blob
|
history
diff --git
a/contact.php
b/contact.php
index c55ec0c033081af57341d891810722feb10aa547..691ff41679ef97f5fe719911b08be7998c2ee515 100644
(file)
--- a/
contact.php
+++ b/
contact.php
@@
-1,6
+1,7
@@
<?php
$error = NULL;
if ($_POST) {
+ global $User;
if (!empty($User)) {
$_REQUEST['login'] = $User['name'];
}
@@
-49,7
+50,9
@@
switch ($source) {
}
$origin = $_SERVER['REMOTE_ADDR'];
- $origin .= sprintf(' (%s)', gethostbyaddr($origin));
+ if ($resolved = @gethostbyaddr($origin) and $resolved !== $origin) {
+ $origin .= sprintf(' (%s)', gethostbyaddr($origin));
+ }
$body = "Ingevuld vanaf $origin:\r\n\r\n";
foreach ($input as $k => $v) {