- md5
- b6471f3546a6b9b145c1b94c21d73d60
- sha1
- 19bb11d2fa110dbf3e399612f753447507aff91e
- sha256
- 6502d0b9e45b8d938b31e842a448330564f58c7d2ac10ff3a343776bf53d3aa8
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374
<?php
/**
* @copyright Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
* @license GNU General Public License version 2 or later; see LICENSE.txt
*/
// No direct access
defined('_JEXEC') or die;
jimport('joomla.application.component.view');
/**
* HTML View class for the Content component
*
* @package Joomla.Site
* @subpackage com_content
* @since 1.5
*/
class ContentViewCategory extends JView
{
function display()
{
$app = JFactory::getApplication();
$doc = JFactory::getDocument();
$params = $app->getParams();
$feedEmail = (@$app->getCfg('feed_email')) ? $app->getCfg('feed_email') : 'author';
$siteEmail = $app->getCfg('mailfrom');
// Get some data from the model
JRequest::setVar('limit', $app->getCfg('feed_limit'));
$category = $this->get('Category');
$rows = $this->get('Items');
$doc->link = JRoute::_(ContentHelperRoute::getCategoryRoute($category->id));
foreach ($rows as $row)
{
// strip html from feed item title
$title = $this->escape($row->title);
$title = html_entity_decode($title, ENT_COMPAT, 'UTF-8');
// Compute the article slug
$row->slug = $row->alias ? ($row->id . ':' . $row->alias) : $row->id;
// url link to article
$link = JRoute::_(ContentHelperRoute::getArticleRoute($row->slug, $row->catid));
// strip html from feed item description text
// TODO: Only pull fulltext if necessary (actually, just get the necessary fields).
$description = ($params->get('feed_summary', 0) ? $row->introtext/*.$row->fulltext*/ : $row->introtext);
$author = $row->created_by_alias ? $row->created_by_alias : $row->author;
@$date = ($row->created ? date('r', strtotime($row->created)) : '');
// load individual item creator class
$item = new JFeedItem();
$item->title = $title;
$item->link = $link;
$item->description = $description;
$item->date = $date;
$item->category = $row->category_title;
$item->author = $author;
if ($feedEmail == 'site') {
$item->authorEmail = $siteEmail;
}
else {
$item->authorEmail = $row->author_email;
}
// loads item info into rss array
$doc->addItem($item);
}
}
}
No other release has this exact content. See every version of this file.