Line 16 | Line 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 25 | Line 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 85 | Line 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 99 | Line 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 113 | Line 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 295 | Line 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 385 | Line 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']))
|