'; } else { $recent_lines = $args[0]; } } // Show only N times if ($exec_count > PLUGIN_RECENT_EXEC_LIMIT) { return '#recent(): You called me too much' . '
' . "\n"; } else { ++$exec_count; } if (! file_exists(PLUGIN_RECENT_CACHE)) { put_lastmodified(); if (! file_exists(PLUGIN_RECENT_CACHE)) { return '#recent(): Cache file of RecentChanges not found' . '
'; } } // Get latest N changes $lines = file_head(PLUGIN_RECENT_CACHE, $recent_lines); if ($lines == FALSE) return '#recent(): File can not open' . '
' . "\n"; $script = get_script_uri(); $date = $items = ''; foreach ($lines as $line) { list($time, $page) = explode("\t", rtrim($line)); $_date = get_date($date_format, $time); if ($date != $_date) { // End of the day if ($date != '') $items .= '' . "\n"; // New day $date = $_date; $items .= '' . $date . '' . "\n" . '' . "\n"; return sprintf($_recent_plugin_frame, count($lines), $items); }