summaryrefslogtreecommitdiff
path: root/inc/media.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2009-04-10 20:16:13 +0200
committerAndreas Gohr <andi@splitbrain.org>2009-04-10 20:16:13 +0200
commit2f9daf1661e0661f4400685164a54d4aa0b35bd6 (patch)
tree2e1f4cb4129ad920e663106eb0be9b555a9e9b7c /inc/media.php
parentd0a9c58614887a2f0b84b49588a131006e446a1d (diff)
downloadrpg-2f9daf1661e0661f4400685164a54d4aa0b35bd6.tar.gz
rpg-2f9daf1661e0661f4400685164a54d4aa0b35bd6.tar.bz2
Make more use of clientIP() FS#1668
Ignore-this: 13616da575fbe56064b2aa3d1d803bf5 darcs-hash:20090410181613-7ad00-b74c82c1f9296a2cb0d00b03316141b19821bda1.gz
Diffstat (limited to 'inc/media.php')
-rw-r--r--inc/media.php6
1 files changed, 4 insertions, 2 deletions
diff --git a/inc/media.php b/inc/media.php
index 2ea77d34c..d4aa751bd 100644
--- a/inc/media.php
+++ b/inc/media.php
@@ -401,11 +401,13 @@ function media_notify($id,$file,$mime){
global $conf;
if(empty($conf['notify'])) return; //notify enabled?
+ $ip = clientIP();
+
$text = rawLocale('uploadmail');
$text = str_replace('@DATE@',strftime($conf['dformat']),$text);
$text = str_replace('@BROWSER@',$_SERVER['HTTP_USER_AGENT'],$text);
- $text = str_replace('@IPADDRESS@',$_SERVER['REMOTE_ADDR'],$text);
- $text = str_replace('@HOSTNAME@',gethostbyaddr($_SERVER['REMOTE_ADDR']),$text);
+ $text = str_replace('@IPADDRESS@',$ip,$text);
+ $text = str_replace('@HOSTNAME@',gethostsbyaddrs($ip),$text);
$text = str_replace('@DOKUWIKIURL@',DOKU_URL,$text);
$text = str_replace('@USER@',$_SERVER['REMOTE_USER'],$text);
$text = str_replace('@MIME@',$mime,$text);