による出力に変更し構造化 * * $Id: recent.inc.php,v 1.13 2004/09/04 14:26:52 henoheno Exp $ */ // RecentChangesのキャッシュ define('PLUGIN_RECENT_CACHE', CACHE_DIR . 'recent.dat'); function plugin_recent_convert() { global $script, $vars, $date_format; global $_recent_plugin_frame; if (! file_exists(PLUGIN_RECENT_CACHE)) return ''; $recent_lines = 10; if (func_num_args()) { $args = func_get_args(); if (is_numeric($args[0])) $recent_lines = $args[0]; } // 先頭のN件(行)を取り出す $lines = array_splice(file(PLUGIN_RECENT_CACHE), 0, $recent_lines); $date = $items = ''; $items .= ''; if (! empty($lines)) $items .= "\n"; return sprintf($_recent_plugin_frame, count($lines), $items); } ?>