| Server IP : 54.36.91.62 / Your IP : 216.73.217.112 Web Server : Apache System : Linux webm013.cluster127.gra.hosting.ovh.net 5.15.206-ovh-vps-grsec-zfs-classid #1 SMP Fri May 15 02:41:25 UTC 2026 x86_64 User : coopiak ( 151928) PHP Version : 8.3.23 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/coopiak/dansnotreville-fr/nice/components/com_rsfeedback/views/feedbacks/ |
Upload File : |
<?php
/**
* @package RSFeedback!
* @copyright (C) 2010-2018 www.rsjoomla.com
* @license GPL, http://www.gnu.org/copyleft/gpl.html
*/
// no direct access
defined( '_JEXEC' ) or die( 'Restricted access' );
use Joomla\CMS\Document\Feed\FeedItem;
use Joomla\CMS\MVC\View\HtmlView;
use Joomla\CMS\Language\Text;
use Joomla\CMS\Router\Route;
use Joomla\CMS\Factory;
class RSFeedbackViewFeedbacks extends HtmlView
{
//Creates the Feedbacks Feed
public function display($tpl = null)
{
$app = Factory::getApplication();
$doc = Factory::getDocument();
$config = RSFeedbackHelper::getConfig();
if (!$config->enable_rss) {
$app->close(1);
}
// Get some data from the model
$this->items = $this->get('Items');
$this->state = $this->get('State');
$this->params = $app->getParams();
$cat_id = $app->input->get('cat_id', '', 'int');
if ($cat_id) {
$category = $this->get('FeedbackCategory');
$RSSFeedsTitle = $category->name;
} else
$RSSFeedsTitle = $this->params->get('page_title');
$doc->setTitle(htmlentities($RSSFeedsTitle,ENT_COMPAT,'UTF-8'));
if (!empty($this->items))
{
foreach ( $this->items as $row )
{
// strip html from feed item title
$title = $this->escape( $row->title );
$title = html_entity_decode( $title );
// strip html from feed item category
$category = $this->escape( $row->category_name );
$category = html_entity_decode( $category );
// feed item description text
$description = Text::_( 'Title' ).': '.$title.'<br />';
$description .= Text::_( 'Category' ).': '.$category.'<br />';
$description .= Text::_( 'Owner' ).': '.(empty($this->owner) ? Text::_('COM_RSFEEDBACK_USER_ANONYMOUS') : $this->owner).'<br />';
$description .= Text::_( 'Date' ).': '.RSFeedbackHelper::showDate( $row->created, $config->global_dateformat ).'<br />';
$description .= Text::_( 'Votes' ).': '.(empty($row->nr_votes) ? 0 : $row->nr_votes).'<br />';
$description .= Text::_( 'Status' ).': '.Text::_($row->status_name).'<br />';
$description .= Text::_( 'Description' ).': '.$row->text;
// load individual item creator class
$item = new FeedItem();
$item->title = $title;
$item->link = Route::_( RSFeedbackRoute::Feedback($row->id));
$item->description = $description;
$item->date = RSFeedbackHelper::showDate( $row->created, $config->global_dateformat );
$item->category = $category;
// loads item info into rss array
$doc->addItem( $item );
}
}
}
}