Completed
Push — 3.2.x ( 83259b...375400 )
by Erwan
02:07
created
search/fulltext_directory.php 2 patches
Indentation   +20 added lines, -20 removed lines patch added patch discarded remove patch
@@ -16,32 +16,32 @@
 block discarded – undo
16 16
 	protected $db;
17 17
 
18 18
 	/**
19
-	* Constructor
20
-	*
21
-	* @param \phpbb\db\driver\driver_interface $db
22
-	*/
19
+	 * Constructor
20
+	 *
21
+	 * @param \phpbb\db\driver\driver_interface $db
22
+	 */
23 23
 	public function __construct(\phpbb\db\driver\driver_interface $db)
24 24
 	{
25 25
 		$this->db = $db;
26 26
 	}
27 27
 
28 28
 	/**
29
-	* Performs a search on keywords depending on display specific params. You have to run split_keywords() first
30
-	*
31
-	* @param	array		$keywords_ary		contains each words to search
32
-	* @param	string		$fields				contains either titleonly (link titles should be searched), desconly (only description bodies should be searched)
33
-	* @param	string		$terms				is either 'all' (use query as entered, words without prefix should default to "have to be in field") or 'any' (ignore search query parts and just return all posts that contain any of the specified words)
34
-	* @param	array		$sort_by_sql		contains SQL code for the ORDER BY part of a query
35
-	* @param	string		$sort_key			is the key of $sort_by_sql for the selected sorting
36
-	* @param	string		$sort_dir			is either a or d representing ASC and DESC
37
-	* @param	string		$sort_days			specifies the maximum amount of days a post may be old
38
-	* @param	array		$ex_cid_ary			specifies an array of category ids which should not be searched
39
-	* @param	int			$cat_id				is set to 0 or a topic id, if it is not 0 then only posts in this topic should be searched
40
-	* @param	array		&$id_ary			passed by reference, to be filled with ids for the page specified by $start and $per_page, should be ordered
41
-	* @param	int			$start				indicates the first index of the page
42
-	* @param	int			$per_page			number of ids each page is supposed to contain
43
-	* @return	int								total number of results
44
-	*/
29
+	 * Performs a search on keywords depending on display specific params. You have to run split_keywords() first
30
+	 *
31
+	 * @param	array		$keywords_ary		contains each words to search
32
+	 * @param	string		$fields				contains either titleonly (link titles should be searched), desconly (only description bodies should be searched)
33
+	 * @param	string		$terms				is either 'all' (use query as entered, words without prefix should default to "have to be in field") or 'any' (ignore search query parts and just return all posts that contain any of the specified words)
34
+	 * @param	array		$sort_by_sql		contains SQL code for the ORDER BY part of a query
35
+	 * @param	string		$sort_key			is the key of $sort_by_sql for the selected sorting
36
+	 * @param	string		$sort_dir			is either a or d representing ASC and DESC
37
+	 * @param	string		$sort_days			specifies the maximum amount of days a post may be old
38
+	 * @param	array		$ex_cid_ary			specifies an array of category ids which should not be searched
39
+	 * @param	int			$cat_id				is set to 0 or a topic id, if it is not 0 then only posts in this topic should be searched
40
+	 * @param	array		&$id_ary			passed by reference, to be filled with ids for the page specified by $start and $per_page, should be ordered
41
+	 * @param	int			$start				indicates the first index of the page
42
+	 * @param	int			$per_page			number of ids each page is supposed to contain
43
+	 * @return	int								total number of results
44
+	 */
45 45
 	public function keyword_search($keywords_ary, $fields, $terms, $sort_by_sql, $sort_key, $sort_dir, $sort_days, $ex_cid_ary, $cat_id, &$id_ary, $start, $per_page)
46 46
 	{
47 47
 		$matches = array();
Please login to merge, or discard this patch.
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -69,20 +69,20 @@  discard block
 block discarded – undo
69 69
 			$match_search_query = '';
70 70
 			foreach ($matches as $match)
71 71
 			{
72
-				$match_search_query .= (($match_search_query) ? ' OR ' : '') . 'LOWER('. $match . ') ';
73
-				$match_search_query .= $this->db->sql_like_expression(str_replace('*', $this->db->get_any_char(), $this->db->get_any_char() . strtolower($word) . $this->db->get_any_char()));
72
+				$match_search_query .= (($match_search_query) ? ' OR ' : '').'LOWER('.$match.') ';
73
+				$match_search_query .= $this->db->sql_like_expression(str_replace('*', $this->db->get_any_char(), $this->db->get_any_char().strtolower($word).$this->db->get_any_char()));
74 74
 			}
75
-			$search_query .= ((!$search_query) ? '' : (($terms == 'all') ? ' AND ' : ' OR ')) . '(' . $match_search_query . ')';
75
+			$search_query .= ((!$search_query) ? '' : (($terms == 'all') ? ' AND ' : ' OR ')).'('.$match_search_query.')';
76 76
 		}
77 77
 		$direction = (($sort_dir == 'd') ? 'DESC' : 'ASC');
78 78
 
79 79
 		if (is_array($sort_by_sql[$sort_key]))
80 80
 		{
81
-			$sql_sort_order = implode(' ' . $direction . ', ', $sort_by_sql[$sort_key]) . ' ' . $direction;
81
+			$sql_sort_order = implode(' '.$direction.', ', $sort_by_sql[$sort_key]).' '.$direction;
82 82
 		}
83 83
 		else
84 84
 		{
85
-			$sql_sort_order = $sort_by_sql[$sort_key] . ' ' . $direction;
85
+			$sql_sort_order = $sort_by_sql[$sort_key].' '.$direction;
86 86
 		}
87 87
 
88 88
 		$sql_array = array(
@@ -90,10 +90,10 @@  discard block
 block discarded – undo
90 90
 			'FROM'		=> array(
91 91
 					$this->links_table	=> 'l'),
92 92
 			'WHERE'		=> 'l.link_active = 1
93
-				' . (($search_query) ? 'AND (' . $search_query . ')' : '') . '
94
-				' . (sizeof($ex_cid_ary) ? ' AND ' . $this->db->sql_in_set('l.link_cat', $ex_cid_ary, true) : '') . '
95
-				' . (($cat_id) ? ' AND ' . $this->db->sql_in_set('l.link_cat', $cat_id) : '') . '
96
-				' . (($sort_days) ? ' AND l.link_time >= ' . (time() - ($sort_days * 86400)) : ''),
93
+				' . (($search_query) ? 'AND ('.$search_query.')' : '').'
94
+				' . (sizeof($ex_cid_ary) ? ' AND '.$this->db->sql_in_set('l.link_cat', $ex_cid_ary, true) : '').'
95
+				' . (($cat_id) ? ' AND '.$this->db->sql_in_set('l.link_cat', $cat_id) : '').'
96
+				' . (($sort_days) ? ' AND l.link_time >= '.(time() - ($sort_days * 86400)) : ''),
97 97
 			'ORDER_BY'	=> $sql_sort_order
98 98
 		);
