Completed
Branch 3.2.x (01dc0a)
by Erwan
03:51
created
ext.php 2 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -144,7 +144,7 @@
 block discarded – undo
144 144
 	* @copyright (c) 2014 phpBB Limited <https://www.phpbb.com>
145 145
 	* @license GNU General Public License, version 2 (GPL-2.0)
146 146
 	* @param string $step The step (enable, disable, purge)
147
-	* @param array $notification_types The notification type names
147
+	* @param string[] $notification_types The notification type names
148 148
 	* @return string Return notifications as temporary state
149 149
 	* @access protected
150 150
 	*/
Please login to merge, or discard this patch.
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -17,11 +17,11 @@  discard block
 block discarded – undo
17 17
 class ext extends \phpbb\extension\base
18 18
 {
19 19
 	/**
20
-	* Enable extension if requirements are met
21
-	*
22
-	* @return bool
23
-	* @aceess public
24
-	*/
20
+	 * Enable extension if requirements are met
21
+	 *
22
+	 * @return bool
23
+	 * @aceess public
24
+	 */
25 25
 	public function is_enableable()
26 26
 	{
27 27
 		$config = $this->container->get('config');
@@ -42,11 +42,11 @@  discard block
 block discarded – undo
42 42
 	}
43 43
 
44 44
 	/**
45
-	* Single enable step that installs any included migrations
46
-	*
47
-	* @param mixed $old_state State returned by previous call of this method
48
-	* @return mixed Returns false after last step, otherwise temporary state
49
-	*/
45
+	 * Single enable step that installs any included migrations
46
+	 *
47
+	 * @param mixed $old_state State returned by previous call of this method
48
+	 * @return mixed Returns false after last step, otherwise temporary state
49
+	 */
50 50
 	public function enable_step($old_state)
51 51
 	{
52 52
 		switch ($old_state)
@@ -74,11 +74,11 @@  discard block
 block discarded – undo
74 74
 	}
75 75
 
76 76
 	/**
77
-	* Single disable step that does nothing
78
-	*
79
-	* @param mixed $old_state State returned by previous call of this method
80
-	* @return mixed Returns false after last step, otherwise temporary state
81
-	*/
77
+	 * Single disable step that does nothing
78
+	 *
79
+	 * @param mixed $old_state State returned by previous call of this method
80
+	 * @return mixed Returns false after last step, otherwise temporary state
81
+	 */
82 82
 	public function disable_step($old_state)
83 83
 	{
84 84
 		switch ($old_state)
@@ -106,11 +106,11 @@  discard block
 block discarded – undo
106 106
 	}
107 107
 
108 108
 	/**
109
-	* Single purge step that reverts any included and installed migrations
110
-	*
111
-	* @param mixed $old_state State returned by previous call of this method
112
-	* @return mixed Returns false after last step, otherwise temporary state
113
-	*/
109
+	 * Single purge step that reverts any included and installed migrations
110
+	 *
111
+	 * @param mixed $old_state State returned by previous call of this method
112
+	 * @return mixed Returns false after last step, otherwise temporary state
113
+	 */
114 114
 	public function purge_step($old_state)
115 115
 	{
116 116
 		switch ($old_state)
@@ -138,16 +138,16 @@  discard block
 block discarded – undo
138 138
 	}
139 139
 
140 140
 	/**
141
-	* Notification handler to call notification enable/disable/purge steps
142
-	*
143
-	* @author VSEphpbb (Matt Friedman)
144
-	* @copyright (c) 2014 phpBB Limited <https://www.phpbb.com>
145
-	* @license GNU General Public License, version 2 (GPL-2.0)
146
-	* @param string $step The step (enable, disable, purge)
147
-	* @param array $notification_types The notification type names
148
-	* @return string Return notifications as temporary state
149
-	* @access protected
150
-	*/
141
+	 * Notification handler to call notification enable/disable/purge steps
142
+	 *
143
+	 * @author VSEphpbb (Matt Friedman)
144
+	 * @copyright (c) 2014 phpBB Limited <https://www.phpbb.com>
145
+	 * @license GNU General Public License, version 2 (GPL-2.0)
146
+	 * @param string $step The step (enable, disable, purge)
147
+	 * @param array $notification_types The notification type names
148
+	 * @return string Return notifications as temporary state
149
+	 * @access protected
150
+	 */
151 151
 	protected function notification_handler($step, $notification_types)
152 152
 	{
153 153
 		$phpbb_notifications = $this->container->get('notification_manager');
Please login to merge, or discard this patch.
acp/phpbbdirectory_info.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,11 +18,11 @@
 block discarded – undo
18 18
 			'filename'		=> '\ernadoo\phpbbdirectory\acp\phpbbdirectory_module',
19 19
 			'title'			=> 'ACP_DIRECTORY',
20 20
 			'modes'			=> array(
21
-				''				=> array('title' => 'ACP_DIRECTORY',			'auth'	=> 'ext_ernadoo/phpbbdirectory', 'cat' => array('')),
22
-				'main'			=> array('title' => 'ACP_DIRECTORY_MAIN',		'auth'	=> 'ext_ernadoo/phpbbdirectory', 'cat' => array('ACP_DIRECTORY')),
23
-				'settings'		=> array('title' => 'ACP_DIRECTORY_SETTINGS',	'auth'	=> 'ext_ernadoo/phpbbdirectory', 'cat' => array('ACP_DIRECTORY')),
24
-				'cat'			=> array('title' => 'ACP_DIRECTORY_CATS',		'auth'	=> 'ext_ernadoo/phpbbdirectory', 'cat' => array('ACP_DIRECTORY')),
25
-				'val'			=> array('title' => 'ACP_DIRECTORY_VAL',		'auth'	=> 'ext_ernadoo/phpbbdirectory', 'cat' => array('ACP_DIRECTORY')),
21
+				''				=> array('title' => 'ACP_DIRECTORY', 'auth'	=> 'ext_ernadoo/phpbbdirectory', 'cat' => array('')),
22
+				'main'			=> array('title' => 'ACP_DIRECTORY_MAIN', 'auth'	=> 'ext_ernadoo/phpbbdirectory', 'cat' => array('ACP_DIRECTORY')),
23
+				'settings'		=> array('title' => 'ACP_DIRECTORY_SETTINGS', 'auth'	=> 'ext_ernadoo/phpbbdirectory', 'cat' => array('ACP_DIRECTORY')),
24
+				'cat'			=> array('title' => 'ACP_DIRECTORY_CATS', 'auth'	=> 'ext_ernadoo/phpbbdirectory', 'cat' => array('ACP_DIRECTORY')),
25
+				'val'			=> array('title' => 'ACP_DIRECTORY_VAL', 'auth'	=> 'ext_ernadoo/phpbbdirectory', 'cat' => array('ACP_DIRECTORY')),
26 26
 			),
27 27
 		);
28 28
 	}
Please login to merge, or discard this patch.
acp/phpbbdirectory_module.php 1 patch
Indentation   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -15,10 +15,10 @@  discard block
 block discarded – undo
15 15
 	public $u_action;
16 16
 
17 17
 	/**
18
-	*
19
-	* @param int	$id
20
-	* @param string	$mode
21
-	*/
18
+	 *
19
+	 * @param int	$id
20
+	 * @param string	$mode
21
+	 */
22 22
 	public function main($id, $mode)
23 23
 	{
24 24
 		global $request, $phpbb_container;
@@ -183,11 +183,11 @@  discard block
 block discarded – undo
183 183
 	}
184 184
 
185 185
 	/**
186
-	* Display thumb services available
187
-	*
188
-	* @param 	string	$url_selected
189
-	* @return 	string
190
-	*/
186
+	 * Display thumb services available
187
+	 *
188
+	 * @param 	string	$url_selected
189
+	 * @return 	string
190
+	 */
191 191
 	public function get_thumb_service_list($url_selected)
