diff options
author | Dries Buytaert <dries@buytaert.net> | 2001-12-09 18:58:27 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2001-12-09 18:58:27 +0000 |
commit | 9da79bc8c47961a95b6be80cdd1092ccda91efde (patch) | |
tree | e99280592f67191d7e870cb2d98536e4adb7a7a0 /modules/blog.module | |
parent | bf810154f6f1ccde131bf5435a3403cce0242972 (diff) | |
download | brdo-9da79bc8c47961a95b6be80cdd1092ccda91efde.tar.gz brdo-9da79bc8c47961a95b6be80cdd1092ccda91efde.tar.bz2 |
- Fixed a few feed glitched reported by Mark.
- Dropped a few database tables that where no longer needed.
Diffstat (limited to 'modules/blog.module')
-rw-r--r-- | modules/blog.module | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/modules/blog.module b/modules/blog.module index c622f4f7f..5d59d45b2 100644 --- a/modules/blog.module +++ b/modules/blog.module @@ -107,9 +107,9 @@ function blog_feed_user($uid = 0, $date = 0) { $date = time(); } - $result = db_query("SELECT n.nid, n.title, n.body, n.created, u.name, u.uid FROM blog b LEFT JOIN node n ON b.nid = n.nid LEFT JOIN users u ON n.uid = u.uid WHERE u.uid = '$uid' AND n.created > '". ($date - 2592000) ."' ORDER BY b.nid DESC LIMIT 15"); + $result = db_query("SELECT n.nid, n.title, n.teaser, n.created, u.name, u.uid FROM node n LEFT JOIN users u ON n.uid = u.uid WHERE n.type = 'blog' AND u.uid = '$uid' AND n.created > '". ($date - 2592000) ."' ORDER BY n.nid DESC LIMIT 15"); while ($blog = db_fetch_object($result)) { - $items .= format_rss_item($blog->title, path_uri() ."node.php?id=$blog->nid", $blog->body); + $items .= format_rss_item($blog->title, path_uri() ."node.php?id=$blog->nid", $blog->teaser); } $output .= "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n"; @@ -125,9 +125,10 @@ function blog_feed_user($uid = 0, $date = 0) { } function blog_feed_last() { - $result = db_query("SELECT n.nid, n.title, n.body, n.created, u.name, u.uid FROM blog b LEFT JOIN node n ON b.nid = n.nid LEFT JOIN users u ON n.uid = u.uid ORDER BY b.nid DESC LIMIT 15"); + $result = db_query("SELECT n.nid, n.title, n.teaser, n.created, u.name, u.uid FROM node n LEFT JOIN users u ON n.uid = u.uid WHERE n.type = 'blog' ORDER BY n.nid DESC LIMIT 15"); + while ($blog = db_fetch_object($result)) { - $items .= format_rss_item($blog->title, path_uri() ."module.php?mod=blog&op=view&id=$blog->nid", $blog->body); + $items .= format_rss_item($blog->title, path_uri() ."module.php?mod=blog&op=view&id=$blog->nid", $blog->teaser); } $output .= "<?xml version=\"1.0\" encoding=\"ISO-8859-1\" ?>\n"; |