From 9ad57b3d8d1000f17962bb0ba00a8958b2f141db Mon Sep 17 00:00:00 2001 From: Jesse Morgan Date: Wed, 1 Jun 2011 12:15:26 -0700 Subject: Added scripts, email addresses, other minor modifications --- htdocs/src/PostIterator.inc.php | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'htdocs/src/PostIterator.inc.php') diff --git a/htdocs/src/PostIterator.inc.php b/htdocs/src/PostIterator.inc.php index 43c1a05..a269853 100644 --- a/htdocs/src/PostIterator.inc.php +++ b/htdocs/src/PostIterator.inc.php @@ -37,6 +37,16 @@ class PostIterator implements Iterator { $this->where[] = "category_id='$category_id'"; } + public function filterCreated($after, $before = false) { + $sqlafter = date('Y-m-d H:i:s', $after); + $this->where[] = "created > '$sqlafter'"; + + if ($before !== false) { + $sqlbefore = date('Y-m-d H:i:s', $before); + $this->where[] = "created < '$sqlbefore'"; + } + } + public function orderBy($order) { $this->order = $order; } -- cgit v1.2.3