- md5
- bfb2aa805da8a7417a8da8dbf5b863c4
- sha1
- d7e2647599c436a2c205eddcf139d59c8799ddf0
- sha256
- fb9dc80c89bed91c843e2f30f8c7002a4667a6b07b6ec55d050988dcfd8659d8
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980
<?php
/**
* @package Joomla.Site
* @subpackage com_weblinks
*
* @copyright Copyright (C) 2005 - 2013 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
*
* @package Joomla.Site
* @subpackage com_weblinks
* @since 1.0
*/
class WeblinksViewCategory extends JViewLegacy
{
public function display($tpl = null)
{
$app = JFactory::getApplication();
$document = JFactory::getDocument();
$document->link = JRoute::_(WeblinksHelperRoute::getCategoryRoute($app->input->getInt('id')));
$app->input->set('limit', $app->getCfg('feed_limit'));
$params = $app->getParams();
$siteEmail = $app->getCfg('mailfrom');
$fromName = $app->getCfg('fromname');
$feedEmail = $app->getCfg('feed_email', 'author');
$document->editor = $fromName;
if ($feedEmail != "none")
{
$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->id, $item->catid));
// strip html from feed item description text
$description = $item->description;
$author = $item->created_by_alias ? $item->created_by_alias : $item->author;
$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 = $category->title;
$feeditem->author = $author;
// We don't have the author email so we have to use site in both cases.
if ($feedEmail == 'site')
{
$feeditem->authorEmail = $siteEmail;
}
elseif ($feedEmail === 'author')
{
$feeditem->authorEmail = $item->author_email;
}
// loads item info into rss array
$document->addItem($feeditem);
}
}
}
The same content is in 4 releases, Joomla 3.0.3 to 3.1.1. See them all, or every version of this file.