/////////////////////////////////////////////////
// PukiWiki - Yet another WikiWikiWeb clone.
//
-// $Id: file.php,v 1.37 2003/11/05 10:58:39 arino Exp $
+// $Id: file.php,v 1.38 2003/12/03 12:40:35 arino Exp $
//
// ¥½¡¼¥¹¤ò¼èÆÀ
if ($dir == DATA_DIR and $str == '' and file_exists($file))
{
unlink($file);
+ put_recentdeleted($page);
}
if ($str != '')
{
mb_send_mail($notify_to,$subject,$str,$notify_header);
}
}
+// ºï½üÍúÎò¥Ú¡¼¥¸¤Î¹¹¿·
+function put_recentdeleted($page)
+{
+ global $whatsdeleted,$maxshow_deleted;
+
+ if ($maxshow_deleted == 0)
+ {
+ return;
+ }
+ // update RecentDeleted
+ $lines = array();
+ foreach (get_source($whatsdeleted) as $line)
+ {
+ if (preg_match('/^-(.+) - (\[\[.+\]\])$/',$line,$matches))
+ {
+ $lines[$matches[2]] = $line;
+ }
+ }
+ $_page = "[[$page]]";
+ if (array_key_exists($_page,$lines))
+ {
+ unset($lines[$_page]);
+ }
+ array_unshift($lines,'-'.format_date(UTIME)." - $_page\n");
+ $lines = array_splice($lines,0,$maxshow_deleted);
+ $fp = fopen(get_filename($whatsdeleted),'w')
+ or die_message('cannot write page file '.htmlspecialchars($whatsdeleted).'<br />maybe permission is not writable or filename is too long');
+ flock($fp,LOCK_EX);
+ fputs($fp,join('',$lines));
+ fputs($fp,"#norelated\n"); // :)
+ flock($fp,LOCK_UN);
+ fclose($fp);
+}
// ºÇ½ª¹¹¿·¥Ú¡¼¥¸¤Î¹¹¿·
function put_lastmodified()
/////////////////////////////////////////////////
// PukiWiki - Yet another WikiWikiWeb clone.
//
-// $Id: pukiwiki.ini.php,v 1.52 2003/12/03 12:17:26 arino Exp $
+// $Id: pukiwiki.ini.php,v 1.53 2003/12/03 12:40:35 arino Exp $
//
// PukiWiki setting file
// ¹¹¿·ÍúÎò¥Ú¡¼¥¸¤Î̾Á°
$whatsnew = 'RecentChanges';
/////////////////////////////////////////////////
+// ºï½üÍúÎò¥Ú¡¼¥¸¤Î̾Á°
+$whatsdeleted = 'RecentDeleted';
+/////////////////////////////////////////////////
// InterWikiName¥Ú¡¼¥¸¤Î̾Á°
$interwiki = 'InterWikiName';
/////////////////////////////////////////////////
// ¹¹¿·ÍúÎò¤òɽ¼¨¤¹¤ë¤È¤¤ÎºÇÂç·ï¿ô
$maxshow = 80;
/////////////////////////////////////////////////
+// ºï½üÍúÎò¤ÎºÇÂç·ï¿ô(0¤ÇµÏ¿¤·¤Ê¤¤)
+$maxshow_deleted = 0;
+/////////////////////////////////////////////////
// ÊÔ½¸¤¹¤ë¤³¤È¤Î¤Ç¤¤Ê¤¤¥Ú¡¼¥¸¤Î̾Á° , ¤Ç¶èÀÚ¤ë
-$cantedit = array( $whatsnew, );
+$cantedit = array( $whatsnew,$whatsdeleted );
/////////////////////////////////////////////////
// Last-Modified ¥Ø¥Ã¥À¤ò½ÐÎϤ¹¤ë