99 99
 
Please login to merge, or discard this patch.
migrations/v20x/v2_0_0.php 2 patches
Indentation   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -13,8 +13,8 @@  discard block
 block discarded – undo
13 13
 class v2_0_0 extends \phpbb\db\migration\container_aware_migration
14 14
 {
15 15
 	/**
16
-	* @inheritDoc
17
-	*/
16
+	 * @inheritDoc
17
+	 */
18 18
 	static public function depends_on()
19 19
 	{
20 20
 		return array(
@@ -23,8 +23,8 @@  discard block
 block discarded – undo
23 23
 	}
24 24
 
25 25
 	/**
26
-	* @inheritDoc
27
-	*/
26
+	 * @inheritDoc
27
+	 */
28 28
 	public function update_data()
29 29
 	{
30 30
 		return array(
Please login to merge, or discard this patch.
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 		{
46 46
 			$default_reparser = new $fast_reparsers[0][0](
47 47
 				$this->db,
48
-				$this->container->getParameter('core.table_prefix') . $fast_reparsers[0][1]);
48
+				$this->container->getParameter('core.table_prefix').$fast_reparsers[0][1]);
49 49
 
50 50
 			$resume_data = array(
51 51
 				'reparser'	=> 0,
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 		{
61 61
 			$reparser = new $fast_reparsers[$resume_data['reparser']][0](
62 62
 				$this->db,
63
-				$this->container->getParameter('core.table_prefix') . $fast_reparsers[$resume_data['reparser']][1]
63
+				$this->container->getParameter('core.table_prefix').$fast_reparsers[$resume_data['reparser']][1]
64 64
 				);
65 65
 
66 66
 			// New reparser
Please login to merge, or discard this patch.
textreparser/plugins/comment_text.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 comment_text extends \phpbb\textreparser\row_based_plugin
14 14
 {
15 15
 	/**
16
-	* {@inheritdoc}
17
-	*/
16
+	 * {@inheritdoc}
17
+	 */
18 18
 	public function get_columns()
19 19
 	{
20 20
 		return array(
Please login to merge, or discard this patch.
acp/phpbbdirectory_module.php 2 patches
Indentation   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -19,10 +19,10 @@  discard block
 block discarded – undo
19 19
 	public $u_action;
20 20
 
21 21
 	/**
22
-	*
23
-	* @param int	$id
24
-	* @param string	$mode
25
-	*/
22
+	 *
23
+	 * @param int	$id
24
+	 * @param string	$mode
25
+	 */
26 26
 	public function main($id, $mode)
27 27
 	{
28 28
 		global $request, $phpbb_container;
@@ -187,11 +187,11 @@  discard block
 block discarded – undo
187 187
 	}
188 188
 
189 189
 	/**
190
-	* Display thumb services available
191
-	*
192
-	* @param 	string	$url_selected
193
-	* @return 	string
194
-	*/
190
+	 * Display thumb services available
191
+	 *
192
+	 * @param 	string	$url_selected
193
+	 * @return 	string
194
+	 */
195 195
 	public function get_thumb_service_list($url_selected)
196 196
 	{
197 197
 		$thumbshot = array(
@@ -211,11 +211,11 @@  discard block
 block discarded – undo
211 211
 	}
212 212
 
213 213
 	/**
214
-	* Display order drop-down list
215
-	*
216
-	* @param	string	$order_selected
217
-	* @return	string
218
-	*/
214
+	 * Display order drop-down list
215
+	 *
216
+	 * @param	string	$order_selected
217
+	 * @return	string
218
+	 */
219 219
 	public function get_order_list($order_selected)
220 220
 	{
221 221
 		global $user;
@@ -244,8 +244,8 @@  discard block
 block discarded – undo
244 244
 	}
245 245
 
246 246
 	/**
247
-	* Adjust all three max_filesize config vars for display
248
-	*/
247
+	 * Adjust all three max_filesize config vars for display
248
+	 */
249 249
 	public function max_filesize($value, $key = '')
250 250
 	{
251 251
 		// Determine size var and adjust the value accordingly
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 		{
205 205
 			$selected = ($url == $url_selected) ? 'selected="selected"' : '';
206 206
 
207
-			$select_options .= '<option value="' . $url . '" ' . $selected . '>' . parse_url($url, PHP_URL_HOST) . '</option>';
207
+			$select_options .= '<option value="'.$url.'" '.$selected.'>'.parse_url($url, PHP_URL_HOST).'</option>';
208 208
 		}
209 209
 
210 210
 		return $select_options;
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 		{
238 238
 			$selected = ($i == $order_selected) ? 'selected="selected"' : '';
239 239
 			$order_substr = trim(str_replace(' ', '_', $i));
240
-			$tpl .= '<option value="' . $i . '" ' . $selected . '>' . $user->lang['DIR_ORDER_' . strtoupper($order_substr)] . '</option>';
240
+			$tpl .= '<option value="'.$i.'" '.$selected.'>'.$user->lang['DIR_ORDER_'.strtoupper($order_substr)].'</option>';
241 241
 		}
242 242
 
243 243
 		return ($tpl);
@@ -254,6 +254,6 @@  discard block
 block discarded – undo
254 254
 		$value = $filesize['value'];
255 255
 
256 256
 		// size and maxlength must not be specified for input of type number
257
-		return '<input type="number" id="' . $key . '" min="0" max="999999999999999" step="any" name="config[' . $key . ']" value="' . $value . '" /> <select name="' . $key . '">' . size_select_options($size_var) . '</select>';
257
+		return '<input type="number" id="'.$key.'" min="0" max="999999999999999" step="any" name="config['.$key.']" value="'.$value.'" /> <select name="'.$key.'">'.size_select_options($size_var).'</select>';
258 258
 	}
259 259
 }
Please login to merge, or discard this patch.
controller/comments.php 3 patches
Doc Comments   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -191,7 +191,7 @@
 block discarded – undo
191 191
 	* Post a new comment
192 192
 	*
193 193
 	* @param	int	$link_id		The category ID
194
-	* @return	null
194
+	* @return	\Symfony\Component\HttpFoundation\Response|null
195 195
 	* @throws	\phpbb\exception\http_exception
196 196
 	*/
197 197
 	public function new_comment($link_id)
Please login to merge, or discard this patch.
Indentation   +64 added lines, -64 removed lines patch added patch discarded remove patch
@@ -61,23 +61,23 @@  discard block
 block discarded – undo
61 61
 	protected $php_ext;
62 62
 
63 63
 	/**
64
-	* Constructor
65
-	*
66
-	* @param \phpbb\db\driver\driver_interface					$db					Database object
67
-	* @param \phpbb\config\config								$config				Config object
68
-	* @param \phpbb\language\language							$language			Language object
69
-	* @param \phpbb\template\template							$template			Template object
70
-	* @param \phpbb\user										$user				User object
71
-	* @param \phpbb\controller\helper							$helper				Controller helper object
72
-	* @param \phpbb\request\request								$request			Request object
73
-	* @param \phpbb\auth\auth									$auth				Auth object
74
-	* @param \phpbb\pagination									$pagination			Pagination object
75
-	* @param \phpbb\captcha\factory								$captcha_factory	Captcha object
76
-	* @param \ernadoo\phpbbdirectory\core\categorie				$categorie			PhpBB Directory extension categorie object
77
-	* @param \ernadoo\phpbbdirectory\core\comment				$comment			PhpBB Directory extension comment object
78
-	* @param string												$root_path			phpBB root path
79
-	* @param string												$php_ext			phpEx
80
-	*/
64
+	 * Constructor
65
+	 *
66
+	 * @param \phpbb\db\driver\driver_interface					$db					Database object
67
+	 * @param \phpbb\config\config								$config				Config object
68
+	 * @param \phpbb\language\language							$language			Language object
69
+	 * @param \phpbb\template\template							$template			Template object
70
+	 * @param \phpbb\user										$user				User object
71
+	 * @param \phpbb\controller\helper							$helper				Controller helper object
72
+	 * @param \phpbb\request\request								$request			Request object
73
+	 * @param \phpbb\auth\auth									$auth				Auth object
74
+	 * @param \phpbb\pagination									$pagination			Pagination object
75
+	 * @param \phpbb\captcha\factory								$captcha_factory	Captcha object
76
+	 * @param \ernadoo\phpbbdirectory\core\categorie				$categorie			PhpBB Directory extension categorie object
77
+	 * @param \ernadoo\phpbbdirectory\core\comment				$comment			PhpBB Directory extension comment object
78
+	 * @param string												$root_path			phpBB root path
79
+	 * @param string												$php_ext			phpEx
80
+	 */
81 81
 	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)
82 82
 	{
83 83
 		$this->db				= $db;
@@ -109,13 +109,13 @@  discard block
 block discarded – undo
109 109
 	}
110 110
 
111 111
 	/**
112
-	* Populate form when an error occurred
113
-	*
114
-	* @param	int		$link_id		The link ID
115
-	* @param	int		$comment_id		The comment ID
116
-	* @return	\Symfony\Component\HttpFoundation\Response	A Symfony Response object
117
-	* @throws	\phpbb\exception\http_exception
118
-	*/
112
+	 * Populate form when an error occurred
113
+	 *
114
+	 * @param	int		$link_id		The link ID
115
+	 * @param	int		$comment_id		The comment ID
116
+	 * @return	\Symfony\Component\HttpFoundation\Response	A Symfony Response object
117
+	 * @throws	\phpbb\exception\http_exception
118
+	 */
119 119
 	public function delete_comment($link_id, $comment_id)
120 120
 	{
121 121
 		$this->_check_comments_enable($link_id);
@@ -154,13 +154,13 @@  discard block
 block discarded – undo
154 154
 	}
155 155
 
156 156
 	/**
157
-	* Edit a comment
158
-	*
159
-	* @param	int		$link_id		The category ID
160
-	* @param	int		$comment_id		The comment ID
161
-	* @return	null|\Symfony\Component\HttpFoundation\Response	A Symfony Response object
162
-	* @throws	\phpbb\exception\http_exception
163
-	*/
157
+	 * Edit a comment
158
+	 *
159
+	 * @param	int		$link_id		The category ID
160
+	 * @param	int		$comment_id		The comment ID
161
+	 * @return	null|\Symfony\Component\HttpFoundation\Response	A Symfony Response object
162
+	 * @throws	\phpbb\exception\http_exception
163
+	 */
164 164
 	public function edit_comment($link_id, $comment_id)
165 165
 	{
166 166
 		$this->_check_comments_enable($link_id);
@@ -191,12 +191,12 @@  discard block
 block discarded – undo
191 191
 	}
192 192
 
193 193
 	/**
194
-	* Post a new comment
195
-	*
196
-	* @param	int	$link_id		The category ID
197
-	* @return	null
198
-	* @throws	\phpbb\exception\http_exception
199
-	*/
194
+	 * Post a new comment
195
+	 *
196
+	 * @param	int	$link_id		The category ID
197
+	 * @return	null
198
+	 * @throws	\phpbb\exception\http_exception
199
+	 */
200 200
 	public function new_comment($link_id)
201 201
 	{
202 202
 		$this->_check_comments_enable($link_id);
@@ -222,14 +222,14 @@  discard block
 block discarded – undo
222 222
 	}
223 223
 
224 224
 	/**
225
-	* Display popup comment
226
-	*
227
-	* @param	int		$link_id		The category ID
228
-	* @param	int		$page			Page number taken from the URL
229
-	* @param	string	$mode			add|edit
230
-	* @return	\Symfony\Component\HttpFoundation\Response	A Symfony Response object
231
-	* @throws	\phpbb\exception\http_exception
232
-	*/
225
+	 * Display popup comment
226
+	 *
227
+	 * @param	int		$link_id		The category ID
228
+	 * @param	int		$page			Page number taken from the URL
229
+	 * @param	string	$mode			add|edit
230
+	 * @return	\Symfony\Component\HttpFoundation\Response	A Symfony Response object
231
+	 * @throws	\phpbb\exception\http_exception
232
+	 */
233 233
 	public function view($link_id, $page, $mode = 'new')
234 234
 	{
235 235
 		$this->_check_comments_enable($link_id);
@@ -322,13 +322,13 @@  discard block
 block discarded – undo
322 322
 	}
323 323
 
324 324
 	/**
325
-	* Routine
326
-	*
327
-	* @param	int		$link_id		The link ID
328
-	* @param	int		$comment_id		The comment ID
329
-	* @param	string	$mode			new|edit
330
-	* @return	\Symfony\Component\HttpFoundation\Response	A Symfony Response object
331
-	*/
325
+	 * Routine
326
+	 *
327
+	 * @param	int		$link_id		The link ID
328
+	 * @param	int		$comment_id		The comment ID
329
+	 * @param	string	$mode			new|edit
330
+	 * @return	\Symfony\Component\HttpFoundation\Response	A Symfony Response object
331
+	 */
332 332
 	private function _data_processing($link_id, $comment_id = 0, $mode = 'new')
333 333
 	{
334 334
 		if (!check_form_key('dir_form_comment'))
@@ -416,12 +416,12 @@  discard block
 block discarded – undo
416 416
 	}
417 417
 
418 418
 	/**
419
-	* Check if comments are enable in a category
420
-	*
421
-	* @param	int		$link_id		The link ID
422
-	* @return	null					Retun null if comments are allowed, http_exception if not
423
-	* @throws	\phpbb\exception\http_exception
424
-	*/
419
+	 * Check if comments are enable in a category
420
+	 *
421
+	 * @param	int		$link_id		The link ID
422
+	 * @return	null					Retun null if comments are allowed, http_exception if not
423
+	 * @throws	\phpbb\exception\http_exception
424
+	 */
425 425
 	private function _check_comments_enable($link_id)
426 426
 	{
427 427
 		$sql = 'SELECT link_cat
@@ -447,12 +447,12 @@  discard block
 block discarded – undo
447 447
 	}
448 448
 
449 449
 	/**
450
-	* Populate form when an error occurred
451
-	*
452
-	* @param	int		$link_id		The link ID
453
-	* @param	string	$mode			add|edit
454
-	* @return	null
455
-	*/
450
+	 * Populate form when an error occurred
451
+	 *
452
+	 * @param	int		$link_id		The link ID
453
+	 * @param	string	$mode			add|edit
454
+	 * @return	null
455
+	 */
456 456
 	private function _populate_form($link_id, $mode)
457 457
 	{
458 458
 		$this->user->add_lang(array('ucp', 'posting'));
Please login to merge, or discard this patch.
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -80,16 +80,16 @@  discard block
 block discarded – undo
80 80
 	*/
81 81
 	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)
82 82
 	{
83
-		$this->db				= $db;
84
-		$this->config			= $config;
83
+		$this->db = $db;
84
+		$this->config = $config;
85 85
 		$this->language			= $language;
86 86
 		$this->template			= $template;
87 87
 		$this->user				= $user;
88
-		$this->helper			= $helper;
89
-		$this->request			= $request;
88
+		$this->helper = $helper;
89
+		$this->request = $request;
90 90
 		$this->auth				= $auth;
91
-		$this->pagination		= $pagination;
92
-		$this->captcha_factory 	= $captcha_factory;
91
+		$this->pagination = $pagination;
92
+		$this->captcha_factory = $captcha_factory;
93 93
 		$this->categorie		= $categorie;
94 94
 		$this->comment			= $comment;
95 95
 		$this->root_path		= $root_path;
@@ -127,7 +127,7 @@  discard block
 block discarded – undo
127 127
 		}
128 128
 
129 129
 		$sql = 'SELECT *
130
-			FROM ' . $this->comments_table . '
130
+			FROM ' . $this->comments_table.'
131 131
 			WHERE comment_id = ' . (int) $comment_id;
132 132
 		$result = $this->db->sql_query($sql);
133 133
 		$value = $this->db->sql_fetchrow($result);
@@ -144,7 +144,7 @@  discard block
 block discarded – undo
144 144
 			$meta_info = $this->helper->route('ernadoo_phpbbdirectory_comment_view_controller', array('link_id' => (int) $link_id));
145 145
 			meta_refresh(3, $meta_info);
146 146
 			$message = $this->language->lang('DIR_COMMENT_DELETE_OK');
147
-			$message = $message . '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_COMMENT', '<a href="' . $meta_info . '">', '</a>');
147
+			$message = $message.'<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_COMMENT', '<a href="'.$meta_info.'">', '</a>');
148 148
 			return $this->helper->message($message);
149 149
 		}
150 150
 		else
@@ -166,7 +166,7 @@  discard block
 block discarded – undo
166 166
 		$this->_check_comments_enable($link_id);
167 167
 
168 168
 		$sql = 'SELECT *
169
-			FROM ' . $this->comments_table . '
169
+			FROM ' . $this->comments_table.'
170 170
 			WHERE comment_id = ' . (int) $comment_id;
171 171
 		$result = $this->db->sql_query($sql);
172 172
 		$value = $this->db->sql_fetchrow($result);
@@ -179,7 +179,7 @@  discard block
 block discarded – undo
179 179
 		$comment_text = generate_text_for_edit($value['comment_text'], $value['comment_uid'], $value['comment_flags']);
180 180
 		$this->s_comment = $comment_text['text'];
181 181
 
182
-		$submit	= $this->request->is_set_post('update_comment') ? true : false;
182
+		$submit = $this->request->is_set_post('update_comment') ? true : false;
183 183
 
184 184
 		// If form is done
185 185
 		if ($submit)
@@ -235,15 +235,15 @@  discard block
 block discarded – undo
235 235
 		$this->_check_comments_enable($link_id);
236 236
 
237 237
 		$comment_id = $this->request->variable('c', 0);
238
-		$view 		= $this->request->variable('view', '');
239
-		$start 		= ($page - 1) * $this->config['dir_comments_per_page'];
238
+		$view = $this->request->variable('view', '');
239
+		$start = ($page - 1) * $this->config['dir_comments_per_page'];
240 240
 
241 241
 		$this->s_hidden_fields = array_merge($this->s_hidden_fields, array('page' => $page));
242 242
 
243 243
 		$this->_populate_form($link_id, $mode);
244 244
 
245 245
 		$sql = 'SELECT COUNT(comment_id) AS nb_comments
246
-			FROM ' . $this->comments_table . '
246
+			FROM ' . $this->comments_table.'
247 247
 			WHERE comment_link_id = ' . (int) $link_id;
248 248
 		$result = $this->db->sql_query($sql);
249 249
 		$nb_comments = (int) $this->db->sql_fetchfield('nb_comments');
@@ -263,10 +263,10 @@  discard block
 block discarded – undo
263 263
 					),
264 264
 					array(
265 265
 						'FROM'	=> array(ZEBRA_TABLE => 'z'),
266
-						'ON'	=> 'z.user_id = ' . (int) $this->user->data['user_id'] . ' AND z.zebra_id = a.comment_user_id'
266
+						'ON'	=> 'z.user_id = '.(int) $this->user->data['user_id'].' AND z.zebra_id = a.comment_user_id'
267 267
 					)
268 268
 			),
269
-			'WHERE'		=> 'a.comment_link_id = ' . (int) $link_id,
269
+			'WHERE'		=> 'a.comment_link_id = '.(int) $link_id,
270 270
 			'ORDER_BY'	=> 'a.comment_date DESC');
271 271
 		$sql = $this->db->sql_build_query('SELECT', $sql_array);
272 272
 		$result = $this->db->sql_query_limit($sql, $this->config['dir_comments_per_page'], $start);
@@ -295,12 +295,12 @@  discard block
 block discarded – undo
295 295
 				'S_COMMENT'			=> generate_text_for_display($comments['comment_text'], $comments['comment_uid'], $comments['comment_bitfield'], $comments['comment_flags']),
296 296
 				'S_ID'				=> $comments['comment_id'],
297 297
 
298
-				'U_EDIT'			=> ($edit_allowed) 		? $this->helper->route('ernadoo_phpbbdirectory_comment_edit_controller', array('link_id' => (int) $link_id, 'comment_id' => (int) $comments['comment_id'])) : '',
299
-				'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())) : '',
298
+				'U_EDIT'			=> ($edit_allowed) ? $this->helper->route('ernadoo_phpbbdirectory_comment_edit_controller', array('link_id' => (int) $link_id, 'comment_id' => (int) $comments['comment_id'])) : '',
299
+				'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 300
 
301 301
 				'S_IGNORE_POST'		=> ($comments['foe'] && ($view != 'show' || $comment_id != $comments['comment_id'])) ? true : false,
302 302
 				'L_IGNORE_POST'		=> ($comments['foe']) ? $this->language->lang('POST_BY_FOE', get_username_string('full', $comments['comment_user_id'], $comments['username'], $comments['user_colour'])) : '',
303
-				'L_POST_DISPLAY'	=> ($comments['foe']) ? $this->language->lang('POST_DISPLAY', '<a class="display_post" data-post-id="' . $comments['comment_id'] . '" href="' . $this->helper->route('ernadoo_phpbbdirectory_comment_view_controller', array('link_id' => (int) $link_id, 'page' => $page)).'?c='.(int) $comments['comment_id'] . '&view=show#c'.(int) $comments['comment_id'].'">', '</a>') : '',
303
+				'L_POST_DISPLAY'	=> ($comments['foe']) ? $this->language->lang('POST_DISPLAY', '<a class="display_post" data-post-id="'.$comments['comment_id'].'" href="'.$this->helper->route('ernadoo_phpbbdirectory_comment_view_controller', array('link_id' => (int) $link_id, 'page' => $page)).'?c='.(int) $comments['comment_id'].'&view=show#c'.(int) $comments['comment_id'].'">', '</a>') : '',
304 304
 
305 305
 				'S_INFO'			=> $this->auth->acl_get('m_info'),
306 306
 			));
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
 
