Permalink
Browse files

BUGFIX: fixed bbcode not being parsed in the rss feeds. MINOR: format…

…ting fixes
  • Loading branch information...
Will Rossiter
Will Rossiter committed Jun 21, 2010
1 parent fb8a9df commit 8b98e33648cec797d9dd4ef7461d247b9b4be586
Showing with 7 additions and 8 deletions.
  1. +4 −6 code/ForumHolder.php
  2. +3 −2 code/Post.php
View
@@ -333,10 +333,10 @@ function getRecentPosts($limit = 50, $forumID = null, $threadID = null, $lastVis
$lastPostID = (int) $lastPostID;
// last post viewed
- if($lastPostID > 0) $filter[] = "\"ID\" > '". Convert::raw2sql($lastPostID) ."'";
+ if($lastPostID > 0) $filter[] = "\"Post\".\"ID\" > '". Convert::raw2sql($lastPostID) ."'";
// last time visited
- if($lastVisit) $filter[] = "\"Created\" > '". Convert::raw2sql($lastVisit) ."'";
+ if($lastVisit) $filter[] = "\"Post\".\"Created\" > '". Convert::raw2sql($lastVisit) ."'";
// limit to a forum
if($forumID) $filter[] = "\"ForumThread\".\"ForumID\" = '". Convert::raw2sql($forumID) ."'";
@@ -716,11 +716,11 @@ function rss() {
$data = array('last_created' => null, 'last_id' => null);
- if(!isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && !isset($_SERVER['HTTP_IF_NONE_MATCH'])) {
+ if(!isset($_SERVER['HTTP_IF_MODIFIED_SINCE']) && !isset($_SERVER['HTTP_IF_NONE_MATCH'])) {
// just to get the version data..
$this->getNewPostsAvailable(null, null, $forumID, $threadID, &$data);
- // No information provided by the client, just return the last posts
+ // No information provided by the client, just return the last posts
$rss = new RSSFeed(
$this->getRecentPosts(50, $forumID, $threadID),
$this->Link() . 'rss',
@@ -732,9 +732,7 @@ function rss() {
$data['last_created'],
$data['last_id']
);
-
$rss->outputToBrowser();
-
} else {
// Return only new posts, check the request headers!
View
@@ -208,16 +208,17 @@ function MarkAsSpamLink() {
}
}
- function RSSContent() {
+ function getRSSContent() {
$parser = new BBCodeParser($this->Content);
$html = $parser->parse();
if($this->Thread()) $html .= '<br><br>' . sprintf(_t('Post.POSTEDTO',"Posted to: %s"),$this->Thread()->Title);
$html .= " ". $this->ShowLink() . " | " .$this->ReplyLink();
+
return $html;
}
- function RSSAuthor() {
+ function getRSSAuthor() {
$author = $this->Author();
return $author->Nickname;
}

0 comments on commit 8b98e33

Please sign in to comment.