summaryrefslogtreecommitdiff
path: root/htdocs/src/PostIterator.inc.php
diff options
context:
space:
mode:
authorJesse Morgan <jesse@jesterpm.net>2011-06-01 12:15:26 -0700
committerJesse Morgan <jesse@jesterpm.net ; true>2011-06-01 12:15:26 -0700
commit9ad57b3d8d1000f17962bb0ba00a8958b2f141db (patch)
tree515f444d429b999516e530e5d35fcaac6424f1a9 /htdocs/src/PostIterator.inc.php
parenta070cbe9627fcc29ef2f91b8f7578080203e6ad1 (diff)
Added scripts, email addresses, other minor modifications
Diffstat (limited to 'htdocs/src/PostIterator.inc.php')
-rw-r--r--htdocs/src/PostIterator.inc.php10
1 files changed, 10 insertions, 0 deletions
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;
}