From 4623e12be7bace8807fd9d1bc10f6d4e86ab0d99 Mon Sep 17 00:00:00 2001 From: Max Pozdeev Date: Fri, 13 Nov 2009 16:36:50 +0300 Subject: [PATCH] * forgot to update feed.php to use new date format --- src/feed.php | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/src/feed.php b/src/feed.php index 09b2074..4a7ca09 100644 --- a/src/feed.php +++ b/src/feed.php @@ -27,7 +27,7 @@ $listData['_feed_descr'] = sprintf($lang->get('feed_description'), $listData['na htmlarray_ref($listData); $data = array(); -$q = $db->dq("SELECT * FROM todolist WHERE list_id=$listId ORDER BY d DESC LIMIT 100"); +$q = $db->dq("SELECT * FROM todolist WHERE list_id=$listId ORDER BY d_created DESC LIMIT 100"); while($r = $q->fetch_assoc($q)) { if($r['prio'] > 0) $r['prio'] = '+'.$r['prio']; @@ -56,13 +56,8 @@ function printRss($listData, $data) foreach($data as $v) { - $da = explode(' ', $v['d']); - $dDate = explode('-', $da[0]); - $dTime = explode(':', $da[1]); - $d_ts = mktime((int)$dTime[0],(int)$dTime[1],(int)$dTime[2], (int)$dDate[1],(int)$dDate[2],(int)$dDate[0]); - $d = gmdate('r', $d_ts); - - $guid = $listData['id'].'-'.$v['id'].'-'.$d_ts; + $d = gmdate('r', $v['d_created']); + $guid = $listData['id'].'-'.$v['id'].'-'.$v['d_created']; $s .= "\n$v[title]\n". "$link\n".