341 341
 		if (!function_exists('validate_data'))
342 342
 		{
343
-			include($this->root_path . 'includes/functions_user.' . $this->php_ext);
343
+			include($this->root_path.'includes/functions_user.'.$this->php_ext);
344 344
 		}
345 345
 
346 346
 		$error = validate_data(
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
 			$meta_info = $this->helper->route('ernadoo_phpbbdirectory_comment_view_controller', array('link_id' => (int) $link_id));
403 403
 			meta_refresh(3, $meta_info);
404 404
 			$message = $this->language->lang('DIR_'.strtoupper($mode).'_COMMENT_OK');
405
-			$message = $message . '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_COMMENT', '<a href="' . $meta_info . '">', '</a>');
405
+			$message = $message.'<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_COMMENT', '<a href="'.$meta_info.'">', '</a>');
406 406
 			return $this->helper->message($message);
407 407
 		}
408 408
 		else
@@ -425,7 +425,7 @@  discard block
 block discarded – undo
425 425
 	private function _check_comments_enable($link_id)
426 426
 	{
427 427
 		$sql = 'SELECT link_cat
428
-			FROM ' . $this->links_table . '
428
+			FROM ' . $this->links_table.'
429 429
 			WHERE link_id = ' . (int) $link_id;
430 430
 		$result = $this->db->sql_query($sql);
431 431
 		$cat_id = (int) $this->db->sql_fetchfield('link_cat');
@@ -469,11 +469,11 @@  discard block
 block discarded – undo
469 469
 
470 470
 		if (!function_exists('generate_smilies'))
471 471
 		{
472
-			include($this->root_path . 'includes/functions_posting.' . $this->php_ext);
472
+			include($this->root_path.'includes/functions_posting.'.$this->php_ext);
473 473
 		}
474 474
 		if (!function_exists('display_custom_bbcodes'))
475 475
 		{
476
-			include($this->root_path . 'includes/functions_display.' . $this->php_ext);
476
+			include($this->root_path.'includes/functions_display.'.$this->php_ext);
477 477
 		}
478 478
 
479 479
 		generate_smilies('inline', 0);
@@ -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.
controller/acp/validation.php 2 patches
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -84,21 +84,21 @@  discard block
 block discarded – undo
84 84
 	*/
85 85
 	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\link $link, $root_path, $php_ext)
