Your IP : 216.73.216.240
<?php
/**
* @package My RSS Reader
* @copyright Copyright (C) 2010 FalsinSoft. All rights reserved.
* @license GNU/GPL
* @website http://falsinsoft-joomla.blogspot.com
* @email falsinsoft@gmail.com
*
*/
defined('_JEXEC') or die();
jimport('joomla.application.component.view');
require_once(JPATH_BASE.DS.'components'.DS.'com_myrssreader'.DS.'js'.DS.'checker.php');
class MyRSSReaderViewCheck extends JView
{
function display($tpl = null)
{
$app = &JFactory::getApplication();
$model =& $this->getModel('RSS');
$params =& $app->getParams();
if($params->get('direct_check_link', 0) == 0)
{
$app->redirect('index.php');
return;
}
$security_code = trim(JRequest::getString('securitycode', ''));
if(strlen($security_code) == 0 || strcmp($params->get('direct_check_link_security_code', ''), $security_code) != 0)
{
$app->redirect('index.php');
return;
}
$rss_list = $model->getCompleteRSSList();
$max_feeds_per_rss = $params->get('max_feeds_per_rss', 10);
$max_error_retry = $params->get('max_error_retry', 3);
$check_time_limit = $params->get('direct_check_link_time_limit', 60);
$show_powered_by_link = $params->get('show_powered_by_link', 1);
$i = 0;
$check_results = array();
$check_start_time = time();
foreach($rss_list as $rss)
{
$checker = new CheckerEngine();
$check_results[$i]->title = $rss->title;
$check_results[$i]->result = $checker->CheckRSS($rss->id, $max_feeds_per_rss, $max_error_retry);
$checker->__destruct();
unset($checker);
if((time() - $check_start_time) >= $check_time_limit) break;
$i++;
}
$this->assignRef('check_results', $check_results);
$this->assignRef('show_powered_by_link', $show_powered_by_link);
parent::display($tpl);
}
}
?>