Completed
Pull Request — master (#4)
by Jakub
07:41
created
location/type/below_header.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
 class below_header extends base
14 14
 {
15 15
 	/**
16
-	* {@inheritDoc}
17
-	*/
16
+	 * {@inheritDoc}
17
+	 */
18 18
 	public function get_id()
19 19
 	{
20 20
 		return 'below_header';
Please login to merge, or discard this patch.
location/type/after_first_post.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,16 +13,16 @@
 block discarded – undo
13 13
 class after_first_post extends base
14 14
 {
15 15
 	/**
16
-	* {@inheritDoc}
17
-	*/
16
+	 * {@inheritDoc}
17
+	 */
18 18
 	public function get_id()
19 19
 	{
20 20
 		return 'after_first_post';
21 21
 	}
22 22
 
23 23
 	/**
24
-	* {@inheritDoc}
25
-	*/
24
+	 * {@inheritDoc}
25
+	 */
26 26
 	public function will_display()
27 27
 	{
28 28
 		return strpos($this->user->page['page_name'], 'viewtopic') !== false;
Please login to merge, or discard this patch.
location/type/after_profile.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,16 +13,16 @@
 block discarded – undo
13 13
 class after_profile extends base
14 14
 {
15 15
 	/**
16
-	* {@inheritDoc}
17
-	*/
16
+	 * {@inheritDoc}
17
+	 */
18 18
 	public function get_id()
19 19
 	{
20 20
 		return 'after_profile';
21 21
 	}
22 22
 
23 23
 	/**
24
-	* {@inheritDoc}
25
-	*/
24
+	 * {@inheritDoc}
25
+	 */
26 26
 	public function will_display()
27 27
 	{
28 28
 		return strpos($this->user->page['page_name'], 'memberlist') !== false && strpos($this->user->page['query_string'], 'viewprofile') !== false;
Please login to merge, or discard this patch.
location/type/before_profile.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,16 +13,16 @@
 block discarded – undo
13 13
 class before_profile extends base
14 14
 {
15 15
 	/**
16
-	* {@inheritDoc}
17
-	*/
16
+	 * {@inheritDoc}
17
+	 */
18 18
 	public function get_id()
19 19
 	{
20 20
 		return 'before_profile';
21 21
 	}
22 22
 
23 23
 	/**
24
-	* {@inheritDoc}
25
-	*/
24
+	 * {@inheritDoc}
25
+	 */
26 26
 	public function will_display()
27 27
 	{
28 28
 		return strpos($this->user->page['page_name'], 'memberlist') !== false && strpos($this->user->page['query_string'], 'viewprofile') !== false;
Please login to merge, or discard this patch.
location/type/after_not_first_post.php 1 patch
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,16 +13,16 @@
 block discarded – undo
13 13
 class after_not_first_post extends base
14 14
 {
15 15
 	/**
16
-	* {@inheritDoc}
17
-	*/
16
+	 * {@inheritDoc}
17
+	 */
18 18
 	public function get_id()
19 19
 	{
20 20
 		return 'after_not_first_post';
21 21
 	}
22 22
 
23 23
 	/**
24
-	* {@inheritDoc}
25
-	*/
24
+	 * {@inheritDoc}
25
+	 */
26 26
 	public function will_display()
27 27
 	{
28 28
 		return strpos($this->user->page['page_name'], 'viewtopic') !== false;
Please login to merge, or discard this patch.
location/type/below_footer.php 1 patch
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@
 block discarded – undo
13 13
 class below_footer extends base
14 14
 {
15 15
 	/**
16
-	* {@inheritDoc}
17
-	*/
16
+	 * {@inheritDoc}
17
+	 */
18 18
 	public function get_id()
19 19
 	{
20 20
 		return 'below_footer';
Please login to merge, or discard this patch.
event/main_listener.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -30,8 +30,8 @@  discard block
 block discarded – undo
30 30
 	protected $location_manager;
31 31
 
32 32
 	/**
33
-	* {@inheritdoc}
34
-	*/
33
+	 * {@inheritdoc}
34
+	 */
35 35
 	static public function getSubscribedEvents()
36 36
 	{
37 37
 		return array(
@@ -40,12 +40,12 @@  discard block
 block discarded – undo
40 40
 	}
41 41
 
42 42
 	/**
43
-	* Constructor
44
-	*
45
-	* @param \phpbb\template\template				$template			Template object
46
-	* @param \phpbb\admanagement\ad\manager			$manager			Advertisement manager object
47
-	* @param \phpbb\admanagement\location\manager	$location_manager	Template location manager object
48
-	*/
43
+	 * Constructor
44
+	 *
45
+	 * @param \phpbb\template\template				$template			Template object
46
+	 * @param \phpbb\admanagement\ad\manager			$manager			Advertisement manager object
47
+	 * @param \phpbb\admanagement\location\manager	$location_manager	Template location manager object
48
+	 */
49 49
 	public function __construct(\phpbb\template\template $template, \phpbb\admanagement\ad\manager $manager, \phpbb\admanagement\location\manager $location_manager)
50 50
 	{
51 51
 		$this->template = $template;
Please login to merge, or discard this patch.
controller/admin_controller.php 1 patch
Indentation   +85 added lines, -85 removed lines patch added patch discarded remove patch
@@ -45,16 +45,16 @@  discard block
 block discarded – undo
45 45
 	protected $errors = array();
46 46
 
47 47
 	/**
48
-	* Constructor
49
-	*
50
-	* @param \phpbb\template\template				$template			Template object
51
-	* @param \phpbb\user							$user				User object
52
-	* @param \phpbb\request\request					$request			Request object
53
-	* @param \phpbb\admanagement\ad\manager			$manager			Advertisement manager object
54
-	* @param \phpbb\admanagement\location\manager	$location_manager	Template location manager object
55
-	* @param string									$php_ext			PHP extension
56
-	* @param string									$ext_path			Path to this extension
57
-	*/
48
+	 * Constructor
49
+	 *
50
+	 * @param \phpbb\template\template				$template			Template object
51
+	 * @param \phpbb\user							$user				User object
52
+	 * @param \phpbb\request\request					$request			Request object
53
+	 * @param \phpbb\admanagement\ad\manager			$manager			Advertisement manager object
54
+	 * @param \phpbb\admanagement\location\manager	$location_manager	Template location manager object
55
+	 * @param string									$php_ext			PHP extension
56
+	 * @param string									$ext_path			Path to this extension
57
+	 */
58 58
 	public function __construct(\phpbb\template\template $template, \phpbb\user $user, \phpbb\request\request $request, \phpbb\admanagement\ad\manager $manager, \phpbb\admanagement\location\manager $location_manager, $php_ext, $ext_path)
59 59
 	{
60 60
 		$this->template = $template;
@@ -67,10 +67,10 @@  discard block
 block discarded – undo
67 67
 	}
68 68
 
69 69
 	/**
70
-	* Process user request
71
-	*
72
-	* @return void
73
-	*/
70
+	 * Process user request
71
+	 *
72
+	 * @return void
73
+	 */
74 74
 	public function main()
75 75
 	{
76 76
 		$this->user->add_lang_ext('phpbb/admanagement', 'acp');
@@ -87,31 +87,31 @@  discard block
 block discarded – undo
87 87
 	}
88 88
 
89 89
 	/**
90
-	* Set page url
91
-	*
92
-	* @param string $u_action Custom form action
93
-	* @return void
94
-	*/
90
+	 * Set page url
91
+	 *
92
+	 * @param string $u_action Custom form action
93
+	 * @return void
94
+	 */
95 95
 	public function set_page_url($u_action)
96 96
 	{
97 97
 		$this->u_action = $u_action;
98 98
 	}
99 99
 
100 100
 	/**
101
-	* Get ACP page title for Ads module
102
-	*
103
-	* @return string	Language string for Ads ACP module
104
-	*/
101
+	 * Get ACP page title for Ads module
102
+	 *
103
+	 * @return string	Language string for Ads ACP module
104
+	 */
105 105
 	public function get_page_title()
106 106
 	{
107 107
 		return $this->user->lang('ACP_ADMANAGEMENT_TITLE');
108 108
 	}
109 109
 
110 110
 	/**
111
-	* Add an advertisement
112
-	*
113
-	* @return void
114
-	*/
111
+	 * Add an advertisement
112
+	 *
113
+	 * @return void
114
+	 */
115 115
 	public function action_add()
116 116
 	{
117 117
 		$preview = $this->request->is_set_post('preview');
@@ -148,10 +148,10 @@  discard block
 block discarded – undo
148 148
 	}
149 149
 
150 150
 	/**
151
-	* Edit an advertisement
152
-	*
153
-	* @return void
154
-	*/
151
+	 * Edit an advertisement
152
+	 *
153
+	 * @return void
154
+	 */
155 155
 	public function action_edit()
156 156
 	{
157 157
 		$ad_id = $this->request->variable('id', 0);
@@ -207,30 +207,30 @@  discard block
 block discarded – undo
207 207
 	}
208 208
 
209 209
 	/**
210
-	* Enable an advertisement
211
-	*
212
-	* @return void
213
-	*/
210
+	 * Enable an advertisement
211
+	 *
212
+	 * @return void
213
+	 */
214 214
 	public function action_enable()
215 215
 	{
216 216
 		$this->ad_enable(true);
217 217
 	}
218 218
 
219 219
 	/**
220
-	* Disable an advertisement
221
-	*
222
-	* @return void
223
-	*/
220
+	 * Disable an advertisement
221
+	 *
222
+	 * @return void
223
+	 */
224 224
 	public function action_disable()
225 225
 	{
226 226
 		$this->ad_enable(false);
227 227
 	}
228 228
 
229 229
 	/**
230
-	* Delete an advertisement
231
-	*
232
-	* @return void
233
-	*/
230
+	 * Delete an advertisement
231
+	 *
232
+	 * @return void
233
+	 */
234 234
 	public function action_delete()
235 235
 	{
236 236
 		$ad_id = $this->request->variable('id', 0);
@@ -264,10 +264,10 @@  discard block
 block discarded – undo
264 264
 	}
265 265
 
266 266
 	/**
267
-	* Display the ads
268
-	*
269
-	* @return void
270
-	*/
267
+	 * Display the ads
268
+	 *
269
+	 * @return void
270
+	 */
271 271
 	public function list_ads()
272 272
 	{
273 273
 		foreach ($this->manager->get_all_ads() as $row)
@@ -290,11 +290,11 @@  discard block
 block discarded – undo
290 290
 	}
291 291
 
292 292
 	/**
293
-	* Enable/disable an advertisement
294
-	*
295
-	* @param	bool	$enable	Enable or disable the advertisement?
296
-	* @return void
297
-	*/
293
+	 * Enable/disable an advertisement
294
+	 *
295
+	 * @param	bool	$enable	Enable or disable the advertisement?
296
+	 * @return void
297
+	 */
298 298
 	protected function ad_enable($enable)
299 299
 	{
300 300
 		$ad_id = $this->request->variable('id', 0);
@@ -325,10 +325,10 @@  discard block
 block discarded – undo
325 325
 	}
326 326
 
327 327
 	/**
328
-	* Get admin form data.
329
-	*
330
-	* @return	array	Form data
331
-	*/
328
+	 * Get admin form data.
329
+	 *
330
+	 * @return	array	Form data
331
+	 */
332 332
 	protected function get_form_data()
333 333
 	{
334 334
 		return array(
@@ -341,12 +341,12 @@  discard block
 block discarded – undo
341 341
 	}
342 342
 
343 343
 	/**
344
-	* Validate form data.
345
-	*
346
-	* @param	array	$data		The form data.
347
-	* @param	string	$form_name	The form name.
348
-	* @return void
349
-	*/
344
+	 * Validate form data.
345
+	 *
346
+	 * @param	array	$data		The form data.
347
+	 * @param	string	$form_name	The form name.
348
+	 * @return void
349
+	 */
350 350
 	protected function validate($data, $form_name)
351 351
 	{
352 352
 		if (!check_form_key($form_name))
@@ -365,11 +365,11 @@  discard block
 block discarded – undo
365 365
 	}
366 366
 
367 367
 	/**
368
-	* Assign form data to the template.
369
-	*
370
-	* @param	array	$data	The form data.
371
-	* @return void
372
-	*/
368
+	 * Assign form data to the template.
369
+	 *
370
+	 * @param	array	$data	The form data.
371
+	 * @return void
372
+	 */
373 373
 	protected function assign_form_data($data)
374 374
 	{
375 375
 		$this->template->assign_vars(array(
@@ -384,11 +384,11 @@  discard block
 block discarded – undo
384 384
 	}
385 385
 
386 386
 	/**
387
-	* Assign template locations data to the template.
388
-	*
389
-	* @param	mixed	$data	The form data or nothing.
390
-	* @return	void
391
-	*/
387
+	 * Assign template locations data to the template.
388
+	 *
389
+	 * @param	mixed	$data	The form data or nothing.
390
+	 * @return	void
391
+	 */
392 392
 	protected function assign_locations($data = false)
393 393
 	{
394 394
 		foreach ($this->location_manager->get_all_locations() as $location_id => $location_data)
@@ -403,31 +403,31 @@  discard block
 block discarded – undo
403 403
 	}
404 404
 
405 405
 	/**
406
-	* Prepare advertisement preview
407
-	*
408
-	* @param	string	$code	Ad code to preview
409
-	* @return	void
410
-	*/
406
+	 * Prepare advertisement preview
407
+	 *
408
+	 * @param	string	$code	Ad code to preview
409
+	 * @return	void
410
+	 */
411 411
 	protected function ad_preview($code)
412 412
 	{
413 413
 		$this->template->assign_var('PREVIEW', htmlspecialchars_decode($code));
414 414
 	}
415 415
 
416 416
 	/**
417
-	* Print success message.
418
-	*
419
-	* It takes arguments in the form of a language key, followed by language substitution values.
420
-	*/
417
+	 * Print success message.
418
+	 *
419
+	 * It takes arguments in the form of a language key, followed by language substitution values.
420
+	 */
421 421
 	protected function success()
422 422
 	{
423 423
 		trigger_error(call_user_func_array(array($this->user, 'lang'), func_get_args()) . adm_back_link($this->u_action));
424 424
 	}
425 425
 
426 426
 	/**
427
-	* Print error message.
428
-	*
429
-	* It takes arguments in the form of a language key, followed by language substitution values.
430
-	*/
427
+	 * Print error message.
428
+	 *
429
+	 * It takes arguments in the form of a language key, followed by language substitution values.
430
+	 */
431 431
 	protected function error()
432 432
 	{
433 433
 		trigger_error(call_user_func_array(array($this->user, 'lang'), func_get_args()) . adm_back_link($this->u_action), E_USER_WARNING);
Please login to merge, or discard this patch.
location/type/base.php 1 patch
Indentation   +13 added lines, -13 removed lines patch added patch discarded remove patch
@@ -16,40 +16,40 @@
 block discarded – undo
16 16
 abstract class base implements \phpbb\admanagement\location\type\type_interface
17 17
 {
18 18
 	/**
19
-	* User object
20
-	* @var \phpbb\user
21
-	*/
19
+	 * User object
20
+	 * @var \phpbb\user
21
+	 */
22 22
 	protected $user;
23 23
 
24 24
 	/**
25
-	* Construct an after_profile template location object
26
-	*
27
-	* @param	\phpbb\user	$user	User object
28
-	*/
25
+	 * Construct an after_profile template location object
26
+	 *
27
+	 * @param	\phpbb\user	$user	User object
28
+	 */
29 29
 	public function __construct(\phpbb\user $user)
30 30
 	{
31 31
 		$this->user = $user;
32 32
 	}
33 33
 
34 34
 	/**
35
-	* {@inheritDoc}
36
-	*/
35
+	 * {@inheritDoc}
36
+	 */
37 37
 	public function get_name()
38 38
 	{
39 39
 		return $this->user->lang('AD_' . strtoupper($this->get_id()));
40 40
 	}
41 41
 
42 42
 	/**
43
-	* {@inheritDoc}
44
-	*/
43
+	 * {@inheritDoc}
44
+	 */
45 45
 	public function get_desc()
46 46
 	{
47 47
 		return $this->user->lang('AD_' . strtoupper($this->get_id()) . '_DESC');
48 48
 	}
49 49
 
50 50
 	/**
51
-	* {@inheritDoc}
52
-	*/
51
+	 * {@inheritDoc}
52
+	 */
53 53
 	public function will_display()
54 54
 	{
55 55
 		return true;
Please login to merge, or discard this patch.