Completed
Pull Request — master (#2)
by Jakub
06:36
created
migrations/v10x/m1_initial_schema.php 1 patch
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -16,33 +16,33 @@  discard block
 block discarded – undo
16 16
 class m1_initial_schema extends \phpbb\db\migration\migration
17 17
 {
18 18
 	/**
19
-	* {@inheritDoc}
20
-	*/
19
+	 * {@inheritDoc}
20
+	 */
21 21
 	public function effectively_installed()
22 22
 	{
23 23
 		return $this->db_tools->sql_table_exists($this->table_prefix . 'ads');
24 24
 	}
25 25
 
26 26
 	/**
27
-	* {@inheritDoc}
28
-	*/
27
+	 * {@inheritDoc}
28
+	 */
29 29
 	static public function depends_on()
30 30
 	{
31 31
 		return array('\phpbb\db\migration\data\v310\gold');
32 32
 	}
33 33
 
34 34
 	/**
35
-	* Add the ads table schema to the database:
36
-	*	ads:
37
-	*		ad_id
38
-	*		ad_name
39
-	*		ad_note
40
-	*		ad_code
41
-	*		ad_enabled
42
-	*
43
-	* @return array Array of table schema
44
-	* @access public
45
-	*/
35
+	 * Add the ads table schema to the database:
36
+	 *	ads:
37
+	 *		ad_id
38
+	 *		ad_name
39
+	 *		ad_note
40
+	 *		ad_code
41
+	 *		ad_enabled
42
+	 *
43
+	 * @return array Array of table schema
44
+	 * @access public
45
+	 */
46 46
 	public function update_schema()
47 47
 	{
48 48
 		return array(
@@ -62,11 +62,11 @@  discard block
 block discarded – undo
62 62
 	}
63 63
 
64 64
 	/**
65
-	* Drop the ads table schema from the database
66
-	*
67
-	* @return array Array of table schema
68
-	* @access public
69
-	*/
65
+	 * Drop the ads table schema from the database
66
+	 *
67
+	 * @return array Array of table schema
68
+	 * @access public
69
+	 */
70 70
 	public function revert_schema()
71 71
 	{
72 72
 		return array(
Please login to merge, or discard this patch.
migrations/v10x/m2_acp_module.php 1 patch
Indentation   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@  discard block
 block discarded – undo
13 13
 class m2_acp_module extends \phpbb\db\migration\migration
14 14
 {
15 15
 	/**
16
-	* {@inheritDoc}
17
-	*/
16
+	 * {@inheritDoc}
17
+	 */
18 18
 	public function effectively_installed()
19 19
 	{
20 20
 		$sql = 'SELECT module_id
@@ -29,18 +29,18 @@  discard block
 block discarded – undo
29 29
 	}
30 30
 
31 31
 	/**
32
-	* {@inheritDoc}
33
-	*/
32
+	 * {@inheritDoc}
33
+	 */
34 34
 	static public function depends_on()
35 35
 	{
36 36
 		return array('\phpbb\admanagement\migrations\v10x\m1_initial_schema');
37 37
 	}
38 38
 
39 39
 	/**
40
-	* Add the ACP module
41
-	*
42
-	* @return array Array of data update instructions
43
-	*/
40
+	 * Add the ACP module
41
+	 *
42
+	 * @return array Array of data update instructions
43
+	 */
44 44
 	public function update_data()
45 45
 	{
46 46
 		return array(
Please login to merge, or discard this patch.
event/main_listener.php 1 patch
Indentation   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -33,8 +33,8 @@  discard block
 block discarded – undo
33 33
 	protected $ads_table;
34 34
 
35 35
 	/**
36
-	* {@inheritdoc}
37
-	*/
36
+	 * {@inheritdoc}
37
+	 */
38 38
 	static public function getSubscribedEvents()
39 39
 	{
40 40
 		return array(
@@ -43,13 +43,13 @@  discard block
 block discarded – undo
43 43
 	}
44 44
 
45 45
 	/**
46
-	* Constructor
47
-	*
48
-	* @param \phpbb\request\request				$request	Request object
49
-	* @param \phpbb\db\driver\driver_interface	$db			DB driver interface
50
-	* @param \phpbb\template\template			$template	Template object
51
-	* @param string								$ads_table	Ads table
52
-	*/
46
+	 * Constructor
47
+	 *
48
+	 * @param \phpbb\request\request				$request	Request object
49
+	 * @param \phpbb\db\driver\driver_interface	$db			DB driver interface
50
+	 * @param \phpbb\template\template			$template	Template object
51
+	 * @param string								$ads_table	Ads table
52
+	 */
53 53
 	public function __construct(\phpbb\request\request $request, \phpbb\db\driver\driver_interface $db, \phpbb\template\template $template, $ads_table)
54 54
 	{
55 55
 		$this->request = $request;
Please login to merge, or discard this patch.
controller/admin_controller.php 1 patch
Indentation   +79 added lines, -79 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\db\driver\driver_interface	$db					DB driver interface
51
-	* @param \phpbb\template\template			$template			Template object
52
-	* @param \phpbb\user						$user				User object
53
-	* @param \phpbb\request\request				$request			Request object
54
-	* @param string								$ads_table			Ads table
55
-	* @param string								$php_ext			PHP extension
56
-	* @param string								$ext_path			Path to this extension
57
-	*/
48
+	 * Constructor
49
+	 *
50
+	 * @param \phpbb\db\driver\driver_interface	$db					DB driver interface
51
+	 * @param \phpbb\template\template			$template			Template object
52
+	 * @param \phpbb\user						$user				User object
53
+	 * @param \phpbb\request\request				$request			Request object
54
+	 * @param string								$ads_table			Ads table
55
+	 * @param string								$php_ext			PHP extension
56
+	 * @param string								$ext_path			Path to this extension
57
+	 */
58 58
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\template\template $template, \phpbb\user $user, \phpbb\request\request $request, $ads_table, $php_ext, $ext_path)
59 59
 	{
60 60
 		$this->db = $db;
@@ -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
 		add_form_key('phpbb/admanagement/add');
@@ -143,10 +143,10 @@  discard block
 block discarded – undo
143 143
 	}
144 144
 
145 145
 	/**
146
-	* Edit an advertisement
147
-	*
148
-	* @return void
149
-	*/
146
+	 * Edit an advertisement
147
+	 *
148
+	 * @return void
149
+	 */
150 150
 	public function action_edit()
151 151
 	{
152 152
 		$ad_id = $this->request->variable('id', 0);
@@ -200,30 +200,30 @@  discard block
 block discarded – undo
200 200
 	}
201 201
 
202 202
 	/**
203
-	* Enable an advertisement
204
-	*
205
-	* @return void
206
-	*/
203
+	 * Enable an advertisement
204
+	 *
205
+	 * @return void
206
+	 */
207 207
 	public function action_enable()
208 208
 	{
209 209
 		$this->ad_enable(true);
210 210
 	}
211 211
 
212 212
 	/**
213
-	* Disable an advertisement
214
-	*
215
-	* @return void
216
-	*/
213
+	 * Disable an advertisement
214
+	 *
215
+	 * @return void
216
+	 */
217 217
 	public function action_disable()
218 218
 	{
219 219
 		$this->ad_enable(false);
220 220
 	}
221 221
 
222 222
 	/**
223
-	* Delete an advertisement
224
-	*
225
-	* @return void
226
-	*/
223
+	 * Delete an advertisement
224
+	 *
225
+	 * @return void
226
+	 */
227 227
 	public function action_delete()
228 228
 	{
229 229
 		$ad_id = $this->request->variable('id', 0);
@@ -258,10 +258,10 @@  discard block
 block discarded – undo
258 258
 	}
259 259
 
260 260
 	/**
261
-	* Display the ads
262
-	*
263
-	* @return void
264
-	*/
261
+	 * Display the ads
262
+	 *
263
+	 * @return void
264
+	 */
265 265
 	public function list_ads()
266 266
 	{
267 267
 		$sql = 'SELECT ad_id, ad_name, ad_enabled
@@ -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);
@@ -327,11 +327,11 @@  discard block
 block discarded – undo
327 327
 	}
328 328
 
329 329
 	/**
330
-	* Check the form key.
331
-	*
332
-	* @param	string	$form_name	The name of the form.
333
-	* @return void
334
-	*/
330
+	 * Check the form key.
331
+	 *
332
+	 * @param	string	$form_name	The name of the form.
333
+	 * @return void
334
+	 */
335 335
 	protected function check_form_key($form_name)
336 336
 	{
337 337
 		if (!check_form_key($form_name))
@@ -341,10 +341,10 @@  discard block
 block discarded – undo
341 341
 	}
342 342
 
343 343
 	/**
344
-	* Get admin form data.
345
-	*
346
-	* @return	array	Form data
347
-	*/
344
+	 * Get admin form data.
345
+	 *
346
+	 * @return	array	Form data
347
+	 */
348 348
 	protected function get_form_data()
349 349
 	{
350 350
 		return array(
@@ -356,11 +356,11 @@  discard block
 block discarded – undo
356 356
 	}
357 357
 
358 358
 	/**
359
-	* Validate form data.
360
-	*
361
-	* @param	array	$data	The form data.
362
-	* @return void
363
-	*/
359
+	 * Validate form data.
360
+	 *
361
+	 * @param	array	$data	The form data.
362
+	 * @return void
363
+	 */
364 364
 	protected function validate($data)
365 365
 	{
366 366
 		if ($data['ad_name'] === '')
@@ -374,11 +374,11 @@  discard block
 block discarded – undo
374 374
 	}
375 375
 
376 376
 	/**
377
-	* Assign form data to the template.
378
-	*
379
-	* @param	array	$data	The form data.
380
-	* @return void
381
-	*/
377
+	 * Assign form data to the template.
378
+	 *
379
+	 * @param	array	$data	The form data.
380
+	 * @return void
381
+	 */
382 382
 	protected function assign_form_data($data)
383 383
 	{
384 384
 		$this->template->assign_vars(array(
@@ -393,20 +393,20 @@  discard block
 block discarded – undo
393 393
 	}
394 394
 
395 395
 	/**
396
-	* Print success message.
397
-	*
398
-	* It takes arguments in the form of a language key, followed by language substitution values.
399
-	*/
396
+	 * Print success message.
397
+	 *
398
+	 * It takes arguments in the form of a language key, followed by language substitution values.
399
+	 */
400 400
 	protected function success()
401 401
 	{
402 402
 		trigger_error(call_user_func_array(array($this->user, 'lang'), func_get_args()) . adm_back_link($this->u_action));
403 403
 	}
404 404
 
405 405
 	/**
406
-	* Print error message.
407
-	*
408
-	* It takes arguments in the form of a language key, followed by language substitution values.
409
-	*/
406
+	 * Print error message.
407
+	 *
408
+	 * It takes arguments in the form of a language key, followed by language substitution values.
409
+	 */
410 410
 	protected function error()
411 411
 	{
412 412
 		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.