86 86
 	{
87
-		$this->config		= $config;
88
-		$this->db			= $db;
89
-		$this->pagination	= $pagination;
87
+		$this->config = $config;
88
+		$this->db = $db;
89
+		$this->pagination = $pagination;
90 90
 		$this->language		= $language;
91 91
 		$this->phpbb_log	= $log;
92
-		$this->notification	= $notification;
93
-		$this->request		= $request;
92
+		$this->notification = $notification;
93
+		$this->request = $request;
94 94
 		$this->template		= $template;
95 95
 		$this->user			= $user;
96 96
 		$this->categorie	= $categorie;
97 97
 		$this->link			= $link;
98 98
 		$this->root_path	= $root_path;
99
-		$this->php_ext		= $php_ext;
99
+		$this->php_ext = $php_ext;
100 100
 
101
-		$this->action		= $this->request->variable('action', '');
101
+		$this->action = $this->request->variable('action', '');
102 102
 	}
103 103
 
104 104
 	/**
@@ -127,14 +127,14 @@  discard block
 block discarded – undo
127 127
 		global $phpbb_admin_path;
128 128
 
129 129
 		// Sort keys
130
-		$sort_days	= $this->request->variable('st', 0);
130
+		$sort_days = $this->request->variable('st', 0);
131 131
 		$sort_key	= $this->request->variable('sk', 't');
132 132
 		$sort_dir	= $this->request->variable('sd', 'd');
133 133
 
134 134
 		// Number of entries to display
135 135
 		$per_page = $this->request->variable('links_per_page', (int) $this->config['dir_show']);
136 136
 
137
-		$start	= $this->request->variable('start', 0);
137
+		$start = $this->request->variable('start', 0);
138 138
 
139 139
 		// Categorie ordering options
140 140
 		$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'));
@@ -150,15 +150,15 @@  discard block
 block discarded – undo
150 150
 
151 151
 		if (is_array($sort_by_sql[$sort_key]))
152 152
 		{
153
-			$sql_sort_order = implode(' ' . $direction . ', ', $sort_by_sql[$sort_key]) . ' ' . $direction;
153
+			$sql_sort_order = implode(' '.$direction.', ', $sort_by_sql[$sort_key]).' '.$direction;
154 154
 		}
155 155
 		else
156 156
 		{
157
-			$sql_sort_order = $sort_by_sql[$sort_key] . ' ' . $direction;
157
+			$sql_sort_order = $sort_by_sql[$sort_key].' '.$direction;
158 158
 		}
159 159
 
160 160
 		$sql = 'SELECT COUNT(1) AS total_links
161
-			FROM ' . $this->links_table . '
161
+			FROM ' . $this->links_table.'
162 162
 			WHERE link_active = 0' .
163 163
 				(($sql_where) ? " AND link_time >= $sql_where" : '');
164 164
 		$result = $this->db->sql_query($sql);
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 					'ON'	=> 'u.user_id = l.link_user_id'
183 183
 				)
184 184
 			),
185
-			'WHERE'		=> 'l.link_active = 0' . (($sql_where) ? " AND l.link_time >= $sql_where" : ''),
185
+			'WHERE'		=> 'l.link_active = 0'.(($sql_where) ? " AND l.link_time >= $sql_where" : ''),
186 186
 			'ORDER_BY'	=> $sql_sort_order);
187 187
 
188 188
 		$sql = $this->db->sql_build_query('SELECT', $sql_array);
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 
210 210
 		$option_ary = array('approved' => 'DIR_LINK_ACTIVATE', 'disapproved' => 'DIR_LINK_DELETE');
211 211
 
212
-		$base_url = $this->u_action . "&amp;$u_sort_param&amp;links_per_page=$per_page";
212
+		$base_url = $this->u_action."&amp;$u_sort_param&amp;links_per_page=$per_page";
213 213
 		$this->pagination->generate_template_pagination($base_url, 'pagination', 'start', $total_links, $per_page, $start);
214 214
 
215 215
 		$this->template->assign_vars(array(
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 			'S_SORT_DIR'		=> $s_sort_dir,
221 221
 			'LINKS_PER_PAGE'	=> $per_page,
222 222
 
223
-			'U_ACTION'			=> $this->u_action . "&amp;$u_sort_param&amp;links_per_page=$per_page&amp;start=$start",
223
+			'U_ACTION'			=> $this->u_action."&amp;$u_sort_param&amp;links_per_page=$per_page&amp;start=$start",
224 224
 		));
225 225
 	}
226 226
 
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 				return;
249 249
 		}
250 250
 
251
-		$this->phpbb_log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_LINK_' . strtoupper($this->action), time(), array(implode(', ', $this->affected_link_name)));
251
+		$this->phpbb_log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_LINK_'.strtoupper($this->action), time(), array(implode(', ', $this->affected_link_name)));
252 252
 	}
253 253
 
254 254
 	/**
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
 	{
261 261
 		if (!class_exists('messenger'))
262 262
 		{
263
-			include($this->root_path . 'includes/functions_messenger.' . $this->php_ext);
263
+			include($this->root_path.'includes/functions_messenger.'.$this->php_ext);
264 264
 		}
265 265
 		$messenger = new \messenger(false);
266 266
 
@@ -327,15 +327,15 @@  discard block
 block discarded – undo
327 327
 				'link_cat'		=> (int) $row['link_cat'],
328 328
 			);
329 329
 
330
-			$sql = 'UPDATE ' . $this->links_table . '
331
-							SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . '
330
+			$sql = 'UPDATE '.$this->links_table.'
331
+							SET ' . $this->db->sql_build_array('UPDATE', $sql_ary).'
332 332
 							WHERE link_id = ' . (int) $row['link_id'];
333 333
 			$this->db->sql_query($sql);
334 334
 		}
335 335
 
336 336
 		foreach ($this->cat_data as $cat_id => $count)
337 337
 		{
338
-			$sql = 'UPDATE ' . $this->categories_table . '
338
+			$sql = 'UPDATE '.$this->categories_table.'
339 339
 							SET cat_links = cat_links + '.$count.'
340 340
 							WHERE cat_id = ' . (int) $cat_id;
341 341
 			$this->db->sql_query($sql);
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
 				}
362 362
 			}
363 363
 
364
-			$sql = 'DELETE FROM ' . $this->links_table . ' WHERE link_id = ' . (int) $row['link_id'];
364
+			$sql = 'DELETE FROM '.$this->links_table.' WHERE link_id = '.(int) $row['link_id'];
365 365
 			$this->db->sql_query($sql);
366 366
 		}
367 367
 	}
Please login to merge, or discard this patch.
Indentation   +58 added lines, -58 removed lines patch added patch discarded remove patch
@@ -69,22 +69,22 @@  discard block
 block discarded – undo
69 69
 	private $links_data;
70 70
 
71 71
 	/**
72
-	* Constructor
73
-	*
74
-	* @param \phpbb\config\config								$config				Config object
75
-	* @param \phpbb\db\driver\driver_interface 					$db					Database object
76
-	* @param \phpbb\pagination									$pagination			Pagination object
77
-	* @param \phpbb\language\language							$language			Language object
78
-	* @param \phpbb\log\log										$log				Log object
79
-	* @param \phpbb\notification\manager						$notification		Notification 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\link					$link				PhpBB Directory extension link object
85
-	* @param string												$root_path			phpBB root path
86
-	* @param string												$php_ext   			phpEx
87
-	*/
72
+	 * Constructor
73
+	 *
74
+	 * @param \phpbb\config\config								$config				Config object
75
+	 * @param \phpbb\db\driver\driver_interface 					$db					Database object
76
+	 * @param \phpbb\pagination									$pagination			Pagination object
77
+	 * @param \phpbb\language\language							$language			Language object
78
+	 * @param \phpbb\log\log										$log				Log object
79
+	 * @param \phpbb\notification\manager						$notification		Notification 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\link					$link				PhpBB Directory extension link object
85
+	 * @param string												$root_path			phpBB root path
86
+	 * @param string												$php_ext   			phpEx
87
+	 */
88 88
 	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\link $link, $root_path, $php_ext)
