1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* |
4
|
|
|
* @package sitemaker |
5
|
|
|
* @copyright (c) 2013 Daniel A. (blitze) |
6
|
|
|
* @license http://opensource.org/licenses/gpl-2.0.php GNU General Public License v2 |
7
|
|
|
* |
8
|
|
|
*/ |
9
|
|
|
|
10
|
|
|
namespace blitze\sitemaker\controller; |
11
|
|
|
|
12
|
|
|
class forum |
13
|
|
|
{ |
14
|
|
|
/** @var \phpbb\config\config */ |
15
|
|
|
protected $config; |
16
|
|
|
|
17
|
|
|
/** @var \phpbb\controller\helper */ |
18
|
|
|
protected $helper; |
19
|
|
|
|
20
|
|
|
/** @var \phpbb\template\template */ |
21
|
|
|
protected $template; |
22
|
|
|
|
23
|
|
|
/** @var \phpbb\language\language */ |
24
|
|
|
protected $translator; |
25
|
|
|
|
26
|
|
|
/** @var string phpBB root path */ |
27
|
|
|
protected $phpbb_root_path; |
28
|
|
|
|
29
|
|
|
/** @var string phpEx */ |
30
|
|
|
protected $php_ext; |
31
|
|
|
|
32
|
|
|
/** |
33
|
|
|
* Constructor |
34
|
|
|
* |
35
|
|
|
* @param \phpbb\config\config $config Config object |
36
|
|
|
* @param \phpbb\controller\helper $helper Controller Helper object |
37
|
|
|
* @param \phpbb\template\template $template Template object |
38
|
|
|
* @param \phpbb\language\language $translator Language object |
39
|
|
|
* @param string $root_path phpBB root path |
40
|
|
|
* @param string $php_ext phpEx |
41
|
|
|
*/ |
42
|
1 |
|
public function __construct(\phpbb\config\config $config, \phpbb\controller\helper $helper, \phpbb\template\template $template, \phpbb\language\language $translator, $root_path, $php_ext) |
43
|
|
|
{ |
44
|
1 |
|
$this->config = $config; |
45
|
1 |
|
$this->helper = $helper; |
46
|
1 |
|
$this->template = $template; |
47
|
1 |
|
$this->translator = $translator; |
48
|
1 |
|
$this->phpbb_root_path = $root_path; |
49
|
1 |
|
$this->php_ext = $php_ext; |
50
|
1 |
|
} |
51
|
|
|
|
52
|
|
|
/** |
53
|
|
|
* @return \Symfony\Component\HttpFoundation\Response |
54
|
|
|
*/ |
55
|
1 |
|
public function handle() |
56
|
|
|
{ |
57
|
|
|
// @codeCoverageIgnoreStart |
58
|
|
|
if (!function_exists('display_forums')) |
59
|
|
|
{ |
60
|
|
|
include($this->phpbb_root_path . 'includes/functions_display.' . $this->php_ext); |
61
|
|
|
} |
62
|
|
|
// @codeCoverageIgnoreEnd |
63
|
|
|
|
64
|
1 |
|
display_forums('', $this->config['load_moderators']); |
65
|
|
|
|
66
|
1 |
|
$this->template->assign_block_vars('navlinks', array( |
67
|
1 |
|
'FORUM_NAME' => $this->translator->lang('FORUM'), |
68
|
1 |
|
'U_VIEW_FORUM' => $this->helper->route('blitze_sitemaker_forum') |
69
|
1 |
|
)); |
70
|
|
|
|
71
|
1 |
|
return $this->helper->render('index_body.html', $this->translator->lang('FORUM_INDEX')); |
72
|
|
|
} |
73
|
|
|
} |
74
|
|
|
|