CoreFiles by mySites.guru
view.feed.php64 lines, 1,752 bytes, from Joomla_2.5.6-Stable-Full_Package.zip
Raw History Compare with 2.5.5
md5
7d266de360eb0de56200a1daa9ae5f61
sha1
23d011a1b8e5f65b65f0114bc97b44bae4740ada
sha256
d85f9309e7eb2c46f2e85d752cbc49b50a6dc242cb79b27f451cb5c6f5adcb41
<?php
/**
 * @package		Joomla.Site
 * @subpackage	com_weblinks
 * @copyright	Copyright (C) 2005 - 2012 Open Source Matters, Inc. All rights reserved.
 * @license		GNU General Public License version 2 or later; see LICENSE.txt
 */

defined('_JEXEC') or die;

/**
 * HTML View class for the WebLinks component
 *
 * @static
 * @package		Joomla.Site
 * @subpackage	com_weblinks
 * @since 1.0
 */
class WeblinksViewCategory extends JViewLegacy
{
	function display($tpl = null)
	{
		$app	= JFactory::getApplication();
		$document = JFactory::getDocument();

		$document->link = JRoute::_(WeblinksHelperRoute::getCategoryRoute(JRequest::getVar('id', null, '', 'int')));

		JRequest::setVar('limit', $app->getCfg('feed_limit'));
		$siteEmail = $app->getCfg('mailfrom');
		$fromName = $app->getCfg('fromname');
		$document->editor = $fromName;
		$document->editorEmail = $siteEmail;

		// Get some data from the model
		$items		= $this->get('Items');
		$category	= $this->get('Category');

		foreach ($items as $item)
		{
			// strip html from feed item title
			$title = $this->escape($item->title);
			$title = html_entity_decode($title, ENT_COMPAT, 'UTF-8');

			// url link to article
			$link = JRoute::_(WeblinksHelperRoute::getWeblinkRoute($item->slug, $item->catid));

			// strip html from feed item description text
			$description = $item->description;
			$date = ($item->date ? date('r', strtotime($item->date)) : '');

			// load individual item creator class
			$feeditem = new JFeedItem();
			$feeditem->title		= $title;
			$feeditem->link			= $link;
			$feeditem->description	= $description;
			$feeditem->date			= $date;
			$feeditem->category		= 'Weblinks';

			// loads item info into rss array
			$document->addItem($feeditem);
		}
	}
}
?>

No other release has this exact content. See every version of this file.