89 89
 	{
90 90
 		$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	array $mark Website selected for (dis)approval
376
-	* @return	null
377
-	*/
373
+	 * Get informations about links selected
374
+	 *
375
+	 * @param	array $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	array $row Informations about website
415
-	* @return	null
416
-	*/
412
+	 * Notify users which watch categories
413
+	 *
414
+	 * @param	array $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.
controller/acp/main.php 2 patches
Indentation   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -30,13 +30,13 @@  discard block
 block discarded – undo
30 30
 	protected $u_action;
31 31
 
32 32
 	/**
33
-	* Constructor
34
-	*
35
-	* @param \phpbb\db\driver\driver_interface 		$db			Database object
36
-	* @param \phpbb\language\language				$language	Language object
37
-	* @param \phpbb\request\request					$request	Request object
38
-	* @param \phpbb\template\template				$template	Template object
39
-	*/
33
+	 * Constructor
34
+	 *
35
+	 * @param \phpbb\db\driver\driver_interface 		$db			Database object
36
+	 * @param \phpbb\language\language				$language	Language object
37
+	 * @param \phpbb\request\request					$request	Request object
38
+	 * @param \phpbb\template\template				$template	Template object
39
+	 */
40 40
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\language\language $language, \phpbb\request\request $request, \phpbb\template\template $template)
41 41
 	{
42 42
 		$this->db			= $db;
@@ -46,11 +46,11 @@  discard block
 block discarded – undo
46 46
 	}
