Update of /cvsroot/php-blog/serendipity
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv16793
Modified Files:
serendipity_functions.inc.php
Log Message:
Fixes the step backword made in from 1.307 to 1.308 of serendipity_functions.inc.php.
Index: serendipity_functions.inc.php
===================================================================
RCS file: /cvsroot/php-blog/serendipity/serendipity_functions.inc.php,v
retrieving revision 1.309
retrieving revision 1.310
diff -u -d -r1.309 -r1.310
--- serendipity_functions.inc.php 3 Jul 2004 16:33:10 -0000 1.309
+++ serendipity_functions.inc.php 4 Jul 2004 15:55:49 -0000 1.310
@@ -595,7 +595,8 @@
/**
* Give it a range in YYYYMMDD format to gather the desired entries
-* (For february 2002 you would pass 200202 e.g.
+* (For february 2002 you would pass 200202 for all entries withing
+* two timestamps you would pass array(timestamp1,timestamp2)
**/
function serendipity_fetchEntries($range = null, $full = true, $limit = '', $fetchDrafts = false, $modified_since = false, $orderby = 'timestamp DESC', $filter_sql = '') {
global $serendipity;
@@ -635,7 +636,13 @@
if ($drafts) {
$and .= " AND $drafts";
}
- } else {
+ }
+ elseif (is_array($range) && count($range)==2) {
+ $startts = $range[0];
+ $endts = $range[1];
+ $and = " WHERE timestamp >= $startts AND timestamp <= $endts";
+ }
+ else {
if ($modified_since) {
$unix_modified = strtotime($modified_since);
if ($unix_modified != -1) {
|