Page 1 of 1

fix archive month-view entry counter for future entries

Posted: Sat Oct 23, 2004 12:59 pm
by Timbalu
This might be useful for somebody.
Ian

serendipity_functions.inc.php ~ line 3502

function serendipity_postAmount($year, $month) {
global $serendipity;

$s = mktime(0, 0, 0, $month, 1, $year);
$e = mktime(23, 59, 59, $month, date('t', $s), $year);
- $querystring = "SELECT count(id) FROM {$serendipity['dbPrefix']}entries WHERE isdraft = 'false' AND timestamp >= $s AND timestamp <= $e";
+ $querystring = "SELECT count(id) FROM {$serendipity['dbPrefix']}entries WHERE isdraft = 'false' AND timestamp >= $s AND timestamp <= $e AND timestamp <= " . time() . "";
$query = serendipity_db_query($querystring);

return $query[0][0];
}

Posted: Sat Oct 23, 2004 4:24 pm
by tomsommer
This should already be fixed in the latest rc1, no?

Posted: Sun Oct 24, 2004 9:44 am
by Timbalu
tomsommer wrote:This should already be fixed in the latest rc1, no?
Really? :?
I looked into CVS yesterday and did not find it. Thats why I posted it here.
Is rc1 an extra branch?

Ian

Posted: Sun Oct 24, 2004 2:49 pm
by tomsommer
No, I guess it's not there then, will look into it before 0.7