summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorUrban Müller2019-09-24 16:32:58 +0200
committerUrban Müller2019-09-24 16:32:58 +0200
commitcddd951dd098beedb29e07743f9abe79b35e38ee (patch)
treeaea474e4c89881504778fb5ff0a845822d5562a9
parent784642327bfb0d3456ce94257c4108f6b577f99a (diff)
downloaditools-cddd951dd098beedb29e07743f9abe79b35e38ee.tar.gz
itools-cddd951dd098beedb29e07743f9abe79b35e38ee.tar.bz2
itools-cddd951dd098beedb29e07743f9abe79b35e38ee.zip
simplify From:, readability
-rw-r--r--it.class11
1 files changed, 8 insertions, 3 deletions
diff --git a/it.class b/it.class
index ee5b8ad..097dcd9 100644
--- a/it.class
+++ b/it.class
@@ -290,11 +290,16 @@ static function error($p = array())
if (!it::is_live() || array_diff($debugparams, it::match('[-\w]+', $GLOBALS['ULTRAHOME'], ['all' => true]), ["devel", "twin", "utf8check", gethostname()]))
$type = mb_strtolower($type);
- $hostname = gethostname();
$user = posix_getpwuid(posix_geteuid())['name'];
- $from = "\"$user@$hostname\" <$user@" . gethostbyaddr(gethostbyname($hostname)) .">";
- it::mail(['From' => $from, 'To' => $p['to'], 'Subject' => $type . substr($p['title'], 0, 160), 'Body' => $body, 'Cc' => $GLOBALS['it_defaultconfig']['error_cc'], 'forcemail' => !it::is_devel()]);
+ it::mail([
+ 'From' => "\"$user@" . gethostname() . "\" <$user>",
+ 'To' => $p['to'],
+ 'Cc' => $GLOBALS['it_defaultconfig']['error_cc'],
+ 'Subject' => $type . substr($p['title'], 0, 160),
+ 'Body' => $body,
+ 'forcemail' => !it::is_devel(),
+ ]);
$p['title'] = "Mail: " . $p['title'];
}
else if ($_SERVER['REMOTE_ADDR'] && EDC('edplain')) # toscreen mode: web