From: garvinhicking Date: Tue, 4 Mar 2008 09:44:11 +0000 (+0000) Subject: Fix by roti X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=e187bc06984396ec34b34a84836f97d87787c7b2;p=s9y.git Fix by roti --- diff --git a/plugins/serendipity_event_statistics/serendipity_plugin_statistics.php b/plugins/serendipity_event_statistics/serendipity_plugin_statistics.php index e6e5699..02d0f09 100644 --- a/plugins/serendipity_event_statistics/serendipity_plugin_statistics.php +++ b/plugins/serendipity_event_statistics/serendipity_plugin_statistics.php @@ -190,9 +190,14 @@ class serendipity_plugin_statistics extends serendipity_plugin if (!file_exists($cachef) || filesize($cachef) == 0 || filemtime($cachef) < (time() - $cachetime)) { // Create statistics - list($year, $month, $day) = split('-', date('Y-m-d')); - $lastmonday = date('Ymd', strtotime('last monday')); - $nextsunday = date('Ymd', strtotime('next sunday')); + list($year, $month, $day) = split('-', date('Y-m-d')); + $lastmonday = date('Ymd', strtotime('last monday')); + $nextsunday = date('Ymd', strtotime('next sunday')); + if (date('w', strtotime('today') ) == "1" ) { // now it is monday + $lastmonday = date('Ymd', strtotime('today')); + } else if (date('w', strtotime('today') ) == "0" ) { // now it is sunday + $nextsunday = date('Ymd', strtotime('today')); + } $content = ''; if (serendipity_db_bool($this->get_config('show_lastentry'))) {