Fix by roti

This commit is contained in:
Garvin Hicking 2008-03-04 09:44:11 +00:00
parent 16dd1400d4
commit 34f769b892

View File

@ -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'))) {