CoreFiles by mySites.guru
view.feed.php67 lines, 1,754 bytes, from Joomla_2.5.6-Stable-Full_Package.zip
Raw History Compare with 2.5.5
md5
310b36f652ac9fd23d27a24ba0985d7e
sha1
e823e5ec79ffbded91db245cd66042004830b6fc
sha256
f46347e88e45abae57a6171e4d5550be1bc6570c68470d4496d7466f8a66ee9e
<?php
/**
 * @package		Joomla.Site
 * @subpackage	com_contact
 * @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 Contact component
 *
 * @package		Joomla.Site
 * @subpackage	com_contact
 * @since 1.5
 */
class ContactViewCategory extends JViewLegacy
{
	function display()
	{
		// Get some data from the models
		$category	= $this->get('Category');
		$rows		= $this->get('Items');

		// Check for errors.
		if (count($errors = $this->get('Errors'))) {
			JError::raiseError(500, implode("\n", $errors));
			return false;
		}

		$app = JFactory::getApplication();

		$doc	= JFactory::getDocument();
		$params = $app->getParams();

		$doc->link = JRoute::_(ContactHelperRoute::getCategoryRoute($category->id));

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

			// Compute the contact slug
			$row->slug = $row->alias ? ($row->id . ':' . $row->alias) : $row->id;

			// url link to article
			$link = JRoute::_(ContactHelperRoute::getContactRoute($row->slug, $row->catid));

			$description	= $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;

			// loads item info into rss array
			$doc->addItem($item);
		}
	}
}

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