192 192
 	{
193 193
 		$thumbshot = array(
@@ -207,11 +207,11 @@  discard block
 block discarded – undo
207 207
 	}
208 208
 
209 209
 	/**
210
-	* Display order drop-down list
211
-	*
212
-	* @param	string	$order_selected
213
-	* @return	string
214
-	*/
210
+	 * Display order drop-down list
211
+	 *
212
+	 * @param	string	$order_selected
213
+	 * @return	string
214
+	 */
215 215
 	public function get_order_list($order_selected)
216 216
 	{
217 217
 		global $user;
Please login to merge, or discard this patch.
controller/acp/cat.php 2 patches
Indentation   +105 added lines, -105 removed lines patch added patch discarded remove patch
@@ -70,20 +70,20 @@  discard block
 block discarded – undo
70 70
 	private $update;
71 71
 
72 72
 	/**
73
-	* Constructor
74
-	*
75
-	* @param \phpbb\cache\service								$cache				Cache object
76
-	* @param \phpbb\db\driver\driver_interface 					$db					Database object
77
-	* @param \phpbb\controller\helper							$helper				Helper object
78
-	* @param \phpbb\language\language							$language			Language object
79
-	* @param \phpbb\log\log										$log				Log object
80
-	* @param \phpbb\request\request								$request			Request object
81
-	* @param \phpbb\template\template							$template			Template object
82
-	* @param \phpbb\user										$user				User object
83
-	* @param \ernadoo\phpbbdirectory\core\categorie				$categorie			PhpBB Directory extension categorie object
84
-	* @param \ernadoo\phpbbdirectory\core\helper				$dir_helper			PhpBB Directory extension helper object
85
-	* @param \ernadoo\phpbbdirectory\core\nestedset_category	$nestedset_category	PhpBB Directory extension nestedset object
86
-	*/
73
+	 * Constructor
74
+	 *
75
+	 * @param \phpbb\cache\service								$cache				Cache object
76
+	 * @param \phpbb\db\driver\driver_interface 					$db					Database object
77
+	 * @param \phpbb\controller\helper							$helper				Helper object
78
+	 * @param \phpbb\language\language							$language			Language object
79
+	 * @param \phpbb\log\log										$log				Log object
80
+	 * @param \phpbb\request\request								$request			Request object
81
+	 * @param \phpbb\template\template							$template			Template object
82
+	 * @param \phpbb\user										$user				User object
83
+	 * @param \ernadoo\phpbbdirectory\core\categorie				$categorie			PhpBB Directory extension categorie object
84
+	 * @param \ernadoo\phpbbdirectory\core\helper				$dir_helper			PhpBB Directory extension helper object
85
+	 * @param \ernadoo\phpbbdirectory\core\nestedset_category	$nestedset_category	PhpBB Directory extension nestedset object
86
+	 */
87 87
 	public function __construct(\phpbb\cache\service $cache, \phpbb\db\driver\driver_interface $db, \phpbb\controller\helper $helper, \phpbb\language\language $language, \phpbb\log\log $log, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user, \ernadoo\phpbbdirectory\core\categorie $categorie, \ernadoo\phpbbdirectory\core\helper $dir_helper, \ernadoo\phpbbdirectory\core\nestedset_category $nestedset_category)
88 88
 	{
89 89
 		$this->cache				= $cache;
@@ -108,10 +108,10 @@  discard block
 block discarded – undo
108 108
 	}
109 109
 
110 110
 	/**
111
-	* Initialize defaults data for add page
112
-	*
113
-	* @return null
114
-	*/
111
+	 * Initialize defaults data for add page
112
+	 *
113
+	 * @return null
114
+	 */
115 115
 	public function action_add()
116 116
 	{
117 117
 		$this->cat_id = $this->parent_id;
@@ -145,10 +145,10 @@  discard block
 block discarded – undo
145 145
 	}
146 146
 
147 147
 	/**
148
-	* Display deleting page
149
-	*
150
-	* @return null
151
-	*/
148
+	 * Display deleting page
149
+	 *
150
+	 * @return null
151
+	 */
152 152
 	public function action_delete()
153 153
 	{
154 154
 		if (!$this->cat_id)
@@ -199,10 +199,10 @@  discard block
 block discarded – undo
199 199
 	}
200 200
 
201 201
 	/**
202
-	* Initialize data for edit page
203
-	*
204
-	* @return null
205
-	*/
202
+	 * Initialize data for edit page
203
+	 *
204
+	 * @return null
205
+	 */
206 206
 	public function action_edit()
207 207
 	{
208 208
 		$row = $this->_get_cat_info($this->cat_id);
@@ -229,10 +229,10 @@  discard block
 block discarded – undo
229 229
 	}
230 230
 
231 231
 	/**
232
-	* Move order categories
233
-	*
234
-	* @return null
235
-	*/
232
+	 * Move order categories
233
+	 *
234
+	 * @return null
235
+	 */
236 236
 	public function action_move()
237 237
 	{
238 238
 		if (!$this->cat_id)
@@ -275,10 +275,10 @@  discard block
 block discarded – undo
275 275
 	}
276 276
 
277 277
 	/**
278
-	* Display progress bar for syncinc categories
279
-	*
280
-	* @return null
281
-	*/
278
+	 * Display progress bar for syncinc categories
279
+	 *
280
+	 * @return null
281
+	 */
282 282
 	public function action_progress_bar()
283 283
 	{
284 284
 		$start = $this->request->variable('start', 0);
@@ -299,10 +299,10 @@  discard block
 block discarded – undo
299 299
 	}
300 300
 
301 301
 	/**
302
-	* Get link's ID interval for _sync_dir_links()
303
-	*
304
-	* @return null
305
-	*/
302
+	 * Get link's ID interval for _sync_dir_links()
303
+	 *
304
+	 * @return null
305
+	 */
306 306
 	public function action_sync()
307 307
 	{
308 308
 		if (!$this->cat_id)
@@ -386,10 +386,10 @@  discard block
 block discarded – undo
386 386
 	}
387 387
 
388 388
 	/**
389
-	* Sync category data
390
-	*
391
-	* @return null
392
-	*/
389
+	 * Sync category data
390
+	 *
391
+	 * @return null
392
+	 */
393 393
 	public function action_sync_cat()
394 394
 	{
395 395
 		$sql = 'SELECT cat_name
@@ -413,10 +413,10 @@  discard block
 block discarded – undo
413 413
 	}
414 414
 
415 415
 	/**
416
-	* Display categories page
417
-	*
418
-	* @return null
419
-	*/
416
+	 * Display categories page
417
+	 *
418
+	 * @return null
419
+	 */
420 420
 	public function display_cats()
421 421
 	{
422 422
 		// Default management page
@@ -511,22 +511,22 @@  discard block
 block discarded – undo
511 511
 	}
512 512
 
513 513
 	/**
514
-	* Set page url
515
-	*
516
-	* @param	string $u_action Custom form action
517
-	* @return	null
518
-	* @access	public
519
-	*/
514
+	 * Set page url
515
+	 *
516
+	 * @param	string $u_action Custom form action
517
+	 * @return	null
518
+	 * @access	public
519
+	 */
520 520
 	public function set_page_url($u_action)
521 521
 	{
522 522
 		$this->u_action = $u_action;
523 523
 	}
524 524
 
525 525
 	/**
526
-	* Update cat table
527
-	*
528
-	* @return null
529
-	*/
526
+	 * Update cat table
527
+	 *
528
+	 * @return null
529
+	 */
530 530
 	public function update()
531 531
 	{
532 532
 		if (!check_form_key($this->form_key))
@@ -620,11 +620,11 @@  discard block
 block discarded – undo
620 620
 	}
621 621
 
622 622
 	/**
623
-	* Display form
624
-	*
625
-	* @param	string $parents_list	Drop-down list
626
-	* @return	null
627
-	*/
623
+	 * Display form
624
+	 *
625
+	 * @param	string $parents_list	Drop-down list
626
+	 * @return	null
627
+	 */
628 628
 	private function _display_cat_form($parents_list)
629 629
 	{
630 630
 		$dir_cat_desc_data = array(
@@ -694,11 +694,11 @@  discard block
 block discarded – undo
694 694
 	}
695 695
 
696 696
 	/**
697
-	* Get category details
698
-	*
699
-	* @param	int		$cat_id	The category ID
700
-	* @return 	array
701
-	*/
697
+	 * Get category details
698
+	 *
699
+	 * @param	int		$cat_id	The category ID
700
+	 * @return 	array
701
+	 */
702 702
 	private function _get_cat_info($cat_id)
703 703
 	{
704 704
 		$sql = 'SELECT cat_id, parent_id, right_id, left_id, cat_desc, cat_desc_uid, cat_desc_options, cat_icon, cat_name, display_subcat_list, cat_allow_comments, cat_allow_votes, cat_must_describe, cat_count_all, cat_validate, cat_cron_freq, cat_cron_nb_check, cat_link_back, cat_cron_enable, cat_cron_next
@@ -717,10 +717,10 @@  discard block
 block discarded – undo
717 717
 	}
718 718
 
719 719
 	/**
720
-	* Update category data
721
-	*
722
-	* @return array
723
-	*/
720
+	 * Update category data
721
+	 *
722
+	 * @return array
723
+	 */
724 724
 	private function _update_cat_data()
725 725
 	{
726 726
 		if (!$this->cat_data['cat_name'])
@@ -814,14 +814,14 @@  discard block
 block discarded – undo
814 814
 	}
815 815
 
816 816
 	/**
817
-	* Remove complete category
818
-	*
819
-	* @param	string	$action_links	Action for categories links
820
-	* @param	string	$action_subcats	Action for sub-categories
821
-	* @param	int		$links_to_id	New category ID for links
822
-	* @param	int		$subcats_to_id	New category ID for sub-categories
823
-	* @return 	array
824
-	*/
817
+	 * Remove complete category
818
+	 *
819
+	 * @param	string	$action_links	Action for categories links
820
+	 * @param	string	$action_subcats	Action for sub-categories
821
+	 * @param	int		$links_to_id	New category ID for links
822
+	 * @param	int		$subcats_to_id	New category ID for sub-categories
823
+	 * @return 	array
824
+	 */
825 825
 	private function _delete_cat($action_links = 'delete', $action_subcats = 'delete', $links_to_id = 0, $subcats_to_id = 0)
826 826
 	{
827 827
 		$this->cat_data = $this->_get_cat_info($this->cat_id);
@@ -938,12 +938,12 @@  discard block
 block discarded – undo
938 938
 	}
939 939
 
940 940
 	/**
941
-	* Move category content from one to another forum
942
-	*
943
-	* @param	int	$from_id
944
-	* @param	int	$to_id
945
-	* @return	null
946
-	*/
941
+	 * Move category content from one to another forum
942
+	 *
943
+	 * @param	int	$from_id
944
+	 * @param	int	$to_id
945
+	 * @return	null
946
+	 */
947 947
 	private function _move_cat_content($from_id, $to_id)
948 948
 	{
949 949
 		$sql = 'UPDATE ' . DIR_LINK_TABLE . '
@@ -959,10 +959,10 @@  discard block
 block discarded – undo
959 959
 	}
960 960
 
961 961
 	/**
962
-	* Delete category content
963
-	*
964
-	* @return array
965
-	*/
962
+	 * Delete category content
963
+	 *
964
+	 * @return array
965
+	 */
966 966
 	private function _delete_cat_content()
967 967
 	{
968 968
 		$this->db->sql_transaction('begin');
@@ -1021,11 +1021,11 @@  discard block
 block discarded – undo
1021 1021
 	}
1022 1022
 
1023 1023
 	/**
1024
-	* Update links counter
1025
-	*
1026
-	* @param	int $cat_id	The category ID
1027
-	* @return	null
1028
-	*/
1024
+	 * Update links counter
1025
+	 *
1026
+	 * @param	int $cat_id	The category ID
1027
+	 * @return	null
1028
+	 */
1029 1029
 	private function _sync_dir_cat($cat_id)
1030 1030
 	{
1031 1031
 		$sql = 'SELECT COUNT(link_id) AS num_links
@@ -1043,12 +1043,12 @@  discard block
 block discarded – undo
1043 1043
 	}
1044 1044
 
1045 1045
 	/**
1046
-	* Update link data (note, vote, comment)
1047
-	*
1048
-	* @param	int	$start
1049
-	* @param	int	$stop
1050
-	* @return	null
1051
-	*/
1046
+	 * Update link data (note, vote, comment)
1047
+	 *
1048
+	 * @param	int	$start
1049
+	 * @param	int	$stop
1050
+	 * @return	null
1051
+	 */
1052 1052
 	private function _sync_dir_links($start, $stop)
1053 1053
 	{
1054 1054
 		$sql_ary = array(
@@ -1091,12 +1091,12 @@  discard block
 block discarded – undo
1091 1091
 	}
1092 1092
 
1093 1093
 	/**
1094
-	* Display icons drop-down list
1095
-	*
1096
-	* @param	string	$icons_path
1097
-	* @param	string	$img_selected
1098
-	* @return	string
1099
-	*/
1094
+	 * Display icons drop-down list
1095
+	 *
1096
+	 * @param	string	$icons_path
1097
+	 * @param	string	$img_selected
1098
+	 * @return	string
1099
+	 */
1100 1100
 	private function _get_dir_icon_list($icons_path, $img_selected)
1101 1101
 	{
1102 1102
 		$imglist = filelist($icons_path, '');
Please login to merge, or discard this patch.
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -86,24 +86,24 @@  discard block
 block discarded – undo
86 86
 	*/
87 87
 	public function __construct(\phpbb\cache\service $cache, \phpbb\db\driver\driver_interface $db, \phpbb\controller\helper $helper, \phpbb\language\language $language, \phpbb\log\log $log, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user, \ernadoo\phpbbdirectory\core\categorie $categorie, \ernadoo\phpbbdirectory\core\helper $dir_helper, \ernadoo\phpbbdirectory\core\nestedset_category $nestedset_category)
88 88
 	{
89
-		$this->cache				= $cache;
90
-		$this->db					= $db;
91
-		$this->helper				= $helper;
89
+		$this->cache = $cache;
90
+		$this->db = $db;
91
+		$this->helper = $helper;
92 92
 		$this->language				= $language;
93 93
 		$this->phpbb_log			= $log;
94
-		$this->request				= $request;
94
+		$this->request = $request;
95 95
 		$this->template				= $template;
96
-		$this->user					= $user;
96
+		$this->user = $user;
97 97
 		$this->categorie			= $categorie;
98
-		$this->dir_helper			= $dir_helper;
99
-		$this->nestedset_category	= $nestedset_category;
98
+		$this->dir_helper = $dir_helper;
99
+		$this->nestedset_category = $nestedset_category;
100 100
 
101 101
 		$this->form_key = 'acp_dir_cat';
102 102
 		add_form_key($this->form_key);
103 103
 
104 104
 		$this->action		= $this->request->variable('action', '');
105 105
 		$this->cat_id		= $request->variable('c', 0);
106
-		$this->parent_id	= $request->variable('parent_id', 0);
106
+		$this->parent_id = $request->variable('parent_id', 0);
107 107
 		$this->update		= ($this->request->is_set_post('update')) ? true : false;
108 108
 	}
109 109
 
@@ -538,10 +538,10 @@  discard block
 block discarded – undo
538 538
 		switch ($this->action)
539 539
 		{
540 540
 			case 'delete':
541
-				$action_subcats	= $this->request->variable('action_subcats', '');
542
-				$subcats_to_id	= $this->request->variable('subcats_to_id', 0);
543
-				$action_links	= $this->request->variable('action_links', '');
544
-				$links_to_id	= $this->request->variable('links_to_id', 0);
541
+				$action_subcats = $this->request->variable('action_subcats', '');
542
+				$subcats_to_id = $this->request->variable('subcats_to_id', 0);
543
+				$action_links = $this->request->variable('action_links', '');
544
+				$links_to_id = $this->request->variable('links_to_id', 0);
545 545
 
546 546
 				try
547 547
 				{
@@ -765,7 +765,7 @@  discard block
 block discarded – undo
765 765
 		{
766 766
 			if ($cat_data_sql['cat_cron_enable'])
767 767
 			{
768
-				$cat_data_sql['cat_cron_next'] = time() + $cat_data_sql['cat_cron_freq']*86400;
768
+				$cat_data_sql['cat_cron_next'] = time() + $cat_data_sql['cat_cron_freq'] * 86400;
769 769
 			}
770 770
 
771 771
 			$this->cat_data = $this->nestedset_category->insert($cat_data_sql);
@@ -788,7 +788,7 @@  discard block
 block discarded – undo
788 788
 
789 789
 			if ($cat_data_sql['cat_cron_enable'] && ($row['cat_cron_freq'] != $cat_data_sql['cat_cron_freq'] || !$row['cat_cron_enable']))
790 790
 			{
791
-				$cat_data_sql['cat_cron_next'] = time() + $cat_data_sql['cat_cron_freq']*86400;
791
+				$cat_data_sql['cat_cron_next'] = time() + $cat_data_sql['cat_cron_freq'] * 86400;
792 792
 			}
793 793
 
794 794
 			if ($row['cat_name'] != $cat_data_sql['cat_name'])
Please login to merge, or discard this patch.
controller/acp/main.php 2 patches
Indentation   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -31,14 +31,14 @@  discard block
 block discarded – undo
31 31
 	protected $u_action;
32 32
 
33 33
 	/**
34
-	* Constructor
35
-	*
36
-	* @param \phpbb\db\driver\driver_interface 		$db			Database object
37
-	* @param \phpbb\language\language				$language	Language object
38
-	* @param \phpbb\request\request					$request	Request object
39
-	* @param \phpbb\template\template				$template	Template object
40
-	* @param \ernadoo\phpbbdirectory\core\helper	$dir_helper	PhpBB Directory extension helper object
41
-	*/
34
+	 * Constructor
35
+	 *
36
+	 * @param \phpbb\db\driver\driver_interface 		$db			Database object
37
+	 * @param \phpbb\language\language				$language	Language object
38
+	 * @param \phpbb\request\request					$request	Request object
39
+	 * @param \phpbb\template\template				$template	Template object
40
+	 * @param \ernadoo\phpbbdirectory\core\helper	$dir_helper	PhpBB Directory extension helper object
41
+	 */
42 42
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\language\language $language, \phpbb\request\request $request, \phpbb\template\template $template, \ernadoo\phpbbdirectory\core\helper $dir_helper)
43 43
 	{
44 44
 		$this->db			= $db;
@@ -49,11 +49,11 @@  discard block
 block discarded – undo
49 49
 	}
50 50
 
51 51
 	/**
52
-	* Display confirm box
53
-	*
54
-	* @param	string $action Requested action
55
-	* @return	null
56
-	*/
52
+	 * Display confirm box
53
+	 *
54
+	 * @param	string $action Requested action
55
+	 * @return	null
56
+	 */
57 57
 	public function display_confirm($action)
58 58
 	{
59 59
 		switch ($action)
@@ -91,10 +91,10 @@  discard block
 block discarded – undo
91 91
 	}
92 92
 
93 93
 	/**
94
-	* Display phpBB Directory statistics
95
-	*
96
-	* @return null
97
-	*/
94
+	 * Display phpBB Directory statistics
95
+	 *
96
+	 * @return null
97
+	 */
98 98
 	public function display_stats()
99 99
 	{
100 100
 		// Count number of categories
@@ -181,11 +181,11 @@  discard block
 block discarded – undo
181 181
 	}
182 182
 
183 183
 	/**
184
-	* Execute action requested
185
-	*
186
-	* @param	string $action Requested action
187
-	* @return	null
188
-	*/
184
+	 * Execute action requested
185
+	 *
186
+	 * @param	string $action Requested action
187
+	 * @return	null
188
+	 */
189 189
 	public function exec_action($action)
190 190
 	{
191 191
 		switch ($action)
@@ -260,23 +260,23 @@  discard block
 block discarded – undo
260 260
 	}
261 261
 
262 262
 	/**
263
-	* Set page url
264
-	*
265
-	* @param	string $u_action Custom form action
266
-	* @return	null
267
-	* @access	public
268
-	*/
263
+	 * Set page url
264
+	 *
265
+	 * @param	string $u_action Custom form action
266
+	 * @return	null
267
+	 * @access	public
268
+	 */
269 269
 	public function set_page_url($u_action)
270 270
 	{
271 271
 		$this->u_action = $u_action;
272 272
 	}
273 273
 
274 274
 	/**
275
-	* Get orphan banners
276
-	*
277
-	* @param	bool		$delete	True if we want to delete banners, else false
278
-	* @return	null|int	Number of orphan files, else null
279
-	*/
275
+	 * Get orphan banners
276
+	 *
277
+	 * @param	bool		$delete	True if we want to delete banners, else false
278
+	 * @return	null|int	Number of orphan files, else null
279
+	 */
280 280
 	private function _orphan_files($delete = false)
281 281
 	{
282 282
 		$banner_path = $this->dir_helper->get_banner_path();
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,11 +41,11 @@  discard block
 block discarded – undo
41 41
 	*/
42 42
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\language\language $language, \phpbb\request\request $request, \phpbb\template\template $template, \ernadoo\phpbbdirectory\core\helper $dir_helper)
43 43
 	{
44
-		$this->db			= $db;
44
+		$this->db = $db;
45 45
 		$this->language		= $language;
46 46
 		$this->template		= $template;
47
-		$this->request		= $request;
48
-		$this->dir_helper	= $dir_helper;
47
+		$this->request = $request;
48
+		$this->dir_helper = $dir_helper;
49 49
 	}
50 50
 
51 51
 	/**
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 			'U_ACTION'			=> $this->u_action,
171 171
 
172 172
 			'TOTAL_CATS'		=> $total_cats,
173
-			'TOTAL_LINKS'		=> $total_links-$waiting_links,
173
+			'TOTAL_LINKS'		=> $total_links - $waiting_links,
174 174
 			'WAITING_LINKS'		=> $waiting_links,
175 175
 			'TOTAL_COMMENTS'	=> $total_comments,
176 176
 			'TOTAL_VOTES'		=> $total_votes,
Please login to merge, or discard this patch.
controller/acp/settings.php 2 patches
Indentation   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -40,15 +40,15 @@  discard block
 block discarded – undo
40 40
 	private $display_vars;
41 41
 
42 42
 	/**
43
-	* Constructor
44
-	*
45
-	* @param \phpbb\config\config		$config		Config object
46
-	* @param \phpbb\language\language	$language	Language object
47
-	* @param \phpbb\log\log				$log		Log object
48
-	* @param \phpbb\request\request		$request	Request object
49
-	* @param \phpbb\template\template	$template	Template object
50
-	* @param \phpbb\user				$user		User object
51
-	*/
43
+	 * Constructor
44
+	 *
45
+	 * @param \phpbb\config\config		$config		Config object
46
+	 * @param \phpbb\language\language	$language	Language object
47
+	 * @param \phpbb\log\log				$log		Log object
48
+	 * @param \phpbb\request\request		$request	Request object
49
+	 * @param \phpbb\template\template	$template	Template object
50
+	 * @param \phpbb\user				$user		User object
51
+	 */
52 52
 	public function __construct(\phpbb\config\config $config, \phpbb\language\language $language, \phpbb\log\log $log, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user)
53 53
 	{
54 54
 		$this->config	= $config;
@@ -62,10 +62,10 @@  discard block
 block discarded – undo
62 62
 	}
63 63
 
64 64
 	/**
65
-	* Display config page
66
-	*
67
-	* @return null
68
-	*/
65
+	 * Display config page
66
+	 *
67
+	 * @return null
68
+	 */
69 69
 	public function display_config()
70 70
 	{
71 71
 		// Output relevant page
@@ -111,10 +111,10 @@  discard block
 block discarded – undo
111 111
 	}
112 112
 
113 113
 	/**
114
-	* Validate config vars and update config table if needed
115
-	*
116
-	* @return null
117
-	*/
114
+	 * Validate config vars and update config table if needed
115
+	 *
116
+	 * @return null
117
+	 */
118 118
 	public function process()
119 119
 	{
120 120
 		$submit	= ($this->request->is_set_post('submit')) ? true : false;
@@ -167,22 +167,22 @@  discard block
 block discarded – undo
167 167
 	}
168 168
 
169 169
 	/**
170
-	* Set page url
171
-	*
172
-	* @param	string $u_action Custom form action
173
-	* @return	null
174
-	* @access	public
175
-	*/
170
+	 * Set page url
171
+	 *
172
+	 * @param	string $u_action Custom form action
173
+	 * @return	null
174
+	 * @access	public
175
+	 */
176 176
 	public function set_page_url($u_action)
177 177
 	{
178 178
 		$this->u_action = $u_action;
179 179
 	}
180 180
 
181 181
 	/**
182
-	* Build config matrice
183
-	*
184
-	* @return null
185
-	*/
182
+	 * Build config matrice
183
+	 *
184
+	 * @return null
185
+	 */
186 186
 	private function _generate_config()
187 187
 	{
188 188
 		$this->display_vars = array(
Please login to merge, or discard this patch.
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -51,12 +51,12 @@  discard block
 block discarded – undo
51 51
 	*/
52 52
 	public function __construct(\phpbb\config\config $config, \phpbb\language\language $language, \phpbb\log\log $log, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user)
53 53
 	{
54
-		$this->config	= $config;
54
+		$this->config = $config;
55 55
 		$this->language	= $language;
56
-		$this->log		= $log;
56
+		$this->log = $log;
57 57
 		$this->template	= $template;
58
-		$this->user		= $user;
59
-		$this->request	= $request;
58
+		$this->user = $user;
59
+		$this->request = $request;
60 60
 
61 61
 		$this->_generate_config();
62 62
 	}
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	*/
118 118
 	public function process()
119 119
 	{
120
-		$submit	= ($this->request->is_set_post('submit')) ? true : false;
120
+		$submit = ($this->request->is_set_post('submit')) ? true : false;
121 121
 
122 122
 		$this->new_config = $this->config;
123 123
 		$cfg_array = ($this->request->is_set('config')) ? $this->request->variable('config', array('' => ''), true) : $this->new_config;
@@ -193,45 +193,45 @@  discard block
 block discarded – undo
193 193
 				'dir_banner_width'					=> '',
194 194
 				'dir_banner_height'					=> '',
195 195
 
196
-				'dir_mail'							=> array('lang' => 'DIR_MAIL_VALIDATION',	'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => false),
197
-				'dir_activ_checkurl'				=> array('lang' => 'DIR_ACTIVE_CHECK',		'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => true),
198
-				'dir_activ_flag'					=> array('lang' => 'DIR_ACTIV_FLAG',		'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => false),
199
-				'dir_activ_rss'						=> array('lang' => 'DIR_ACTIV_RSS',			'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => true),
200
-				'dir_activ_pagerank'				=> array('lang' => 'DIR_ACTIV_PAGERANK',	'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => true),
201
-				'dir_show'							=> array('lang' => 'DIR_SHOW',				'validate' => 'int:1', 	'type' => 'text:3:3',		'explain' => false),
202
-				'dir_length_describe'				=> array('lang' => 'DIR_MAX_DESC',			'validate' => 'int:1', 	'type' => 'text:3:3',		'explain' => false),
203
-				'dir_new_time'						=> array('lang' => 'DIR_NEW_TIME',			'validate' => 'int', 	'type' => 'text:3:3',		'explain' => true),
204
-				'dir_default_order'					=> array('lang' => 'DIR_DEFAULT_ORDER',		'validate' => 'string', 'type' => 'select',			'explain' => true, 'method' => 'get_order_list', 'params' => array('{CONFIG_VALUE}')),
196
+				'dir_mail'							=> array('lang' => 'DIR_MAIL_VALIDATION', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
197
+				'dir_activ_checkurl'				=> array('lang' => 'DIR_ACTIVE_CHECK', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
198
+				'dir_activ_flag'					=> array('lang' => 'DIR_ACTIV_FLAG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
199
+				'dir_activ_rss'						=> array('lang' => 'DIR_ACTIV_RSS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
200
+				'dir_activ_pagerank'				=> array('lang' => 'DIR_ACTIV_PAGERANK', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
201
+				'dir_show'							=> array('lang' => 'DIR_SHOW', 'validate' => 'int:1', 'type' => 'text:3:3', 'explain' => false),
202
+				'dir_length_describe'				=> array('lang' => 'DIR_MAX_DESC', 'validate' => 'int:1', 'type' => 'text:3:3', 'explain' => false),
203
+				'dir_new_time'						=> array('lang' => 'DIR_NEW_TIME', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
204
+				'dir_default_order'					=> array('lang' => 'DIR_DEFAULT_ORDER', 'validate' => 'string', 'type' => 'select', 'explain' => true, 'method' => 'get_order_list', 'params' => array('{CONFIG_VALUE}')),
205 205
 
206 206
 				'legend2'							=> 'DIR_RECENT_GUEST',
207
-				'dir_recent_block'					=> array('lang' => 'DIR_RECENT_ENABLE',		'validate' => 'bool',		'type' => 'radio:yes_no',	'explain' => true),
208
-				'dir_recent_rows'					=> array('lang' => 'DIR_RECENT_ROWS',		'validate' => 'int:1',		'type' => 'text:3:3',		'explain' => false),
209
-				'dir_recent_columns'				=> array('lang' => 'DIR_RECENT_COLUMNS',	'validate' => 'int:1',		'type' => 'text:3:3',		'explain' => false),
210
-				'dir_recent_exclude'				=> array('lang' => 'DIR_RECENT_EXCLUDE',	'validate' => 'string',		'type' => 'text:6:99',			'explain' => true),
207
+				'dir_recent_block'					=> array('lang' => 'DIR_RECENT_ENABLE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
208
+				'dir_recent_rows'					=> array('lang' => 'DIR_RECENT_ROWS', 'validate' => 'int:1', 'type' => 'text:3:3', 'explain' => false),
209
+				'dir_recent_columns'				=> array('lang' => 'DIR_RECENT_COLUMNS', 'validate' => 'int:1', 'type' => 'text:3:3', 'explain' => false),
210
+				'dir_recent_exclude'				=> array('lang' => 'DIR_RECENT_EXCLUDE', 'validate' => 'string', 'type' => 'text:6:99', 'explain' => true),
211 211
 
212 212
 				'legend3'							=> 'DIR_ADD_GUEST',
213
-				'dir_visual_confirm'				=> array('lang' => 'DIR_VISUAL_CONFIRM',	'validate' => 'bool',		'type' => 'radio:yes_no',	'explain' => true),
214
-				'dir_visual_confirm_max_attempts'	=> array('lang' => 'DIR_MAX_ADD_ATTEMPTS',	'validate' => 'int:1:10',	'type' => 'text:3:3',		'explain' => true),
213
+				'dir_visual_confirm'				=> array('lang' => 'DIR_VISUAL_CONFIRM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
214
+				'dir_visual_confirm_max_attempts'	=> array('lang' => 'DIR_MAX_ADD_ATTEMPTS', 'validate' => 'int:1:10', 'type' => 'text:3:3', 'explain' => true),
215 215
 
216 216
 				'legend4'							=> 'DIR_THUMB_PARAM',
217
-				'dir_activ_thumb'					=> array('lang' => 'DIR_ACTIVE_THUMB',			'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => false),
218
-				'dir_activ_thumb_remote'			=> array('lang' => 'DIR_ACTIVE_THUMB_REMOTE',	'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => true),
219
-				'dir_thumb_service'					=> array('lang' => 'DIR_THUMB_SERVICE',			'validate' => 'string', 'type' => 'select',			'explain' => true, 'method' => 'get_thumb_service_list', 'params' => array('{CONFIG_VALUE}')),
220
-				'dir_thumb_service_reverse'			=> array('lang' => 'DIR_THUMB_SERVICE_REVERSE',	'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => true),
217
+				'dir_activ_thumb'					=> array('lang' => 'DIR_ACTIVE_THUMB', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
218
+				'dir_activ_thumb_remote'			=> array('lang' => 'DIR_ACTIVE_THUMB_REMOTE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
219
+				'dir_thumb_service'					=> array('lang' => 'DIR_THUMB_SERVICE', 'validate' => 'string', 'type' => 'select', 'explain' => true, 'method' => 'get_thumb_service_list', 'params' => array('{CONFIG_VALUE}')),
220
+				'dir_thumb_service_reverse'			=> array('lang' => 'DIR_THUMB_SERVICE_REVERSE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
221 221
 
222 222
 				'legend5'							=> 'DIR_COMM_PARAM',
223
-				'dir_allow_bbcode'					=> array('lang' => 'DIR_ALLOW_BBCODE',		'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => false),
224
-				'dir_allow_flash'					=> array('lang' => 'DIR_ALLOW_FLASH',		'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => false),
225
-				'dir_allow_links'					=> array('lang' => 'DIR_ALLOW_LINKS',		'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => false),
226
-				'dir_allow_smilies'					=> array('lang' => 'DIR_ALLOW_SMILIES',		'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => false),
227
-				'dir_length_comments'				=> array('lang' => 'DIR_LENGTH_COMMENTS',	'validate' => 'int:2',	'type' => 'text:3:3',		'explain' => true),
228
-				'dir_comments_per_page'				=> array('lang' => 'DIR_COMM_PER_PAGE',		'validate' => 'int:1',	'type' => 'text:3:3',		'explain' => false),
223
+				'dir_allow_bbcode'					=> array('lang' => 'DIR_ALLOW_BBCODE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
224
+				'dir_allow_flash'					=> array('lang' => 'DIR_ALLOW_FLASH', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
225
+				'dir_allow_links'					=> array('lang' => 'DIR_ALLOW_LINKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
226
+				'dir_allow_smilies'					=> array('lang' => 'DIR_ALLOW_SMILIES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
227
+				'dir_length_comments'				=> array('lang' => 'DIR_LENGTH_COMMENTS', 'validate' => 'int:2', 'type' => 'text:3:3', 'explain' => true),
228
+				'dir_comments_per_page'				=> array('lang' => 'DIR_COMM_PER_PAGE', 'validate' => 'int:1', 'type' => 'text:3:3', 'explain' => false),
229 229
 
230 230
 				'legend6'							=> 'DIR_BANN_PARAM',
231
-				'dir_activ_banner'					=> array('lang' => 'DIR_ACTIV_BANNER',		'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => false),
232
-				'dir_banner'						=> array('lang' => 'DIR_MAX_BANN',			'validate' => 'int',	'type' => 'dimension:0',	'explain' => true, 'append' => ' ' . $this->language->lang('PIXEL')),
233
-				'dir_banner_filesize'				=> array('lang' => 'DIR_MAX_SIZE',			'validate' => 'int:0',	'type' => 'number:0',		'explain' => true, 'append' => ' ' . $this->language->lang('BYTES')),
234
-				'dir_storage_banner'				=> array('lang' => 'DIR_STORAGE_BANNER',	'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => true),
231
+				'dir_activ_banner'					=> array('lang' => 'DIR_ACTIV_BANNER', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
232
+				'dir_banner'						=> array('lang' => 'DIR_MAX_BANN', 'validate' => 'int', 'type' => 'dimension:0', 'explain' => true, 'append' => ' ' . $this->language->lang('PIXEL')),
233
+				'dir_banner_filesize'				=> array('lang' => 'DIR_MAX_SIZE', 'validate' => 'int:0', 'type' => 'number:0', 'explain' => true, 'append' => ' ' . $this->language->lang('BYTES')),
234
+				'dir_storage_banner'				=> array('lang' => 'DIR_STORAGE_BANNER', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
235 235
 			)
236 236
 		);
237 237
 	}
Please login to merge, or discard this patch.
controller/acp/validation.php 2 patches
Indentation   +59 added lines, -59 removed lines patch added patch discarded remove patch
@@ -67,23 +67,23 @@  discard block
 block discarded – undo
67 67
 	private $links_data;
68 68
 
69 69
 	/**
70
-	* Constructor
71
-	*
72
-	* @param \phpbb\config\config								$config				Config object
73
-	* @param \phpbb\db\driver\driver_interface 					$db					Database object
74
-	* @param \phpbb\pagination									$pagination			Pagination object
75
-	* @param \phpbb\language\language							$language			Language object
76
-	* @param \phpbb\log\log										$log				Log object
77
-	* @param \phpbb\notification\manager						$notification		Notification object
78
-	* @param \phpbb\request\request								$request			Request object
79
-	* @param \phpbb\template\template							$template			Template object
80
-	* @param \phpbb\user										$user				User object
81
-	* @param \ernadoo\phpbbdirectory\core\categorie				$categorie			PhpBB Directory extension categorie object
82
-	* @param \ernadoo\phpbbdirectory\core\helper				$dir_helper			PhpBB Directory extension helper object
83
-	* @param \ernadoo\phpbbdirectory\core\link					$link				PhpBB Directory extension link object
84
-	* @param string												$root_path			phpBB root path
85
-	* @param string												$php_ext   			phpEx
86
-	*/
70
+	 * Constructor
71
+	 *
72
+	 * @param \phpbb\config\config								$config				Config object
73
+	 * @param \phpbb\db\driver\driver_interface 					$db					Database object
74
+	 * @param \phpbb\pagination									$pagination			Pagination object
75
+	 * @param \phpbb\language\language							$language			Language object
76
+	 * @param \phpbb\log\log										$log				Log object
77
+	 * @param \phpbb\notification\manager						$notification		Notification object
78
+	 * @param \phpbb\request\request								$request			Request object
79
+	 * @param \phpbb\template\template							$template			Template object
80
+	 * @param \phpbb\user										$user				User object
81
+	 * @param \ernadoo\phpbbdirectory\core\categorie				$categorie			PhpBB Directory extension categorie object
82
+	 * @param \ernadoo\phpbbdirectory\core\helper				$dir_helper			PhpBB Directory extension helper object
83
+	 * @param \ernadoo\phpbbdirectory\core\link					$link				PhpBB Directory extension link object
84
+	 * @param string												$root_path			phpBB root path
85
+	 * @param string												$php_ext   			phpEx
86
+	 */
87 87
 	public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\pagination $pagination, \phpbb\language\language $language, \phpbb\log\log $log, \phpbb\notification\manager $notification, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user, \ernadoo\phpbbdirectory\core\categorie $categorie, \ernadoo\phpbbdirectory\core\helper $dir_helper, \ernadoo\phpbbdirectory\core\link $link, $root_path, $php_ext)
88 88
 	{
89 89
 		$this->config		= $config;
@@ -105,11 +105,11 @@  discard block
 block discarded – undo
105 105
 	}
106 106
 
107 107
 	/**
108
-	* Display confirm box
109
-	*
110
-	* @param	array $mark Website selected for (dis)approval
111
-	* @return	null
112
-	*/
108
+	 * Display confirm box
109
+	 *
110
+	 * @param	array $mark Website selected for (dis)approval
111
+	 * @return	null
112
+	 */
113 113
 	public function display_confirm($mark)
114 114
 	{
115 115
 		$s_hidden_fields = array(
@@ -121,10 +121,10 @@  discard block
 block discarded – undo
121 121
 	}
122 122
 
123 123
 	/**
124
-	* Display website list for (dis)approval
125
-	*
126
-	* @return null
127
-	*/
124
+	 * Display website list for (dis)approval
125
+	 *
126
+	 * @return null
127
+	 */
128 128
 	public function display_websites()
129 129
 	{
130 130
 		global $phpbb_admin_path;
@@ -228,11 +228,11 @@  discard block
 block discarded – undo
228 228
 	}
229 229
 
230 230
 	/**
231
-	* Get link's information and call appropriate action
232
-	*
233
-	* @param	array $mark Website selected for (dis)approval
234
-	* @return	null
235
-	*/
231
+	 * Get link's information and call appropriate action
232
+	 *
233
+	 * @param	array $mark Website selected for (dis)approval
234
+	 * @return	null
235
+	 */
236 236
 	public function exec_action($mark)
237 237
 	{
238 238
 		$this->_get_infos_links($mark);
@@ -255,10 +255,10 @@  discard block
 block discarded – undo
255 255
 	}
256 256
 
257 257
 	/**
258
-	* Notify users which had submitted their websites
259
-	*
260
-	* @return null
261
-	*/
258
+	 * Notify users which had submitted their websites
259
+	 *
260
+	 * @return null
261
+	 */
262 262
 	public function notifiy_submiters()
263 263
 	{
264 264
 		if (!class_exists('messenger'))
@@ -302,22 +302,22 @@  discard block
 block discarded – undo
302 302
 	}
303 303
 
304 304
 	/**
305
-	* Set page url
306
-	*
307
-	* @param	string $u_action Custom form action
308
-	* @return	null
309
-	* @access	public
310
-	*/
305
+	 * Set page url
306
+	 *
307
+	 * @param	string $u_action Custom form action
308
+	 * @return	null
309
+	 * @access	public
310
+	 */
311 311
 	public function set_page_url($u_action)
312 312
 	{
313 313
 		$this->u_action = $u_action;
314 314
 	}
315 315
 
316 316
 	/**
317
-	* Approve action
318
-	*
319
-	* @return null
320
-	*/
317
+	 * Approve action
318
+	 *
319
+	 * @return null
320
+	 */
321 321
 	private function _action_approved()
322 322
 	{
323 323
 		foreach ($this->links_data as $row)
@@ -346,10 +346,10 @@  discard block
 block discarded – undo
346 346
 	}
347 347
 
348 348
 	/**
349
-	* Disapprove action
350
-	*
351
-	* @return null
352
-	*/
349
+	 * Disapprove action
350
+	 *
351
+	 * @return null
352
+	 */
353 353
 	private function _action_disapproved()
354 354
 	{
355 355
 		foreach ($this->links_data as $row)
@@ -370,11 +370,11 @@  discard block
 block discarded – undo
370 370
 	}
371 371
 
372 372
 	/**
373
-	* Get informations about links selected
374
-	*
375
-	* @param	$mark Website selected for (dis)approval
376
-	* @return	null
377
-	*/
373
+	 * Get informations about links selected
374
+	 *
375
+	 * @param	$mark Website selected for (dis)approval
376
+	 * @return	null
377
+	 */
378 378
 	private function _get_infos_links($mark)
379 379
 	{
380 380
 		$sql_array = array(
@@ -409,11 +409,11 @@  discard block
 block discarded – undo
409 409
 	}
410 410
 
411 411
 	/**
412
-	* Notify users which watch categories
413
-	*
414
-	* @param	$row Informations about website
415
-	* @return	null
416
-	*/
412
+	 * Notify users which watch categories
413
+	 *
414
+	 * @param	$row Informations about website
415
+	 * @return	null
416
+	 */
417 417
 	private function _notify_suscribers($row)
418 418
 	{
419 419
 		$notification_data = array(
Please login to merge, or discard this patch.
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -86,22 +86,22 @@  discard block
 block discarded – undo
86 86
 	*/
87 87
 	public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\pagination $pagination, \phpbb\language\language $language, \phpbb\log\log $log, \phpbb\notification\manager $notification, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user, \ernadoo\phpbbdirectory\core\categorie $categorie, \ernadoo\phpbbdirectory\core\helper $dir_helper, \ernadoo\phpbbdirectory\core\link $link, $root_path, $php_ext)
88 88
 	{
89
-		$this->config		= $config;
90
-		$this->db			= $db;
91
-		$this->pagination	= $pagination;
89
+		$this->config = $config;
90
+		$this->db = $db;
91
+		$this->pagination = $pagination;
92 92
 		$this->language		= $language;
93 93
 		$this->phpbb_log	= $log;
94
-		$this->notification	= $notification;
95
-		$this->request		= $request;
94
+		$this->notification = $notification;
95
+		$this->request = $request;
96 96
 		$this->template		= $template;
97 97
 		$this->user			= $user;
98 98
 		$this->categorie	= $categorie;
99
-		$this->dir_helper	= $dir_helper;
99
+		$this->dir_helper = $dir_helper;
100 100
 		$this->link			= $link;
101 101
 		$this->root_path	= $root_path;
102
-		$this->php_ext		= $php_ext;
102
+		$this->php_ext = $php_ext;
103 103
 
104
-		$this->action		= $this->request->variable('action', '');
104
+		$this->action = $this->request->variable('action', '');
105 105
 	}
106 106
 
107 107
 	/**
@@ -130,14 +130,14 @@  discard block
 block discarded – undo
130 130
 		global $phpbb_admin_path;
131 131
 
132 132
 		// Sort keys
133
-		$sort_days	= $this->request->variable('st', 0);
133
+		$sort_days = $this->request->variable('st', 0);
134 134
 		$sort_key	= $this->request->variable('sk', 't');
135 135
 		$sort_dir	= $this->request->variable('sd', 'd');
136 136
 
137 137
 		// Number of entries to display
138 138
 		$per_page = $this->request->variable('links_per_page', (int) $this->config['dir_show']);
139 139
 
140
-		$start	= $this->request->variable('start', 0);
140
+		$start = $this->request->variable('start', 0);
141 141
 
142 142
 		// Categorie ordering options
143 143
 		$limit_days		= array(0 => $this->language->lang('SEE_ALL'), 1 => $this->language->lang('1_DAY'), 7 => $this->language->lang('7_DAYS'), 14 => $this->language->lang('2_WEEKS'), 30 => $this->language->lang('1_MONTH'), 90 => $this->language->lang('3_MONTHS'), 180 => $this->language->lang('6_MONTHS'), 365 => $this->language->lang('1_YEAR'));
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 				'LINK_URL'			=> $row['link_url'],
202 202
 				'LINK_NAME'			=> $row['link_name'],
203 203
 				'LINK_DESC'			=> generate_text_for_display($row['link_description'], $row['link_uid'], $row['link_bitfield'], $row['link_flags']),
204
-				'L_DIR_USER_PROP'	=> $this->language->lang('DIR_USER_PROP', get_username_string('full', $row['link_user_id'], $username, $row['user_colour'], false, append_sid("{$phpbb_admin_path}index.$this->php_ext", 'i=users&amp;mode=overview')), '<select name=c'.$row['link_id'].'>'.$this->categorie->make_cat_select((int) $row['link_cat']).'</select>', $this->user->format_date($row['link_time'])),
204
+				'L_DIR_USER_PROP'	=> $this->language->lang('DIR_USER_PROP', get_username_string('full', $row['link_user_id'], $username, $row['user_colour'], false, append_sid("{$phpbb_admin_path}index.$this->php_ext", 'i=users&amp;mode=overview')), '<select name=c' . $row['link_id'] . '>' . $this->categorie->make_cat_select((int) $row['link_cat']) . '</select>', $this->user->format_date($row['link_time'])),
205 205
 				'BANNER'			=> $s_banner,
206 206
 				'LINK_ID'			=> $row['link_id'],
207 207
 
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
 			{
277 277
 				$username = $email = $row['link_guest_email'];
278 278
 
279
-				$messenger->template('@ernadoo_phpbbdirectory/directory_website_'.$this->action, $row['user_lang']);
279
+				$messenger->template('@ernadoo_phpbbdirectory/directory_website_' . $this->action, $row['user_lang']);
280 280
 				$messenger->to($email, $username);
281 281
 
282 282
 				$messenger->assign_vars(array(
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
 					'cat_id'			=> (int) $row['link_cat'],
297 297
 				);
298 298
 
299
-				$this->notification->add_notifications('ernadoo.phpbbdirectory.notification.type.directory_website_'.$this->action, $notification_data);
299
+				$this->notification->add_notifications('ernadoo.phpbbdirectory.notification.type.directory_website_' . $this->action, $notification_data);
300 300
 			}
301 301
 		}
302 302
 	}
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
 		foreach ($this->cat_data as $cat_id => $count)
340 340
 		{
341 341
 			$sql = 'UPDATE ' . DIR_CAT_TABLE . '
342
-							SET cat_links = cat_links + '.$count.'
342
+							SET cat_links = cat_links + '.$count . '
343 343
 							WHERE cat_id = ' . (int) $cat_id;
344 344
 			$this->db->sql_query($sql);
345 345
 		}
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
 
399 399
 		while ($row = $this->db->sql_fetchrow($result))
400 400
 		{
401
-			$row['link_cat'] = $this->request->variable('c'.$row['link_id'], (int) $row['cat_id']);
401
+			$row['link_cat'] = $this->request->variable('c' . $row['link_id'], (int) $row['cat_id']);
402 402
 
403 403
 			$this->links_data[] = $row;
404 404
 
Please login to merge, or discard this patch.
controller/categories.php 2 patches
Indentation   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -46,20 +46,20 @@  discard block
 block discarded – undo
46 46
 	protected $link;
47 47
 
48 48
 	/**
49
-	* Constructor
50
-	*
51
-	* @param \phpbb\db\driver\driver_interface					$db			Database object
52
-	* @param \phpbb\config\config								$config		Config object
53
-	* @param \phpbb\language\language							$language	Language object
54
-	* @param \phpbb\template\template							$template	Template object
55
-	* @param \phpbb\user										$user		User object
56
-	* @param \phpbb\controller\helper							$helper		Controller helper object
57
-	* @param \phpbb\request\request								$request	Request object
58
-	* @param \phpbb\auth\auth									$auth		Auth object
59
-	* @param \phpbb\pagination									$pagination	Pagination object
60
-	* @param \ernadoo\phpbbdirectory\core\categorie				$categorie	PhpBB Directory extension categorie object
61
-	* @param \ernadoo\phpbbdirectory\core\link					$link		PhpBB Directory extension link object
62
-	*/
49
+	 * Constructor
50
+	 *
51
+	 * @param \phpbb\db\driver\driver_interface					$db			Database object
52
+	 * @param \phpbb\config\config								$config		Config object
53
+	 * @param \phpbb\language\language							$language	Language object
54
+	 * @param \phpbb\template\template							$template	Template object
55
+	 * @param \phpbb\user										$user		User object
56
+	 * @param \phpbb\controller\helper							$helper		Controller helper object
57
+	 * @param \phpbb\request\request								$request	Request object
58
+	 * @param \phpbb\auth\auth									$auth		Auth object
59
+	 * @param \phpbb\pagination									$pagination	Pagination object
60
+	 * @param \ernadoo\phpbbdirectory\core\categorie				$categorie	PhpBB Directory extension categorie object
61
+	 * @param \ernadoo\phpbbdirectory\core\link					$link		PhpBB Directory extension link object
62
+	 */
63 63
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\language\language $language, \phpbb\template\template $template, \phpbb\user $user, \phpbb\controller\helper $helper, \phpbb\request\request $request, \phpbb\auth\auth $auth, \phpbb\pagination $pagination, \ernadoo\phpbbdirectory\core\categorie $categorie, \ernadoo\phpbbdirectory\core\link $link)
64 64
 	{
65 65
 		$this->db			= $db;
@@ -83,10 +83,10 @@  discard block
 block discarded – undo
83 83
 	}
84 84
 
85 85
 	/**
86
-	* Base controller to be accessed with the URL /directory
87
-	*
88
-	* @return	\Symfony\Component\HttpFoundation\Response	A Symfony Response object
89
-	*/
86
+	 * Base controller to be accessed with the URL /directory
87
+	 *
88
+	 * @return	\Symfony\Component\HttpFoundation\Response	A Symfony Response object
89
+	 */
90 90
 	public function base()
91 91
 	{
92 92
 		$this->categorie->display();
@@ -96,17 +96,17 @@  discard block
 block discarded – undo
96 96
 	}
97 97
 
98 98
 	/**
99
-	* View controller for display a category
100
-	*
101
-	* @param	int		$cat_id		The category ID
102
-	* @param	int		$page		Page number taken from the URL
103
-	* @param	int		$sort_days	Specifies the maximum amount of days a link may be old
104
-	* @param	string	$sort_key	is the key of $sort_by_sql for the selected sorting: a|t|r|s|v|p
105
-	* @param	string	$sort_dir	is either a or d representing ASC and DESC (ascending|descending)
106
-	* @param	string	$mode		watch|unwatch
107
-	* @return	\Symfony\Component\HttpFoundation\Response	A Symfony Response object
108
-	* @throws	\phpbb\exception\http_exception
109
-	*/
99
+	 * View controller for display a category
100
+	 *
101
+	 * @param	int		$cat_id		The category ID
102
+	 * @param	int		$page		Page number taken from the URL
103
+	 * @param	int		$sort_days	Specifies the maximum amount of days a link may be old
104
+	 * @param	string	$sort_key	is the key of $sort_by_sql for the selected sorting: a|t|r|s|v|p
105
+	 * @param	string	$sort_dir	is either a or d representing ASC and DESC (ascending|descending)
106
+	 * @param	string	$mode		watch|unwatch
107
+	 * @return	\Symfony\Component\HttpFoundation\Response	A Symfony Response object
108
+	 * @throws	\phpbb\exception\http_exception
109
+	 */
110 110
 	public function view($cat_id, $page, $sort_days, $sort_key, $sort_dir, $mode = '')
111 111
 	{
112 112
 		if (false === $this->categorie->get($cat_id))
@@ -366,11 +366,11 @@  discard block
 block discarded – undo
366 366
 	}
367 367
 
368 368
 	/**
369
-	* date controller for return a date
370
-	*
371
-	* @return	\phpbb\json_response	A Json Response
372
-	* @throws	\phpbb\exception\http_exception
373
-	*/
369
+	 * date controller for return a date
370
+	 *
371
+	 * @return	\phpbb\json_response	A Json Response
372
+	 * @throws	\phpbb\exception\http_exception
373
+	 */
374 374
 	public function return_date()
375 375
 	{
376 376
 		if (!$this->request->is_ajax())
Please login to merge, or discard this patch.
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -62,16 +62,16 @@  discard block
 block discarded – undo
62 62
 	*/
63 63
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\language\language $language, \phpbb\template\template $template, \phpbb\user $user, \phpbb\controller\helper $helper, \phpbb\request\request $request, \phpbb\auth\auth $auth, \phpbb\pagination $pagination, \ernadoo\phpbbdirectory\core\categorie $categorie, \ernadoo\phpbbdirectory\core\link $link)
64 64
 	{
65
-		$this->db			= $db;
66
-		$this->config		= $config;
65
+		$this->db = $db;
66
+		$this->config = $config;
67 67
 		$this->language		= $language;
68 68
 		$this->template		= $template;
69 69
 		$this->user			= $user;
70
-		$this->helper		= $helper;
71
-		$this->request		= $request;
70
+		$this->helper = $helper;
71
+		$this->request = $request;
72 72
 		$this->auth			= $auth;
73
-		$this->pagination	= $pagination;
74
-		$this->categorie	= $categorie;
73
+		$this->pagination = $pagination;
74
+		$this->categorie = $categorie;
75 75
 		$this->link			= $link;
76 76
 
77 77
 		$language->add_lang('directory', 'ernadoo/phpbbdirectory');
@@ -116,18 +116,18 @@  discard block
 block discarded – undo
116 116
 
117 117
 		$start = ($page - 1) * $this->config['dir_show'];
118 118
 
119
-		$default_sort_days	= 0;
119
+		$default_sort_days = 0;
120 120
 		$default_sort_key	= (string) substr($this->config['dir_default_order'], 0, 1);
121 121
 		$default_sort_dir	= (string) substr($this->config['dir_default_order'], 2);
122 122
 
123 123
 		$sort_days	= (!$sort_days) ? $this->request->variable('st', $default_sort_days) : $sort_days;
124 124
 		$sort_key 	= (!$sort_key) ? $this->request->variable('sk', $default_sort_key) : $sort_key;
125
-		$sort_dir	= (!$sort_dir) ? $this->request->variable('sd', $default_sort_dir) : $sort_dir;
125
+		$sort_dir = (!$sort_dir) ? $this->request->variable('sd', $default_sort_dir) : $sort_dir;
126 126
 		$link_list = $rowset = array();
127 127
 
128 128
 		// Categorie ordering options
129 129
 		$limit_days		= array(0 => $this->language->lang('SEE_ALL'), 1 => $this->language->lang('1_DAY'), 7 => $this->language->lang('7_DAYS'), 14 => $this->language->lang('2_WEEKS'), 30 => $this->language->lang('1_MONTH'), 90 => $this->language->lang('3_MONTHS'), 180 => $this->language->lang('6_MONTHS'), 365 => $this->language->lang('1_YEAR'));
130
-		$sort_by_text	= array('a' => $this->language->lang('AUTHOR'), 't' => $this->language->lang('POST_TIME'), 'r' => $this->language->lang('DIR_COMMENTS_ORDER'), 's' =>  $this->language->lang('DIR_NAME_ORDER'), 'v' => $this->language->lang('DIR_NB_CLICKS_ORDER'));
130
+		$sort_by_text = array('a' => $this->language->lang('AUTHOR'), 't' => $this->language->lang('POST_TIME'), 'r' => $this->language->lang('DIR_COMMENTS_ORDER'), 's' =>  $this->language->lang('DIR_NAME_ORDER'), 'v' => $this->language->lang('DIR_NB_CLICKS_ORDER'));
131 131
 		$sort_by_sql	= array('a' => 'u.username_clean', 't' => array('l.link_time', 'l.link_id'), 'r' => 'l.link_comment', 's' => 'l.link_name', 'v' => 'l.link_view');
132 132
 
133 133
 		if ($this->config['dir_activ_pagerank'])
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 		else
183 183
 		{
184 184
 			$sql_limit_time = '';
185
-			$nb_links		= (int) $this->categorie->data['cat_links'];
185
+			$nb_links = (int) $this->categorie->data['cat_links'];
186 186
 		}
187 187
 
188 188
 		// Make sure $start is set to the last page if it exceeds the amount
@@ -306,8 +306,8 @@  discard block
 block discarded – undo
306 306
 
307 307
 			$link_list = ($store_reverse) ? array_reverse($link_list) : $link_list;
308 308
 
309
-			$votes_status 		= ($this->categorie->data['cat_allow_votes']) ? true : false;
310
-			$comments_status 	= ($this->categorie->data['cat_allow_comments']) ? true : false;
309
+			$votes_status = ($this->categorie->data['cat_allow_votes']) ? true : false;
310
+			$comments_status = ($this->categorie->data['cat_allow_comments']) ? true : false;
311 311
 
312 312
 			foreach ($link_list as $link_id)
313 313
 			{
@@ -317,11 +317,11 @@  discard block
 block discarded – undo
317 317
 				$s_note		= $this->link->display_note($site['link_note'], $site['link_vote'], $votes_status);
318 318
 				$s_thumb	= $this->link->display_thumb($site);
319 319
 				$s_vote		= $this->link->display_vote($site);
320
-				$s_banner	= $this->link->display_bann($site);
321
-				$s_pr		= $this->link->display_pagerank($site);
322
-				$s_rss		= $this->link->display_rss($site);
320
+				$s_banner = $this->link->display_bann($site);
321
+				$s_pr = $this->link->display_pagerank($site);
322
+				$s_rss = $this->link->display_rss($site);
323 323
 
324
-				$edit_allowed 	= ($this->user->data['is_registered'] && ($this->auth->acl_get('m_edit_dir') || ($this->user->data['user_id'] == $site['link_user_id'] && $this->auth->acl_get('u_edit_dir'))));
324
+				$edit_allowed = ($this->user->data['is_registered'] && ($this->auth->acl_get('m_edit_dir') || ($this->user->data['user_id'] == $site['link_user_id'] && $this->auth->acl_get('u_edit_dir'))));
325 325
 				$delete_allowed = ($this->user->data['is_registered'] && ($this->auth->acl_get('m_delete_dir') || ($this->user->data['user_id'] == $site['link_user_id'] && $this->auth->acl_get('u_delete_dir'))));
326 326
 
327 327
 				$this->template->assign_block_vars('site', array(
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
 					'VOTE_LIST'		=> ($votes_status) ? $s_vote : '',
341 341
 
342 342
 					'IMG_FLAG'		=> $s_flag,
343
-					'ON_CLICK' 		=> "onclick=\"window.open('".$this->helper->route('ernadoo_phpbbdirectory_view_controller', array('link_id' => (int) $site['link_id']))."'); return false;\"",
343
+					'ON_CLICK' 		=> "onclick=\"window.open('" . $this->helper->route('ernadoo_phpbbdirectory_view_controller', array('link_id' => (int) $site['link_id'])) . "'); return false;\"",
344 344
 
345 345
 					'S_NEW_LINK'	=> (((time() - $site['link_time']) / 86400) <= $this->config['dir_new_time']) ? true : false,
346 346
 
Please login to merge, or discard this patch.
controller/comments.php 2 patches
Indentation   +64 added lines, -64 removed lines patch added patch discarded remove patch
@@ -59,23 +59,23 @@  discard block
 block discarded – undo
59 59
 	protected $php_ext;
60 60
 
61 61
 	/**
62
-	* Constructor
63
-	*
64
-	* @param \phpbb\db\driver\driver_interface					$db					Database object
65
-	* @param \phpbb\config\config								$config				Config object
66
-	* @param \phpbb\language\language							$language			Language object
67
-	* @param \phpbb\template\template							$template			Template object
68
-	* @param \phpbb\user										$user				User object
69
-	* @param \phpbb\controller\helper							$helper				Controller helper object
70
-	* @param \phpbb\request\request								$request			Request object
71
-	* @param \phpbb\auth\auth									$auth				Auth object
72
-	* @param \phpbb\pagination									$pagination			Pagination object
73
-	* @param \phpbb\captcha\factory								$captcha_factory	Captcha object
74
-	* @param \ernadoo\phpbbdirectory\core\categorie				$categorie			PhpBB Directory extension categorie object
75
-	* @param \ernadoo\phpbbdirectory\core\comment				$comment			PhpBB Directory extension comment object
76
-	* @param string												$root_path			phpBB root path
77
-	* @param string												$php_ext			phpEx
78
-	*/
62
+	 * Constructor
63
+	 *
64
+	 * @param \phpbb\db\driver\driver_interface					$db					Database object
65
+	 * @param \phpbb\config\config								$config				Config object
66
+	 * @param \phpbb\language\language							$language			Language object
67
+	 * @param \phpbb\template\template							$template			Template object
68
+	 * @param \phpbb\user										$user				User object
69
+	 * @param \phpbb\controller\helper							$helper				Controller helper object
70
+	 * @param \phpbb\request\request								$request			Request object
71
+	 * @param \phpbb\auth\auth									$auth				Auth object
72
+	 * @param \phpbb\pagination									$pagination			Pagination object
73
+	 * @param \phpbb\captcha\factory								$captcha_factory	Captcha object
74
+	 * @param \ernadoo\phpbbdirectory\core\categorie				$categorie			PhpBB Directory extension categorie object
75
+	 * @param \ernadoo\phpbbdirectory\core\comment				$comment			PhpBB Directory extension comment object
76
+	 * @param string												$root_path			phpBB root path
77
+	 * @param string												$php_ext			phpEx
78
+	 */
79 79
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\language\language $language, \phpbb\template\template $template, \phpbb\user $user, \phpbb\controller\helper $helper, \phpbb\request\request $request, \phpbb\auth\auth $auth, \phpbb\pagination $pagination, \phpbb\captcha\factory $captcha_factory, \ernadoo\phpbbdirectory\core\categorie $categorie, \ernadoo\phpbbdirectory\core\comment $comment, $root_path, $php_ext)
80 80
 	{
81 81
 		$this->db				= $db;
@@ -111,13 +111,13 @@  discard block
 block discarded – undo
111 111
 	}
112 112
 
113 113
 	/**
114
-	* Populate form when an error occurred
115
-	*
116
-	* @param	int		$link_id		The link ID
117
-	* @param	int		$comment_id		The comment ID
118
-	* @return	\Symfony\Component\HttpFoundation\Response	A Symfony Response object
119
-	* @throws	\phpbb\exception\http_exception
120
-	*/
114
+	 * Populate form when an error occurred
115
+	 *
116
+	 * @param	int		$link_id		The link ID
117
+	 * @param	int		$comment_id		The comment ID
118
+	 * @return	\Symfony\Component\HttpFoundation\Response	A Symfony Response object
119
+	 * @throws	\phpbb\exception\http_exception
120
+	 */
121 121
 	public function delete_comment($link_id, $comment_id)
122 122
 	{
123 123
 		$this->_check_comments_enable($link_id);
@@ -156,13 +156,13 @@  discard block
 block discarded – undo
156 156
 	}
157 157
 
158 158
 	/**
159
-	* Edit a comment
160
-	*
161
-	* @param	int		$link_id		The category ID
162
-	* @param	int		$comment_id		The comment ID
163
-	* @return	null|\Symfony\Component\HttpFoundation\Response	A Symfony Response object
164
-	* @throws	\phpbb\exception\http_exception
165
-	*/
159
+	 * Edit a comment
160
+	 *
161
+	 * @param	int		$link_id		The category ID
162
+	 * @param	int		$comment_id		The comment ID
163
+	 * @return	null|\Symfony\Component\HttpFoundation\Response	A Symfony Response object
164
+	 * @throws	\phpbb\exception\http_exception
165
+	 */
166 166
 	public function edit_comment($link_id, $comment_id)
167 167
 	{
168 168
 		$this->_check_comments_enable($link_id);
@@ -193,12 +193,12 @@  discard block
 block discarded – undo
193 193
 	}
194 194
 
195 195
 	/**
196
-	* Post a new comment
197
-	*
198
-	* @param	int	$link_id		The category ID
199
-	* @return	null
200
-	* @throws	\phpbb\exception\http_exception
201
-	*/
196
+	 * Post a new comment
197
+	 *
198
+	 * @param	int	$link_id		The category ID
199
+	 * @return	null
200
+	 * @throws	\phpbb\exception\http_exception
201
+	 */
202 202
 	public function new_comment($link_id)
203 203
 	{
204 204
 		$this->_check_comments_enable($link_id);
@@ -224,14 +224,14 @@  discard block
 block discarded – undo
224 224
 	}
225 225
 
226 226
 	/**
227
-	* Display popup comment
228
-	*
229
-	* @param	int		$link_id		The category ID
230
-	* @param	int		$page			Page number taken from the URL
231
-	* @param	string	$mode			add|edit
232
-	* @return	\Symfony\Component\HttpFoundation\Response	A Symfony Response object
233
-	* @throws	\phpbb\exception\http_exception
234
-	*/
227
+	 * Display popup comment
228
+	 *
229
+	 * @param	int		$link_id		The category ID
230
+	 * @param	int		$page			Page number taken from the URL
231
+	 * @param	string	$mode			add|edit
232
+	 * @return	\Symfony\Component\HttpFoundation\Response	A Symfony Response object
233
+	 * @throws	\phpbb\exception\http_exception
234
+	 */
235 235
 	public function view($link_id, $page, $mode = 'new')
236 236
 	{
237 237
 		$this->_check_comments_enable($link_id);
@@ -324,13 +324,13 @@  discard block
 block discarded – undo
324 324
 	}
325 325
 
326 326
 	/**
327
-	* Routine
328
-	*
329
-	* @param	int		$link_id		The link ID
330
-	* @param	int		$comment_id		The comment ID
331
-	* @param	string	$mode			new|edit
332
-	* @return	\Symfony\Component\HttpFoundation\Response	A Symfony Response object
333
-	*/
327
+	 * Routine
328
+	 *
329
+	 * @param	int		$link_id		The link ID
330
+	 * @param	int		$comment_id		The comment ID
331
+	 * @param	string	$mode			new|edit
332
+	 * @return	\Symfony\Component\HttpFoundation\Response	A Symfony Response object
333
+	 */
334 334
 	private function _data_processing($link_id, $comment_id = 0, $mode = 'new')
335 335
 	{
336 336
 		if (!check_form_key('dir_form_comment'))
@@ -418,12 +418,12 @@  discard block
 block discarded – undo
418 418
 	}
419 419
 
420 420
 	/**
421
-	* Check if comments are enable in a category
422
-	*
423
-	* @param	int		$link_id		The link ID
424
-	* @return	null					Retun null if comments are allowed, http_exception if not
425
-	* @throws	\phpbb\exception\http_exception
426
-	*/
421
+	 * Check if comments are enable in a category
422
+	 *
423
+	 * @param	int		$link_id		The link ID
424
+	 * @return	null					Retun null if comments are allowed, http_exception if not
425
+	 * @throws	\phpbb\exception\http_exception
426
+	 */
427 427
 	private function _check_comments_enable($link_id)
428 428
 	{
429 429
 		$sql = 'SELECT link_cat
@@ -449,12 +449,12 @@  discard block
 block discarded – undo
449 449
 	}
450 450
 
451 451
 	/**
452
-	* Populate form when an error occurred
453
-	*
454
-	* @param	int		$link_id		The link ID
455
-	* @param	string	$mode			add|edit
456
-	* @return	null
457
-	*/
452
+	 * Populate form when an error occurred
453
+	 *
454
+	 * @param	int		$link_id		The link ID
455
+	 * @param	string	$mode			add|edit
456
+	 * @return	null
457
+	 */
458 458
 	private function _populate_form($link_id, $mode)
459 459
 	{
460 460
 		if (!$this->user->data['is_registered'] && $this->config['dir_visual_confirm'] && $mode != 'edit')
Please login to merge, or discard this patch.
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -78,16 +78,16 @@  discard block
 block discarded – undo
78 78
 	*/
79 79
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\language\language $language, \phpbb\template\template $template, \phpbb\user $user, \phpbb\controller\helper $helper, \phpbb\request\request $request, \phpbb\auth\auth $auth, \phpbb\pagination $pagination, \phpbb\captcha\factory $captcha_factory, \ernadoo\phpbbdirectory\core\categorie $categorie, \ernadoo\phpbbdirectory\core\comment $comment, $root_path, $php_ext)
80 80
 	{
81
-		$this->db				= $db;
82
-		$this->config			= $config;
81
+		$this->db = $db;
82
+		$this->config = $config;
83 83
 		$this->language			= $language;
84 84
 		$this->template			= $template;
85 85
 		$this->user				= $user;
86
-		$this->helper			= $helper;
87
-		$this->request			= $request;
86
+		$this->helper = $helper;
87
+		$this->request = $request;
88 88
 		$this->auth				= $auth;
89
-		$this->pagination		= $pagination;
90
-		$this->captcha_factory 	= $captcha_factory;
89
+		$this->pagination = $pagination;
90
+		$this->captcha_factory = $captcha_factory;
91 91
 		$this->categorie		= $categorie;
92 92
 		$this->comment			= $comment;
93 93
 		$this->root_path		= $root_path;
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 		$comment_text = generate_text_for_edit($value['comment_text'], $value['comment_uid'], $value['comment_flags']);
182 182
 		$this->s_comment = $comment_text['text'];
183 183
 
184
-		$submit	= $this->request->is_set_post('update_comment') ? true : false;
184
+		$submit = $this->request->is_set_post('update_comment') ? true : false;
185 185
 
186 186
 		// If form is done
187 187
 		if ($submit)
@@ -237,8 +237,8 @@  discard block
 block discarded – undo
237 237
 		$this->_check_comments_enable($link_id);
238 238
 
239 239
 		$comment_id = $this->request->variable('c', 0);
240
-		$view 		= $this->request->variable('view', '');
241
-		$start 		= ($page - 1) * $this->config['dir_comments_per_page'];
240
+		$view = $this->request->variable('view', '');
241
+		$start = ($page - 1) * $this->config['dir_comments_per_page'];
242 242
 
243 243
 		$this->s_hidden_fields = array_merge($this->s_hidden_fields, array('page' => $page));
244 244
 
@@ -297,12 +297,12 @@  discard block
 block discarded – undo
297 297
 				'S_COMMENT'			=> generate_text_for_display($comments['comment_text'], $comments['comment_uid'], $comments['comment_bitfield'], $comments['comment_flags']),
298 298
 				'S_ID'				=> $comments['comment_id'],
299 299
 
300
-				'U_EDIT'			=> ($edit_allowed) 		? $this->helper->route('ernadoo_phpbbdirectory_comment_edit_controller', array('link_id' => (int) $link_id, 'comment_id' => (int) $comments['comment_id'])) : '',
301
-				'U_DELETE'			=> ($delete_allowed) 	? $this->helper->route('ernadoo_phpbbdirectory_comment_delete_controller', array('link_id' => (int) $link_id, 'comment_id' => (int) $comments['comment_id'], '_referer' => $this->helper->get_current_url())) : '',
300
+				'U_EDIT'			=> ($edit_allowed) ? $this->helper->route('ernadoo_phpbbdirectory_comment_edit_controller', array('link_id' => (int) $link_id, 'comment_id' => (int) $comments['comment_id'])) : '',
301
+				'U_DELETE'			=> ($delete_allowed) ? $this->helper->route('ernadoo_phpbbdirectory_comment_delete_controller', array('link_id' => (int) $link_id, 'comment_id' => (int) $comments['comment_id'], '_referer' => $this->helper->get_current_url())) : '',
302 302
 
303 303
 				'S_IGNORE_POST'		=> ($comments['foe'] && ($view != 'show' || $comment_id != $comments['comment_id'])) ? true : false,
304
-				'L_IGNORE_POST'		=> ($comments['foe']) ? $this->language->lang('POST_BY_FOE', get_username_string('full', $comments['comment_user_id'], $comments['username'], $comments['user_colour']), '<a href="'.$this->helper->url('directory/link/'.$link_id.'/comment'.(($page > 1) ? '/'.$page : '').'?view=show#c'.(int) $comments['comment_id']).'">', '</a>') : '',
305
-				'L_POST_DISPLAY'	=> ($comments['foe']) ? $this->language->lang('POST_DISPLAY', '<a class="display_post" data-post-id="' . $comments['comment_id'] . '" href="' . $this->helper->url('directory/link/'.$link_id.'/comment'.(($page > 1) ? '/'.$page : '').'?c='.(int) $comments['comment_id'] . '&view=show#c'.(int) $comments['comment_id']).'">', '</a>') : '',
304
+				'L_IGNORE_POST'		=> ($comments['foe']) ? $this->language->lang('POST_BY_FOE', get_username_string('full', $comments['comment_user_id'], $comments['username'], $comments['user_colour']), '<a href="' . $this->helper->url('directory/link/' . $link_id . '/comment' . (($page > 1) ? '/' . $page : '') . '?view=show#c' . (int) $comments['comment_id']) . '">', '</a>') : '',
305
+				'L_POST_DISPLAY'	=> ($comments['foe']) ? $this->language->lang('POST_DISPLAY', '<a class="display_post" data-post-id="' . $comments['comment_id'] . '" href="' . $this->helper->url('directory/link/' . $link_id . '/comment' . (($page > 1) ? '/' . $page : '') . '?c=' . (int) $comments['comment_id'] . '&view=show#c' . (int) $comments['comment_id']) . '">', '</a>') : '',
306 306
 
307 307
 				'S_INFO'			=> $this->auth->acl_get('m_info'),
308 308
 			));
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
 
404 404
 			$meta_info = $this->helper->route('ernadoo_phpbbdirectory_comment_view_controller', array('link_id' => (int) $link_id));
405 405
 			meta_refresh(3, $meta_info);
406
-			$message = $this->language->lang('DIR_'.strtoupper($mode).'_COMMENT_OK');
406
+			$message = $this->language->lang('DIR_' . strtoupper($mode) . '_COMMENT_OK');
407 407
 			$message = $message . '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_COMMENT', '<a href="' . $meta_info . '">', '</a>');
408 408
 			return $this->helper->message($message);
409 409
 		}
@@ -483,11 +483,11 @@  discard block
 block discarded – undo
483 483
 		$this->template->assign_vars(array(
484 484
 			'S_AUTH_COMM' 		=> $this->auth->acl_get('u_comment_dir'),
485 485
 
486
-			'BBCODE_STATUS'		=> ($this->config['dir_allow_bbcode']) 	? $this->language->lang('BBCODE_IS_ON', '<a href="' . append_sid($this->root_path."faq.$this->php_ext", 'mode=bbcode') . '">', '</a>') : $this->language->lang('BBCODE_IS_OFF', '<a href="' . append_sid($this->root_path."faq.$this->php_ext", 'mode=bbcode') . '">', '</a>'),
487
-			'IMG_STATUS'		=> ($this->config['dir_allow_bbcode']) 	? $this->language->lang('IMAGES_ARE_ON') : $this->language->lang('IMAGES_ARE_OFF'),
488
-			'SMILIES_STATUS'	=> ($this->config['dir_allow_smilies'])	? $this->language->lang('SMILIES_ARE_ON') : $this->language->lang('SMILIES_ARE_OFF'),
489
-			'URL_STATUS'		=> ($this->config['dir_allow_links'])	? $this->language->lang('URL_IS_ON') : $this->language->lang('URL_IS_OFF'),
490
-			'FLASH_STATUS'		=> ($this->config['dir_allow_bbcode'] && $this->config['dir_allow_flash'])	? $this->language->lang('FLASH_IS_ON') : $this->language->lang('FLASH_IS_OFF'),
486
+			'BBCODE_STATUS'		=> ($this->config['dir_allow_bbcode']) ? $this->language->lang('BBCODE_IS_ON', '<a href="' . append_sid($this->root_path . "faq.$this->php_ext", 'mode=bbcode') . '">', '</a>') : $this->language->lang('BBCODE_IS_OFF', '<a href="' . append_sid($this->root_path . "faq.$this->php_ext", 'mode=bbcode') . '">', '</a>'),
487
+			'IMG_STATUS'		=> ($this->config['dir_allow_bbcode']) ? $this->language->lang('IMAGES_ARE_ON') : $this->language->lang('IMAGES_ARE_OFF'),
488
+			'SMILIES_STATUS'	=> ($this->config['dir_allow_smilies']) ? $this->language->lang('SMILIES_ARE_ON') : $this->language->lang('SMILIES_ARE_OFF'),
489
+			'URL_STATUS'		=> ($this->config['dir_allow_links']) ? $this->language->lang('URL_IS_ON') : $this->language->lang('URL_IS_OFF'),
490
+			'FLASH_STATUS'		=> ($this->config['dir_allow_bbcode'] && $this->config['dir_allow_flash']) ? $this->language->lang('FLASH_IS_ON') : $this->language->lang('FLASH_IS_OFF'),
491 491
 
492 492
 			'L_DIR_REPLY_EXP'	=> $this->language->lang('DIR_REPLY_EXP', $this->config['dir_length_comments']),
493 493
 
Please login to merge, or discard this patch.