mirror of
https://github.com/phpbb/phpbb.git
synced 2025-03-14 04:30:29 +01:00
Merge branch '3.3.x'
This commit is contained in:
commit
e61dcc9590
@ -12,11 +12,13 @@ services:
|
||||
- '@user'
|
||||
- '@auth'
|
||||
- '@dispatcher'
|
||||
- '@language'
|
||||
- '%core.php_ext%'
|
||||
|
||||
feed.helper:
|
||||
class: phpbb\feed\helper
|
||||
arguments:
|
||||
- '@auth'
|
||||
- '@config'
|
||||
- '@service_container'
|
||||
- '@path_helper'
|
||||
|
@ -25,6 +25,7 @@ use phpbb\feed\helper as feed_helper;
|
||||
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;
|
||||
@ -87,6 +88,11 @@ class feed
|
||||
*/
|
||||
protected $php_ext;
|
||||
|
||||
/**
|
||||
* @var language
|
||||
*/
|
||||
protected $language;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
@ -100,9 +106,10 @@ class feed
|
||||
* @param user $user
|
||||
* @param auth $auth
|
||||
* @param dispatcher_interface $phpbb_dispatcher
|
||||
* @param language $language
|
||||
* @param string $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, $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;
|
||||
@ -114,6 +121,7 @@ class feed
|
||||
$this->auth = $auth;
|
||||
$this->php_ext = $php_ext;
|
||||
$this->template = $twig;
|
||||
$this->language = $language;
|
||||
$this->phpbb_dispatcher = $phpbb_dispatcher;
|
||||
}
|
||||
|
||||
@ -296,6 +304,7 @@ class feed
|
||||
{
|
||||
$feed_updated_time = 0;
|
||||
$item_vars = array();
|
||||
$this->language->add_lang('viewtopic');
|
||||
|
||||
$board_url = $this->feed_helper->get_board_url();
|
||||
|
||||
|
@ -17,6 +17,7 @@ use phpbb\config\config;
|
||||
use phpbb\path_helper;
|
||||
use phpbb\textformatter\s9e\renderer;
|
||||
use phpbb\user;
|
||||
use phpbb\auth\auth;
|
||||
use Symfony\Component\DependencyInjection\ContainerInterface;
|
||||
|
||||
/**
|
||||
@ -39,17 +40,22 @@ class helper
|
||||
/** @var user */
|
||||
protected $user;
|
||||
|
||||
/** @var auth */
|
||||
protected $auth;
|
||||
|
||||
/**
|
||||
* Constructor
|
||||
*
|
||||
* @param auth $auth Auth object
|
||||
* @param config $config Config object
|
||||
* @param ContainerInterface $container Service container object
|
||||
* @param path_helper $path_helper Path helper object
|
||||
* @param renderer $renderer TextFormatter renderer object
|
||||
* @param user $user User object
|
||||
*/
|
||||
public function __construct(config $config, ContainerInterface $container, path_helper $path_helper, renderer $renderer, user $user)
|
||||
public function __construct(auth $auth, config $config, ContainerInterface $container, path_helper $path_helper, renderer $renderer, user $user)
|
||||
{
|
||||
$this->auth = $auth;
|
||||
$this->config = $config;
|
||||
$this->container = $container;
|
||||
$this->path_helper = $path_helper;
|
||||
@ -120,6 +126,8 @@ class helper
|
||||
|
||||
$this->renderer->set_smilies_path($this->get_board_url() . '/' . $this->config['smilies_path']);
|
||||
|
||||
$this->renderer->configure_user($this->user, $this->config, $this->auth);
|
||||
|
||||
$content = generate_text_for_display($content, $uid, $bitfield, $options);
|
||||
|
||||
// Remove "Select all" link and mouse events
|
||||
|
@ -45,10 +45,10 @@ class phpbb_feed_attachments_base_test extends phpbb_database_test_case
|
||||
$container = new phpbb_mock_container_builder();
|
||||
$this->get_test_case_helpers()->set_s9e_services($container);
|
||||
$container->set('feed.quote_helper', new \phpbb\feed\quote_helper($user, $phpbb_root_path, 'php'));
|
||||
$feed_helper = new \phpbb\feed\helper($config, $container, $path_helper, $container->get('text_formatter.renderer'), $user);
|
||||
$db = $this->new_dbal();
|
||||
$cache = new \phpbb_mock_cache();
|
||||
$auth = new \phpbb\auth\auth();
|
||||
$feed_helper = new \phpbb\feed\helper($auth, $config, $container, $path_helper, $container->get('text_formatter.renderer'), $user);
|
||||
$content_visibility = new \phpbb\content_visibility(
|
||||
$auth,
|
||||
$config,
|
||||
|
Loading…
x
Reference in New Issue
Block a user