phpBB

Code Changes

File: phpbb/feed/controller/feed.php

  Unmodified   Added   Modified   Removed
Line 16Line 16
use phpbb\auth\auth;
use phpbb\config\config;
use phpbb\db\driver\driver_interface;

use phpbb\auth\auth;
use phpbb\config\config;
use phpbb\db\driver\driver_interface;

use \phpbb\event\dispatcher_interface;

use phpbb\event\dispatcher_interface;

use phpbb\exception\http_exception;
use phpbb\feed\feed_interface;
use phpbb\feed\exception\feed_unavailable_exception;

use phpbb\exception\http_exception;
use phpbb\feed\feed_interface;
use phpbb\feed\exception\feed_unavailable_exception;

Line 25Line 25
use phpbb\controller\helper as controller_helper;
use phpbb\symfony_request;
use phpbb\user;

use phpbb\controller\helper as controller_helper;
use phpbb\symfony_request;
use phpbb\user;

 
use phpbb\language\language;

use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;

use Symfony\Component\DependencyInjection\ContainerInterface;
use Symfony\Component\HttpFoundation\Response;
use Symfony\Component\Routing\Generator\UrlGeneratorInterface;

 
use Twig\Environment;


class feed
{
/**


class feed
{
/**

	 * @var \Twig_Environment

	 * @var Environment

	 */
protected $template;


	 */
protected $template;


Line 85Line 87
	 * @var string
*/
protected $php_ext;

	 * @var string
*/
protected $php_ext;

 

/**
* @var language
*/
protected $language;


/**
* Constructor
*


/**
* Constructor
*

	 * @param \Twig_Environment $twig

	 * @param Environment $twig

	 * @param symfony_request $request
* @param controller_helper $controller_helper
* @param config $config

	 * @param symfony_request $request
* @param controller_helper $controller_helper
* @param config $config

Line 99Line 106
	 * @param user $user
* @param auth $auth
* @param dispatcher_interface $phpbb_dispatcher

	 * @param user $user
* @param auth $auth
* @param dispatcher_interface $phpbb_dispatcher

 
	 * @param language $language

	 * @param string $php_ext
*/

	 * @param string $php_ext
*/

	public function __construct(\Twig_Environment $twig, symfony_request $request, controller_helper $controller_helper, config $config, driver_interface $db, ContainerInterface $container, feed_helper $feed_helper, user $user, auth $auth, dispatcher_interface $phpbb_dispatcher, $php_ext)

	public function __construct(Environment $twig, symfony_request $request, controller_helper $controller_helper, config $config, driver_interface $db, ContainerInterface $container, feed_helper $feed_helper, user $user, auth $auth, dispatcher_interface $phpbb_dispatcher, language $language, $php_ext)

	{
$this->request = $request;
$this->controller_helper = $controller_helper;

	{
$this->request = $request;
$this->controller_helper = $controller_helper;

Line 113Line 121
		$this->auth = $auth;
$this->php_ext = $php_ext;
$this->template = $twig;

		$this->auth = $auth;
$this->php_ext = $php_ext;
$this->template = $twig;

 
		$this->language = $language;

		$this->phpbb_dispatcher = $phpbb_dispatcher;
}


		$this->phpbb_dispatcher = $phpbb_dispatcher;
}


Line 295Line 304
	{
$feed_updated_time = 0;
$item_vars = array();

	{
$feed_updated_time = 0;
$item_vars = array();

 
		$this->language->add_lang('viewtopic');


$board_url = $this->feed_helper->get_board_url();



$board_url = $this->feed_helper->get_board_url();


Line 308Line 318
			 * Event to modify the feed row
*
* @event core.feed_modify_feed_row

			 * Event to modify the feed row
*
* @event core.feed_modify_feed_row

			 * @var	int		forum_id	Forum ID
* @var string mode Feeds mode (forums|topics|topics_new|topics_active|news)

			 * @var	feed_interface feed Feed instance


			 * @var	array	row			Array with feed data

			 * @var	array	row			Array with feed data

			 * @var	int		topic_id	Topic ID

 
			 *
* @since 3.1.10-RC1

			 *
* @since 3.1.10-RC1

 
			 * @changed 3.3.0 Replace forum_id, mode, topic_id with feed instance

			 */

			 */

			$vars = array('forum_id', 'mode', 'row', 'topic_id');

			$vars = array('feed', 'row');

			extract($this->phpbb_dispatcher->trigger_event('core.feed_modify_feed_row', compact($vars)));

// BBCode options to correctly disable urls, smilies, bbcode...

			extract($this->phpbb_dispatcher->trigger_event('core.feed_modify_feed_row', compact($vars)));

// BBCode options to correctly disable urls, smilies, bbcode...

Line 386Line 395
		));

$response = new Response($content);

		));

$response = new Response($content);

		$response->headers->set('Content-Type', 'application/atom+xml');
$response->setCharset('UTF-8');

		$response->headers->set('Content-Type', 'application/atom+xml; charset=UTF-8');


		$response->setLastModified(new \DateTime('@' . $feed_updated_time));

if (!empty($this->user->data['is_bot']))

		$response->setLastModified(new \DateTime('@' . $feed_updated_time));

if (!empty($this->user->data['is_bot']))