/////////////////////////////////////////////////
// PukiWiki - Yet another WikiWikiWeb clone.
//
-// $Id: file.php,v 1.22 2003/06/10 13:59:02 arino Exp $
+// $Id: file.php,v 1.23 2003/06/10 14:22:51 arino Exp $
//
// ¥½¡¼¥¹¤ò¼èÆÀ
{
global $post,$update_exec;
global $_msg_invalidiwn;
+ global $notify,$notify_to,$notify_from,$notify_subject,$notify_header;
if (!is_pagename($page))
{
$timestamp = FALSE;
$file = $dir.encode($page).'.txt';
- if ($dir == DATA_DIR and $str == '' and file_exists($file)) {
+ if ($dir == DATA_DIR and $str == '' and file_exists($file))
+ {
unlink($file);
}
- if ($str != '') {
+ if ($str != '')
+ {
$str = preg_replace("/\r/",'',$str);
$str = rtrim($str)."\n";
- if ($notimestamp and file_exists($file)) {
+ if ($notimestamp and file_exists($file))
+ {
$timestamp = filemtime($file) - LOCALZONE;
}
fputs($fp,$str);
flock($fp,LOCK_UN);
fclose($fp);
- if ($timestamp) {
+ if ($timestamp)
+ {
touch($file,$timestamp + LOCALZONE);
}
}
- if (!$timestamp) {
+ if (!$timestamp)
+ {
put_lastmodified();
}
- if ($update_exec and $dir == DATA_DIR) {
+ if ($update_exec and $dir == DATA_DIR)
+ {
system($update_exec.' > /dev/null &');
}
+
+ if ($notify and $dir == DIFF_DIR)
+ {
+ $subject = str_replace('$page',$page,$notify_subject);
+ mb_language(LANG);
+ mb_send_mail($notify_to,$subject,$str,$notify_header);
+ }
}
// ºÇ½ª¹¹¿·¥Ú¡¼¥¸¤Î¹¹¿·
/////////////////////////////////////////////////
// PukiWiki - Yet another WikiWikiWeb clone.
//
-// $Id: pukiwiki.ini.php,v 1.37 2003/06/05 06:20:48 arino Exp $
+// $Id: pukiwiki.ini.php,v 1.38 2003/06/10 14:22:51 arino Exp $
//
// PukiWiki setting file
$update_exec = '';
//$update_exec = '/usr/bin/mknmz --media-type=text/pukiwiki -O /var/lib/namazu/index/ -L ja -c -K /var/www/wiki/';
+////////////////////////////////////////////////
+// ¥Ú¡¼¥¸¤Î¹¹¿·»þ¤Ë¥á¡¼¥ë¤òÁ÷¿®¤¹¤ë
+$notify = 0;
+// To:¡Ê°¸Àè¡Ë
+$notify_to = 'xxx@yyy.zz';
+// From:¡ÊÁ÷¤ê¼ç¡Ë
+$notify_from = 'xxx@yyy.zz';
+// Subject:¡Ê·ï̾¡Ë $page¤Ë¥Ú¡¼¥¸Ì¾¤¬Æþ¤ë
+$notify_subject = '[pukiwiki] $page';
+// ÄɲåإåÀ
+$notify_header = "From: $notify_from\r\nX-Mailer: PukiWiki/".S_VERSION." PHP/".phpversion();
+
/////////////////////////////////////////////////
// °ìÍ÷¡¦¹¹¿·°ìÍ÷¤Ë´Þ¤á¤Ê¤¤¥Ú¡¼¥¸Ì¾(Àµµ¬É½¸½¤Ç)
$non_list = '^\:';