47 47
 
48 48
 	/**
49
-	* Display confirm box
50
-	*
51
-	* @param	string $action Requested action
52
-	* @return	null
53
-	*/
49
+	 * Display confirm box
50
+	 *
51
+	 * @param	string $action Requested action
52
+	 * @return	null
53
+	 */
54 54
 	public function display_confirm($action)
55 55
 	{
56 56
 		switch ($action)
@@ -88,10 +88,10 @@  discard block
 block discarded – undo
88 88
 	}
89 89
 
90 90
 	/**
91
-	* Display phpBB Directory statistics
92
-	*
93
-	* @return null
94
-	*/
91
+	 * Display phpBB Directory statistics
92
+	 *
93
+	 * @return null
94
+	 */
95 95
 	public function display_stats()
96 96
 	{
97 97
 		// Count number of categories
@@ -178,11 +178,11 @@  discard block
 block discarded – undo
178 178
 	}
179 179
 
180 180
 	/**
181
-	* Execute action requested
182
-	*
183
-	* @param	string $action Requested action
184
-	* @return	null
185
-	*/
181
+	 * Execute action requested
182
+	 *
183
+	 * @param	string $action Requested action
184
+	 * @return	null
185
+	 */
186 186
 	public function exec_action($action)
187 187
 	{
188 188
 		switch ($action)
@@ -257,23 +257,23 @@  discard block
 block discarded – undo
257 257
 	}
