1
|
|
|
<?php |
2
|
|
|
/** |
3
|
|
|
* |
4
|
|
|
* Advertisement management. An extension for the phpBB Forum Software package. |
5
|
|
|
* |
6
|
|
|
* @copyright (c) 2017 phpBB Limited <https://www.phpbb.com> |
7
|
|
|
* @license GNU General Public License, version 2 (GPL-2.0) |
8
|
|
|
* |
9
|
|
|
*/ |
10
|
|
|
|
11
|
|
|
namespace phpbb\ads\location\type; |
12
|
|
|
|
13
|
|
|
class pop_up extends base |
14
|
|
|
{ |
15
|
|
|
/** @var \phpbb\request\request */ |
|
|
|
|
16
|
|
|
protected $request; |
17
|
|
|
/** @var \phpbb\config\config */ |
|
|
|
|
18
|
|
|
protected $config; |
19
|
|
|
/** @var \phpbb\template\template */ |
|
|
|
|
20
|
|
|
protected $template; |
21
|
|
|
|
22
|
|
|
/** |
23
|
|
|
* pop_up location constructor. |
24
|
|
|
* |
25
|
|
|
* @param \phpbb\user $user User object |
26
|
|
|
* @param \phpbb\language\language $language Language object |
27
|
|
|
* @param \phpbb\request\request $request Request object |
28
|
|
|
* @param \phpbb\config\config $config Config object |
29
|
|
|
* @param \phpbb\template\template $template Template object |
30
|
|
|
*/ |
31
|
26 |
|
public function __construct(\phpbb\user $user, \phpbb\language\language $language, \phpbb\request\request $request, \phpbb\config\config $config, \phpbb\template\template $template) |
|
|
|
|
32
|
|
|
{ |
33
|
26 |
|
parent::__construct($user, $language); |
34
|
|
|
|
35
|
26 |
|
$this->request = $request; |
36
|
26 |
|
$this->config = $config; |
37
|
26 |
|
$this->template = $template; |
38
|
26 |
|
} |
39
|
|
|
|
40
|
|
|
/** |
41
|
|
|
* {@inheritDoc} |
42
|
|
|
*/ |
43
|
26 |
|
public function get_id() |
44
|
|
|
{ |
45
|
26 |
|
return 'pop_up'; |
46
|
|
|
} |
47
|
|
|
|
48
|
|
|
/** |
49
|
|
|
* {@inheritDoc} |
50
|
|
|
*/ |
51
|
26 |
|
public function get_category() |
52
|
|
|
{ |
53
|
26 |
|
return self::CAT_INTERACTIVE; |
54
|
|
|
} |
55
|
|
|
|
56
|
|
|
/** |
57
|
|
|
* {@inheritDoc} |
58
|
|
|
*/ |
59
|
8 |
|
public function will_display() |
60
|
|
|
{ |
61
|
8 |
|
if ($this->request->is_set($this->config['cookie_name'] . '_pop_up', \phpbb\request\request_interface::COOKIE)) |
|
|
|
|
62
|
8 |
|
{ |
63
|
1 |
|
return false; |
64
|
|
|
} |
65
|
|
|
|
66
|
7 |
|
$this->template->assign_vars(array( |
67
|
7 |
|
'POP_UP_COOKIE_NAME' => $this->config['cookie_name'] . '_pop_up', |
68
|
7 |
|
'POP_UP_COOKIE_EXPIRES' => gmdate('D, d M Y H:i:s T', strtotime('+1 day')), |
69
|
7 |
|
'POP_UP_COOKIE_PATH' => $this->config['cookie_path'], |
70
|
7 |
|
)); |
71
|
7 |
|
return true; |
72
|
|
|
} |
73
|
|
|
} |
74
|
|
|
|
The issue could also be caused by a filter entry in the build configuration. If the path has been excluded in your configuration, e.g.
excluded_paths: ["lib/*"]
, you can move it to the dependency path list as follows:For further information see https://scrutinizer-ci.com/docs/tools/php/php-scrutinizer/#list-dependency-paths