Changeset 188 for branches/class-rewrite/common/rss.php
- Timestamp:
- 07/09/06 15:40:22 (3 years ago)
- Files:
-
- 1 modified
-
branches/class-rewrite/common/rss.php (modified) (6 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/class-rewrite/common/rss.php
r154 r188 1 <? 1 <?php 2 2 /* 3 3 * MvBlog -- An open source no-noncence blogtool … … 16 16 * at the top of the source tree. 17 17 */ 18 require("functions_blog.php"); 18 require("mvblog.php"); 19 $mvblog = new MvBlog(); 19 20 //get all the authors in an array 20 $res =& $ db->query("SELECT * FROM authors");21 $res =& $mvblog->db->query("SELECT * FROM authors"); 21 22 22 23 if (PEAR::isError($res)) { … … 27 28 $authors[$row["id"]]["fullname"] = $row["fullname"]; 28 29 $authors[$row["id"]]["email"] = $row["email"]; 29 }30 //same with categories31 $res =& $db->query("SELECT * FROM categories");32 33 if (PEAR::isError($res)) {34 die($res->getMessage());35 }36 37 while ($res->fetchInto($row, DB_FETCHMODE_ASSOC)) {38 $categories[$row["id"]] = $row["name"];39 30 } 40 31 … … 55 46 $comments = false; 56 47 } 57 $res =& $ db->limitQuery($sql, 0, 20);48 $res =& $mvblog->db->limitQuery($sql, 0, 20); 58 49 59 50 if (PEAR::isError($res)) { … … 82 73 } else { 83 74 echo "\t\t\t<link>".$url."index.php?action=view&id=".$row["id"]."$link</link>\n"; 84 echo "\t\t\t<category>".$ categories[$row["categories_id"]]."</category>\n";75 echo "\t\t\t<category>".$mvblog->categories[$row["categories_id"]]."</category>\n"; 85 76 echo "\t\t\t<guid isPermaLink=\"true\">".$url."index.php?action=view&id=".$row["id"]."$link</guid>\n"; 86 77 if (!$comments) { … … 89 80 } 90 81 } 91 echo "\t\t\t<description>". strip_bbcode(strip_tags(str_replace("##BREAKPOINT##", "", stripslashes($row["body"]))))."</description>\n";82 echo "\t\t\t<description>".$mvblog->strip_bbcode(strip_tags(str_replace("##BREAKPOINT##", "", stripslashes($row["body"]))))."</description>\n"; 92 83 echo "\t\t\t<pubDate>".date("r", $row["date"])."</pubDate>\n"; 93 84