258 258
 
259 259
 	/**
260
-	* Set page url
261
-	*
262
-	* @param	string $u_action Custom form action
263
-	* @return	null
264
-	* @access	public
265
-	*/
260
+	 * Set page url
261
+	 *
262
+	 * @param	string $u_action Custom form action
263
+	 * @return	null
264
+	 * @access	public
265
+	 */
266 266
 	public function set_page_url($u_action)
267 267
 	{
268 268
 		$this->u_action = $u_action;
269 269
 	}
270 270
 
271 271
 	/**
272
-	* Get orphan banners
273
-	*
274
-	* @param	bool		$delete	True if we want to delete banners, else false
275
-	* @return	null|int	Number of orphan files, else null
276
-	*/
272
+	 * Get orphan banners
273
+	 *
274
+	 * @param	bool		$delete	True if we want to delete banners, else false
275
+	 * @return	null|int	Number of orphan files, else null
276
+	 */
277 277
 	private function _orphan_files($delete = false)
278 278
 	{
279 279
 		$banner_path = $this->get_banner_path();
Please login to merge, or discard this patch.
Spacing   +11 added lines, -11 removed lines patch added patch discarded remove patch
@@ -39,10 +39,10 @@  discard block
 block discarded – undo
39 39
 	*/
40 40
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\language\language $language, \phpbb\request\request $request, \phpbb\template\template $template)
41 41
 	{
42
-		$this->db			= $db;
42
+		$this->db = $db;
43 43
 		$this->language		= $language;
44 44
 		$this->template		= $template;
45
-		$this->request		= $request;
45
+		$this->request = $request;
46 46
 	}
47 47
 
