OSDN Git Service

Mail also it's URI and client's REMOTE_ADDR
authorhenoheno <henoheno>
Thu, 30 Dec 2004 14:45:01 +0000 (23:45 +0900)
committerhenoheno <henoheno>
Thu, 30 Dec 2004 14:45:01 +0000 (23:45 +0900)
lib/file.php

index 6b15ada..7ef49c0 100644 (file)
@@ -2,7 +2,7 @@
 /////////////////////////////////////////////////
 // PukiWiki - Yet another WikiWikiWeb clone.
 //
-// $Id: file.php,v 1.9 2004/12/11 15:44:45 henoheno Exp $
+// $Id: file.php,v 1.10 2004/12/30 14:45:01 henoheno Exp $
 //
 
 // ¥½¡¼¥¹¤ò¼èÆÀ
@@ -136,13 +136,17 @@ function file_write($dir, $page, $str, $notimestamp = FALSE)
                system($update_exec . ' > /dev/null &');
 
        if ($notify && $dir == DIFF_DIR) {
-               if ($notify_diff_only) // º¹Ê¬¤À¤±¤òÁ÷¿®¤¹¤ë
-                       $str = preg_replace('/^[^-+].*\n/m', '', $str);
-               if ($smtp_auth)
-                       pop_before_smtp();
+               if ($notify_diff_only) $str = preg_replace('/^[^-+].*\n/m', '', $str);
+               $str .= "\n" .
+                       str_repeat('-', 30) . "\n" .
+                       'URI: ' . get_script_uri() . '?' . rawurlencode($page) . "\n" .
+                       'REMOTE_ADDR: ' . $_SERVER['REMOTE_ADDR'] . "\n";
+
                $subject = str_replace('$page', $page, $notify_subject);
                ini_set('SMTP', $smtp_server);
                mb_language(LANG);
+
+               if ($smtp_auth) pop_before_smtp();
                mb_send_mail($notify_to, $subject, $str, $notify_header);
        }
 }