1
0
Fork 0
mirror of https://github.com/Oreolek/ifhub.club.git synced 2024-06-01 07:38:11 +03:00
This commit is contained in:
Mzhelskiy Maxim 2011-04-25 15:12:54 +00:00
parent effdb4b675
commit e6a63f0fc2

View file

@ -60,7 +60,7 @@ class ActionRss extends Action {
$item['title']=$oTopic->getTitle();
$item['guid']=$oTopic->getUrl();
$item['link']=$oTopic->getUrl();
$item['description']=$oTopic->getTextShort();
$item['description']=$this->getTopicText($oTopic);
$item['pubDate']=$oTopic->getDateAdd();
$item['author']=$oTopic->getUser()->getLogin();
$item['category']=htmlspecialchars($oTopic->getTags());
@ -89,7 +89,7 @@ class ActionRss extends Action {
$item['title']=$oTopic->getTitle();
$item['guid']=$oTopic->getUrl();
$item['link']=$oTopic->getUrl();
$item['description']=$oTopic->getTextShort();
$item['description']=$this->getTopicText($oTopic);
$item['pubDate']=$oTopic->getDateAdd();
$item['author']=$oTopic->getUser()->getLogin();
$item['category']=htmlspecialchars($oTopic->getTags());
@ -188,7 +188,7 @@ class ActionRss extends Action {
$item['title']=$oTopic->getTitle();
$item['guid']=$oTopic->getUrl();
$item['link']=$oTopic->getUrl();
$item['description']=$oTopic->getTextShort();
$item['description']=$this->getTopicText($oTopic);
$item['pubDate']=$oTopic->getDateAdd();
$item['author']=$oTopic->getUser()->getLogin();
$item['category']=htmlspecialchars($oTopic->getTags());
@ -222,7 +222,7 @@ class ActionRss extends Action {
$item['title']=$oTopic->getTitle();
$item['guid']=$oTopic->getUrl();
$item['link']=$oTopic->getUrl();
$item['description']=$oTopic->getTextShort();
$item['description']=$this->getTopicText($oTopic);
$item['pubDate']=$oTopic->getDateAdd();
$item['author']=$oTopic->getUser()->getLogin();
$item['category']=htmlspecialchars($oTopic->getTags());
@ -266,7 +266,7 @@ class ActionRss extends Action {
$item['title']=$oTopic->getTitle();
$item['guid']=$oTopic->getUrl();
$item['link']=$oTopic->getUrl();
$item['description']=$oTopic->getTextShort();
$item['description']=$this->getTopicText($oTopic);
$item['pubDate']=$oTopic->getDateAdd();
$item['author']=$oTopic->getUser()->getLogin();
$item['category']=htmlspecialchars($oTopic->getTags());
@ -278,5 +278,24 @@ class ActionRss extends Action {
$this->Viewer_Assign('aItems',$topics);
$this->SetTemplateAction('index');
}
/**
* Формирует текст топика для RSS
*
*/
protected function getTopicText($oTopic) {
$sText=$oTopic->getTextShort();
if ($oTopic->getTextShort()!=$oTopic->getText()) {
$sText.="<br><a href=\"{$oTopic->getUrl()}#cut\" title=\"{$this->Lang_Get('topic_read_more')}\">";
if ($oTopic->getCutText()) {
$sText.=htmlspecialchars($oTopic->getCutText());
} else {
$sText.=$this->Lang_Get('topic_read_more');
}
$sText.="</a>";
}
return $sText;
}
}
?>