48 48
 	/**
@@ -148,7 +148,7 @@  discard block
 block discarded – undo
148 148
 			{
149 149
 				if ($file[0] != '.' && $file[0] != '..' && strpos($file, 'index.') === false && strpos($file, '.db') === false)
150 150
 				{
151
-					$banners_dir_size += filesize($banners_path . $file);
151
+					$banners_dir_size += filesize($banners_path.$file);
152 152
 				}
153 153
 			}
154 154
 			closedir($banners_dir);
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 			'U_ACTION'			=> $this->u_action,
168 168
 
169 169
 			'TOTAL_CATS'		=> $total_cats,
170
-			'TOTAL_LINKS'		=> $total_links-$waiting_links,
170
+			'TOTAL_LINKS'		=> $total_links - $waiting_links,
171 171
 			'WAITING_LINKS'		=> $waiting_links,
172 172
 			'TOTAL_COMMENTS'	=> $total_comments,
173 173
 			'TOTAL_VOTES'		=> $total_votes,
@@ -188,9 +188,9 @@  discard block
 block discarded – undo
188 188
 		switch ($action)
189 189
 		{
190 190
 			case 'votes':
191
-				$this->db->sql_query('DELETE FROM ' . $this->votes_table);
191
+				$this->db->sql_query('DELETE FROM '.$this->votes_table);
192 192
 
193
-				$sql = 'UPDATE ' . $this->links_table . '
193
+				$sql = 'UPDATE '.$this->links_table.'
194 194
 					SET link_vote = 0, link_note = 0';
195 195
 				$this->db->sql_query($sql);
196 196
 
@@ -205,15 +205,15 @@  discard block
 block discarded – undo
205 205
 				{
206 206
 					case 'sqlite':
207 207
 					case 'firebird':
208
-						$this->db->sql_query('DELETE FROM ' . $this->comments_table);
208
+						$this->db->sql_query('DELETE FROM '.$this->comments_table);
209 209
 					break;
210 210
 
211 211
 					default:
212
-						$this->db->sql_query('TRUNCATE TABLE ' . $this->comments_table);
212
+						$this->db->sql_query('TRUNCATE TABLE '.$this->comments_table);
213 213
 					break;
214 214
 				}
215 215
 
216
-				$sql = 'UPDATE ' . $this->links_table . '
216
+				$sql = 'UPDATE '.$this->links_table.'
217 217
 					SET link_comment = 0';
218 218
 				$this->db->sql_query($sql);
219 219
 
@@ -225,7 +225,7 @@  discard block
 block discarded – undo
225 225
 				break;
226 226
 
227 227
 			case 'clicks':
228
-				$sql = 'UPDATE ' . $this->links_table . '
228
+				$sql = 'UPDATE '.$this->links_table.'
229 229
 					SET link_view = 0';
230 230
 				$this->db->sql_query($sql);
231 231
 
@@ -279,7 +279,7 @@  discard block
 block discarded – undo
279 279
 			{
280 280
 				$physical_files[] = $img;
281 281
 			}
282
-			$sql = 'SELECT link_banner FROM ' . $this->links_table . "
282
+			$sql = 'SELECT link_banner FROM '.$this->links_table."
283 283
 				WHERE link_banner <> ''";
284 284
 			$result = $this->db->sql_query($sql);
285 285
 
Please login to merge, or discard this patch.
core/nestedset_category.php 1 patch
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -13,12 +13,12 @@
 block discarded – undo
13 13
 class nestedset_category extends \phpbb\tree\nestedset
14 14
 {
15 15
 	/**
16
-	* Construct
17
-	*
18
-	* @param \phpbb\db\driver\driver_interface	$db					Database connection
19
-	* @param \phpbb\lock\db						$lock				Lock class used to lock the table when moving forums around
20
-	* @param string								$categorie_table	Categories table
21
-	*/
16
+	 * Construct
17
+	 *
18
+	 * @param \phpbb\db\driver\driver_interface	$db					Database connection
19
+	 * @param \phpbb\lock\db						$lock				Lock class used to lock the table when moving forums around
20
+	 * @param string								$categorie_table	Categories table
21
+	 */
22 22
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\lock\db $lock, $categorie_table)
23 23
 	{
24 24
 		parent::__construct(
Please login to merge, or discard this patch.
core/comment.php 2 patches
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
 	*/
29 29
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\language\language $language)
30 30
 	{
31
-		$this->db		= $db;
32
-		$this->language	= $language;
31
+		$this->db = $db;
32
+		$this->language = $language;
33 33
 	}
34 34
 
35 35
 	/**
@@ -42,10 +42,10 @@  discard block
 block discarded – undo
42 42
 	{
43 43
 		$this->db->sql_transaction('begin');
44 44
 
45
-		$sql = 'INSERT INTO ' . $this->comments_table . ' ' . $this->db->sql_build_array('INSERT', $data);
45
+		$sql = 'INSERT INTO '.$this->comments_table.' '.$this->db->sql_build_array('INSERT', $data);
46 46
 		$this->db->sql_query($sql);
47 47
 
48
-		$sql = 'UPDATE ' . $this->links_table . '
48
+		$sql = 'UPDATE '.$this->links_table.'
49 49
 			SET link_comment = link_comment + 1
50 50
 			WHERE link_id = ' . (int) $data['comment_link_id'];
51 51
 		$this->db->sql_query($sql);
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
 	*/
63 63
 	public function edit($data, $comment_id)
64 64
 	{
65
-		$sql = 'UPDATE ' . $this->comments_table . '
66
-			SET ' . $this->db->sql_build_array('UPDATE', $data) . '
65
+		$sql = 'UPDATE '.$this->comments_table.'
66
+			SET ' . $this->db->sql_build_array('UPDATE', $data).'
67 67
 			WHERE comment_id = ' . (int) $comment_id;
68 68
 		$this->db->sql_query($sql);
69 69
 	}
@@ -81,10 +81,10 @@  discard block
 block discarded – undo
81 81
 
82 82
 		$this->db->sql_transaction('begin');
83 83
 
84
-		$sql = 'DELETE FROM ' . $this->comments_table . ' WHERE comment_id = ' . (int) $comment_id;
84
+		$sql = 'DELETE FROM '.$this->comments_table.' WHERE comment_id = '.(int) $comment_id;
85 85
 		$this->db->sql_query($sql);
86 86
 
87
-		$sql = 'UPDATE ' . $this->links_table . '
87
+		$sql = 'UPDATE '.$this->links_table.'
88 88
 			SET link_comment = link_comment - 1
89 89
 			WHERE link_id = ' . (int) $link_id;
90 90
 		$this->db->sql_query($sql);
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 		if ($request->is_ajax())
95 95
 		{
96 96
 			$sql = 'SELECT COUNT(comment_id) AS nb_comments
97
-				FROM ' . $this->comments_table . '
97
+				FROM ' . $this->comments_table.'
98 98
 				WHERE comment_link_id = ' . (int) $link_id;
99 99
 			$result = $this->db->sql_query($sql);
100 100
 			$nb_comments = (int) $this->db->sql_fetchfield('nb_comments');
Please login to merge, or discard this patch.
Indentation   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -21,11 +21,11 @@  discard block
 block discarded – undo
21 21
 	protected $language;
22 22
 
23 23
 	/**
24
-	* Constructor
25
-	*
26
-	* @param \phpbb\db\driver\driver_interface	$db			Database object
27
-	* @param \phpbb\language\language			$language	Language object
28
-	*/
24
+	 * Constructor
25
+	 *
26
+	 * @param \phpbb\db\driver\driver_interface	$db			Database object
27
+	 * @param \phpbb\language\language			$language	Language object
28
+	 */
29 29
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\language\language $language)
30 30
 	{
31 31
 		$this->db		= $db;
@@ -33,11 +33,11 @@  discard block
 block discarded – undo
33 33
 	}
34 34
 
35 35
 	/**
36
-	* Add a comment
37
-	*
38
-	* @param	array	$data	Link's data from db
39
-	* @return	null
40
-	*/
36
+	 * Add a comment
37
+	 *
38
+	 * @param	array	$data	Link's data from db
39
+	 * @return	null
40
+	 */
41 41
 	public function add($data)
42 42
 	{
43 43
 		$this->db->sql_transaction('begin');
@@ -54,12 +54,12 @@  discard block
 block discarded – undo
54 54
 	}
55 55
 
56 56
 	/**
57
-	* Edit a comment
58
-	*
59
-	* @param	array	$data		Data to edit
60
-	* @param	int		$comment_id	The comment ID
61
-	* @return	null
62
-	*/
57
+	 * Edit a comment
58
+	 *
59
+	 * @param	array	$data		Data to edit
60
+	 * @param	int		$comment_id	The comment ID
61
+	 * @return	null
62
+	 */
63 63
 	public function edit($data, $comment_id)
64 64
 	{
65 65
 		$sql = 'UPDATE ' . $this->comments_table . '
@@ -69,12 +69,12 @@  discard block
 block discarded – undo
69 69
 	}
70 70
 
71 71
 	/**
72
-	* Delete a comment
73
-	*
74
-	* @param	string	$link_id	The link ID
75
-	* @param	string	$comment_id	The comment ID
76
-	* @return	null
77
-	*/
72
+	 * Delete a comment
73
+	 *
74
+	 * @param	string	$link_id	The link ID
75
+	 * @param	string	$comment_id	The comment ID
76
+	 * @return	null
77
+	 */
78 78
 	public function del($link_id, $comment_id)
79 79
 	{
80 80
 		global $request;
Please login to merge, or discard this patch.