From: henoheno Date: Mon, 10 Apr 2006 13:32:27 +0000 (+0900) Subject: Added defines PKWK_MAXSHOW_CACHE, PKWK_AUTOLINK_REGEX_CACHE X-Git-Tag: r1_5_0_rc1~100 X-Git-Url: http://git.osdn.net/view?p=pukiwiki%2Fpukiwiki.git;a=commitdiff_plain;h=512386fb0ca976b28c4293c448b4ad2d5ff57e0e Added defines PKWK_MAXSHOW_CACHE, PKWK_AUTOLINK_REGEX_CACHE --- diff --git a/lib/file.php b/lib/file.php index d1653aa..dc60561 100644 --- a/lib/file.php +++ b/lib/file.php @@ -1,6 +1,6 @@ ' . "\n" . + 'CACHE_DIR/' . PKWK_MAXSHOW_CACHE . '
' . "\n" . 'Maybe permission is not writable'); - set_file_buffer($fp, 0); flock($fp, LOCK_EX); rewind($fp); @@ -333,11 +335,9 @@ function put_lastmodified() die_message('Cannot write file ' . htmlspecialchars($whatsnew) . '
' . "\n" . 'Maybe permission is not writable or filename is too long'); - set_file_buffer($fp, 0); flock($fp, LOCK_EX); rewind($fp); - foreach (array_keys($recent_pages) as $page) { $time = $recent_pages[$page]; $s_lastmod = htmlspecialchars(format_date($time)); @@ -353,12 +353,10 @@ function put_lastmodified() list($pattern, $pattern_a, $forceignorelist) = get_autolink_pattern($pages); - $file = 'autolink.dat'; - $fp = fopen(CACHE_DIR . $file, 'w') or + $fp = fopen(CACHE_DIR . PKWK_AUTOLINK_REGEX_CACHE, 'w') or die_message('Cannot write file ' . - 'CACHE_DIR/' . $file . '
' . "\n" . + 'CACHE_DIR/' . PKWK_AUTOLINK_REGEX_CACHE . '
' . "\n" . 'Maybe permission is not writable'); - set_file_buffer($fp, 0); flock($fp, LOCK_EX); rewind($fp);