Completed
Push — 3.2.x ( 251c16...701b08 )
by Erwan
02:32
created
notification/type/directory_website_approved.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@
 block discarded – undo
157 157
 	*/
158 158
 	public function get_url()
159 159
 	{
160
-		return $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $this->get_data('cat_id'));
160
+		return $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$this->get_data('cat_id'));
161 161
 	}
162 162
 
163 163
 	/**
Please login to merge, or discard this patch.
notification/type/directory_website.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -122,9 +122,9 @@  discard block
 block discarded – undo
122 122
 		$users = array();
123 123
 
124 124
 		$sql = 'SELECT user_id
125
-			FROM ' . $this->watch_table . '
126
-			WHERE cat_id = ' . (int) $data['cat_id'] . '
127
-				AND notify_status = ' . NOTIFY_YES . '
125
+			FROM ' . $this->watch_table.'
126
+			WHERE cat_id = ' . (int) $data['cat_id'].'
127
+				AND notify_status = ' . NOTIFY_YES.'
128 128
 				AND user_id <> ' . (int) $data['user_from'];
129 129
 		$result = $this->db->sql_query($sql);
130 130
 		while ($row = $this->db->sql_fetchrow($result))
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 	*/
201 201
 	public function get_url()
202 202
 	{
203
-		return $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $this->get_data('cat_id'));
203
+		return $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$this->get_data('cat_id'));
204 204
 	}
205 205
 
206 206
 	/**
Please login to merge, or discard this patch.
controller/links.php 1 patch
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -87,19 +87,19 @@  discard block
 block discarded – undo
87 87
 	*/
88 88
 	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\captcha\factory $captcha_factory, \ernadoo\phpbbdirectory\core\categorie $categorie, \ernadoo\phpbbdirectory\core\link $link, $root_path, $php_ext)
89 89
 	{
90
-		$this->db				= $db;
91
-		$this->config			= $config;
90
+		$this->db = $db;
91
+		$this->config = $config;
92 92
 		$this->language			= $language;
93 93
 		$this->template			= $template;
94 94
 		$this->user				= $user;
95
-		$this->helper			= $helper;
96
-		$this->request			= $request;
95
+		$this->helper = $helper;
96
+		$this->request = $request;
97 97
 		$this->auth				= $auth;
98
-		$this->captcha_factory 	= $captcha_factory;
98
+		$this->captcha_factory = $captcha_factory;
99 99
 		$this->categorie		= $categorie;
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 104
 		$language->add_lang('directory', 'ernadoo/phpbbdirectory');
105 105
 
@@ -119,12 +119,12 @@  discard block
 block discarded – undo
119 119
 	{
120 120
 		if ($this->request->is_set_post('cancel'))
121 121
 		{
122
-			$redirect = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $cat_id);
122
+			$redirect = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$cat_id);
123 123
 			redirect($redirect);
124 124
 		}
125 125
 
126 126
 		$sql = 'SELECT link_user_id
127
-			FROM ' . $this->links_table . '
127
+			FROM ' . $this->links_table.'
128 128
 			WHERE link_id = ' . (int) $link_id;
129 129
 		$result = $this->db->sql_query($sql);
130 130
 		$link_data = $this->db->sql_fetchrow($result);
@@ -145,9 +145,9 @@  discard block
 block discarded – undo
145 145
 		{
146 146
 			$this->link->del($cat_id, $link_id);
147 147
 
148
-			$meta_info = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $cat_id);
148
+			$meta_info = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$cat_id);
149 149
 			meta_refresh(3, $meta_info);
150
-			$message = $this->language->lang('DIR_DELETE_OK') . '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_DIR', '<a href="' . $this->helper->route('ernadoo_phpbbdirectory_base_controller') . '">', '</a>') . '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="' . $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $cat_id) . '">', '</a>');
150
+			$message = $this->language->lang('DIR_DELETE_OK').'<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_DIR', '<a href="'.$this->helper->route('ernadoo_phpbbdirectory_base_controller').'">', '</a>').'<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="'.$this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$cat_id).'">', '</a>');
151 151
 			return $this->helper->message($message);
152 152
 		}
153 153
 		else
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 	public function edit_link($cat_id, $link_id)
168 168
 	{
169 169
 		$sql = 'SELECT link_user_id
170
-			FROM ' . $this->links_table . '
170
+			FROM ' . $this->links_table.'
171 171
 			WHERE link_id = ' . (int) $link_id;
172 172
 		$result = $this->db->sql_query($sql);
173 173
 		$link_data = $this->db->sql_fetchrow($result);
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 		$cat_id		= $this->request->variable('id', $cat_id);
184 184
 		$submit		= $this->request->is_set_post('submit') ? true : false;
185 185
 		$refresh	= $this->request->is_set_post('refresh_vc') ? true : false;
186
-		$title		= $this->language->lang('DIR_EDIT_SITE');
186
+		$title = $this->language->lang('DIR_EDIT_SITE');
187 187
 
188 188
 		$this->template->assign_block_vars('dir_navlinks', array(
189 189
 			'FORUM_NAME'	=> $title,
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 		else
204 204
 		{
205 205
 			$sql = 'SELECT link_id, link_uid, link_flags, link_bitfield, link_cat, link_url, link_description, link_guest_email, link_name, link_rss, link_back, link_banner, link_flag, link_cat, link_time
206
-				FROM ' . $this->links_table . '
206
+				FROM ' . $this->links_table.'
207 207
 				WHERE link_id = ' . (int) $link_id;
208 208
 			$result = $this->db->sql_query($sql);
209 209
 
@@ -219,15 +219,15 @@  discard block
 block discarded – undo
219 219
 				'old_banner'	=> $site['link_banner'],
220 220
 			);
221 221
 
222
-			$site_description		= generate_text_for_edit($site['link_description'], $site['link_uid'], $site['link_flags']);
223
-			$site['link_banner'] 	= (preg_match('/^(http:\/\/|https:\/\/|ftp:\/\/|ftps:\/\/|www\.).+/si', $site['link_banner'])) ? $site['link_banner'] : '';
222
+			$site_description = generate_text_for_edit($site['link_description'], $site['link_uid'], $site['link_flags']);
223
+			$site['link_banner'] = (preg_match('/^(http:\/\/|https:\/\/|ftp:\/\/|ftps:\/\/|www\.).+/si', $site['link_banner'])) ? $site['link_banner'] : '';
224 224
 
225
-			$this->url			= $site['link_url'];
226
-			$this->site_name	= $site['link_name'];
225
+			$this->url = $site['link_url'];
226
+			$this->site_name = $site['link_name'];
227 227
 			$this->description	= $site_description['text'];
228 228
 			$this->guest_email	= $site['link_guest_email'];
229
-			$this->rss			= $site['link_rss'];
230
-			$this->banner 		= $site['link_banner'];
229
+			$this->rss = $site['link_rss'];
230
+			$this->banner = $site['link_banner'];
231 231
 			$this->back			= $site['link_back'];
232 232
 			$this->flag 		= $site['link_flag'];
233 233
 		}
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 		$cat_id		= $this->request->variable('id', $cat_id);
255 255
 		$submit		= $this->request->is_set_post('submit') ? true : false;
256 256
 		$refresh	= $this->request->is_set_post('refresh_vc') ? true : false;
257
-		$title		= $this->language->lang('DIR_NEW_SITE');
257
+		$title = $this->language->lang('DIR_NEW_SITE');
258 258
 
259 259
 		$this->template->assign_block_vars('dir_navlinks', array(
260 260
 			'FORUM_NAME'	=> $title,
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
 
319 319
 		// We check if user had already vot for this website.
320 320
 		$sql = 'SELECT vote_link_id
321
-			FROM ' . $this->votes_table . '
321
+			FROM ' . $this->votes_table.'
322 322
 			WHERE ' . $this->db->sql_build_array('SELECT', $data);
323 323
 		$result = $this->db->sql_query($sql);
324 324
 		$data = $this->db->sql_fetchrow($result);
@@ -330,9 +330,9 @@  discard block
 block discarded – undo
330 330
 
331 331
 		$this->link->add_vote($link_id);
332 332
 
333
-		$meta_info = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $cat_id);
333
+		$meta_info = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$cat_id);
334 334
 		meta_refresh(3, $meta_info);
335
-		$message = $this->language->lang('DIR_VOTE_OK') . '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="' . $meta_info . '">', '</a>');
335
+		$message = $this->language->lang('DIR_VOTE_OK').'<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="'.$meta_info.'">', '</a>');
336 336
 		return $this->helper->message($message);
337 337
 	}
338 338
 
@@ -357,18 +357,18 @@  discard block
 block discarded – undo
357 357
 			return $this->helper->message('FORM_INVALID');
358 358
 		}
359 359
 
360
-		$this->url			= $this->request->variable('url', '');
361
-		$this->site_name	= $this->request->variable('site_name', '', true);
360
+		$this->url = $this->request->variable('url', '');
361
+		$this->site_name = $this->request->variable('site_name', '', true);
362 362
 		$this->description	= $this->request->variable('description', '', true);
363 363
 		$this->guest_email	= $this->request->variable('guest_email', '');
364
-		$this->rss			= $this->request->variable('rss', '');
365
-		$this->banner 		= $this->request->variable('banner', '');
364
+		$this->rss = $this->request->variable('rss', '');
365
+		$this->banner = $this->request->variable('banner', '');
366 366
 		$this->back			= $this->request->variable('back', '');
367 367
 		$this->flag 		= $this->request->variable('flag', '');
368 368
 
369 369
 		if (!function_exists('validate_data'))
370 370
 		{
371
-			include($this->root_path . 'includes/functions_user.' . $this->php_ext);
371
+			include($this->root_path.'includes/functions_user.'.$this->php_ext);
372 372
 		}
373 373
 
374 374
 		// We define variables to check
@@ -391,17 +391,17 @@  discard block
 block discarded – undo
391 391
 			'site_name' =>			array(
392 392
 				array('string', false, 1, 100)),
393 393
 			'website'		=>		array(
394
-				array('string',	false, 12, 255),
395
-				array('match',	true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')),
394
+				array('string', false, 12, 255),
395
+				array('match', true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')),
396 396
 			'description'	=>		array(
397 397
 				array('string', !$this->categorie->data['cat_must_describe'], 1, $this->config['dir_length_describe'])),
398 398
 			'rss'			=>		array(
399 399
 				array('string', true, 12, 255),
400
-				array('match',	empty($this->rss), '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')),
400
+				array('match', empty($this->rss), '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')),
401 401
 			'banner'		=>		array(
402 402
 				array('string', true, 5, 255)),
403 403
 			'back'			=>		array(
404
-				array('string',	!$this->categorie->data['cat_link_back'], 12, 255),
404
+				array('string', !$this->categorie->data['cat_link_back'], 12, 255),
405 405
 				array(array($this->link, 'link_back'), true)),
406 406
 			'cat'			=>		array(
407 407
 				array('num', '', 1))
@@ -450,8 +450,8 @@  discard block
 block discarded – undo
450 450
 		// Still no errors?? So let's go!
451 451
 		if (!$error)
452 452
 		{
453
-			$this->banner	= (!$this->banner && !$this->request->is_set_post('delete_banner')) ? $this->request->variable('old_banner', '') : $this->banner;
454
-			$this->url		= $this->link->clean_url($this->url);
453
+			$this->banner = (!$this->banner && !$this->request->is_set_post('delete_banner')) ? $this->request->variable('old_banner', '') : $this->banner;
454
+			$this->url = $this->link->clean_url($this->url);
455 455
 
456 456
 			$data_edit = array(
457 457
 				'link_user_id'		=> $this->link_user_id,
@@ -497,10 +497,10 @@  discard block
 block discarded – undo
497 497
 				$this->link->add($data_add, $need_approval);
498 498
 			}
499 499
 
500
-			$meta_info = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $cat_id);
500
+			$meta_info = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$cat_id);
501 501
 			meta_refresh(3, $meta_info);
502 502
 			$message	= ($need_approval) ? $this->language->lang('DIR_'.strtoupper($mode).'_SITE_ACTIVE') : $this->language->lang('DIR_'.strtoupper($mode).'_SITE_OK');
503
-			$message	= $message . '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_DIR', '<a href="' . $this->helper->route('ernadoo_phpbbdirectory_base_controller') . '">', '</a>') . '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="' . $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $cat_id) . '">', '</a>');
503
+			$message	= $message.'<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_DIR', '<a href="'.$this->helper->route('ernadoo_phpbbdirectory_base_controller').'">', '</a>').'<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="'.$this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$cat_id).'">', '</a>');
504 504
 			return $this->helper->message($message);
505 505
 		}
506 506
 		else
@@ -529,7 +529,7 @@  discard block
 block discarded – undo
529 529
 	{
530 530
 		if (!function_exists('file_gc'))
531 531
 		{
532
-			include($this->root_path . 'includes/functions_download.' . $this->php_ext);
532
+			include($this->root_path.'includes/functions_download.'.$this->php_ext);
533 533
 		}
534 534
 
535 535
 		$file_path = $this->get_banner_path($banner_img);
@@ -584,7 +584,7 @@  discard block
 block discarded – undo
584 584
 
585 585
 		if (!function_exists('display_custom_bbcodes'))
586 586
 		{
587
-			include($this->root_path . 'includes/functions_display.' . $this->php_ext);
587
+			include($this->root_path.'includes/functions_display.'.$this->php_ext);
588 588
 		}
589 589
 		display_custom_bbcodes();
590 590
 		add_form_key('dir_form');
@@ -593,17 +593,17 @@  discard block
 block discarded – undo
593 593
 		$flag_path = $ext_path.'images/flags/';
594 594
 
595 595
 		$s_guest	= (!$this->user->data['is_registered'] || !empty($this->guest_email));
596
-		$s_rss		= $this->config['dir_activ_rss'];
597
-		$s_banner	= $this->config['dir_activ_banner'];
596
+		$s_rss = $this->config['dir_activ_rss'];
597
+		$s_banner = $this->config['dir_activ_banner'];
598 598
 		$s_back		= $this->categorie->data['cat_link_back'];
599 599
 		$s_flag		= $this->config['dir_activ_flag'];
600 600
 
601 601
 		$this->template->assign_vars(array(
602
-			'BBCODE_STATUS'			=> ($this->config['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>'),
603
-			'IMG_STATUS'			=> ($this->config['allow_bbcode'])	? $this->language->lang('IMAGES_ARE_ON') : $this->language->lang('IMAGES_ARE_OFF'),
602
+			'BBCODE_STATUS'			=> ($this->config['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>'),
603
+			'IMG_STATUS'			=> ($this->config['allow_bbcode']) ? $this->language->lang('IMAGES_ARE_ON') : $this->language->lang('IMAGES_ARE_OFF'),
604 604
 			'SMILIES_STATUS'		=> ($this->config['allow_smilies']) ? $this->language->lang('SMILIES_ARE_ON') : $this->language->lang('SMILIES_ARE_OFF'),
605 605
 			'URL_STATUS'			=> ($this->config['allow_post_links']) ? $this->language->lang('URL_IS_ON') : $this->language->lang('URL_IS_OFF'),
606
-			'FLASH_STATUS'			=> ($this->config['allow_bbcode'] && $this->config['allow_post_flash'])	? $this->language->lang('FLASH_IS_ON') : $this->language->lang('FLASH_IS_OFF'),
606
+			'FLASH_STATUS'			=> ($this->config['allow_bbcode'] && $this->config['allow_post_flash']) ? $this->language->lang('FLASH_IS_ON') : $this->language->lang('FLASH_IS_OFF'),
607 607
 
608 608
 			'L_TITLE'				=> $title,
609 609
 			'L_DIR_DESCRIPTION_EXP'	=> $this->language->lang('DIR_DESCRIPTION_EXP', $this->config['dir_length_describe']),
Please login to merge, or discard this patch.
core/categorie.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -60,13 +60,13 @@  discard block
 block discarded – undo
60 60
 	*/
61 61
 	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\cron\manager $cron)
62 62
 	{
63
-		$this->db			= $db;
64
-		$this->config		= $config;
63
+		$this->db = $db;
64
+		$this->config = $config;
65 65
 		$this->language		= $language;
66 66
 		$this->template		= $template;
67 67
 		$this->user			= $user;
68
-		$this->helper		= $helper;
69
-		$this->request		= $request;
68
+		$this->helper = $helper;
69
+		$this->request = $request;
70 70
 		$this->auth			= $auth;
71 71
 		$this->cron 		= $cron;
72 72
 	}
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 	public function make_cat_jumpbox()
91 91
 	{
92 92
 		$sql = 'SELECT cat_id, cat_name, parent_id, left_id, right_id
93
-			FROM ' . $this->categories_table . '
93
+			FROM ' . $this->categories_table.'
94 94
 			ORDER BY left_id ASC';
95 95
 		$result = $this->db->sql_query($sql, 600);
96 96
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 				'FORUM_ID'		=> $row['cat_id'],
120 120
 				'FORUM_NAME'	=> $row['cat_name'],
121 121
 				'S_FORUM_COUNT'	=> $iteration,
122
-				'LINK'			=> $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $row['cat_id']),
122
+				'LINK'			=> $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$row['cat_id']),
123 123
 			));
124 124
 
125 125
 			for ($i = 0; $i < $padding; $i++)
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 
152 152
 		// This query is identical to the jumpbox one
153 153
 		$sql = 'SELECT cat_id, cat_name, parent_id, left_id, right_id
154
-			FROM ' . $this->categories_table . '
154
+			FROM ' . $this->categories_table.'
155 155
 			ORDER BY left_id ASC';
156 156
 		$result = $this->db->sql_query($sql, 600);
157 157
 
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 			}
182 182
 
183 183
 			$selected = (($row['cat_id'] == $select_id) ? ' selected="selected"' : '');
184
-			$cat_list .= '<option value="' . $row['cat_id'] . '"' . (($disabled) ? ' disabled="disabled" class="disabled-option"' : $selected) . '>' . $padding . $row['cat_name'] . '</option>';
184
+			$cat_list .= '<option value="'.$row['cat_id'].'"'.(($disabled) ? ' disabled="disabled" class="disabled-option"' : $selected).'>'.$padding.$row['cat_name'].'</option>';
185 185
 		}
186 186
 		$this->db->sql_freeresult($result);
187 187
 		unset($padding_store);
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 	*/
197 197
 	public function display()
198 198
 	{
199
-		$cat_rows	= $subcats = array();
199
+		$cat_rows = $subcats = array();
200 200
 		$parent_id	= $visible_cats = 0;
201 201
 
202 202
 		$sql_array = array(
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 		else
215 215
 		{
216 216
 			$root_data = $this->data;
217
-			$sql_where = 'left_id > ' . $root_data['left_id'] . ' AND left_id < ' . $root_data['right_id'];
217
+			$sql_where = 'left_id > '.$root_data['left_id'].' AND left_id < '.$root_data['right_id'];
218 218
 		}
219 219
 
220 220
 		$sql = $this->db->sql_build_query('SELECT', array(
@@ -261,12 +261,12 @@  discard block
 block discarded – undo
261 261
 			{
262 262
 				foreach ($subcats[$dir_cat_id] as $subcat_id => $subcat_row)
263 263
 				{
264
-					$row['cat_links'] = ($row['cat_count_all']) ? ($row['cat_links']+$subcat_row['links']) : $row['cat_links'];
264
+					$row['cat_links'] = ($row['cat_count_all']) ? ($row['cat_links'] + $subcat_row['links']) : $row['cat_links'];
265 265
 
266 266
 					if ($subcat_row['display'] && $subcat_row['parent_id'] == $dir_cat_id)
267 267
 					{
268 268
 						$subcats_list[] = array(
269
-							'link'		=> $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $subcat_id),
269
+							'link'		=> $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$subcat_id),
270 270
 							'name'		=> $subcat_row['name'],
271 271
 							'links'		=> $subcat_row['links']
272 272
 						);
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
 				'CAT_LINKS'				=> $row['cat_links'],
285 285
 				'CAT_IMG'				=> $this->get_img_path('icons', $row['cat_icon']),
286 286
 
287
-				'U_CAT'					=> $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $row['cat_id']),
287
+				'U_CAT'					=> $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$row['cat_id']),
288 288
 			));
289 289
 
290 290
 			// Assign subcats loop for style authors
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
 			if ($task->is_ready())
317 317
 			{
318 318
 				$url = $task->get_url();
319
-				$this->template->assign_var('RUN_CRON_TASK', '<img src="' . $url . '" width="1" height="1" alt="" />');
319
+				$this->template->assign_var('RUN_CRON_TASK', '<img src="'.$url.'" width="1" height="1" alt="" />');
320 320
 			}
321 321
 		}
322 322
 	}
@@ -338,10 +338,10 @@  discard block
 block discarded – undo
338 338
 				'LEFT_JOIN'	=> array(
339 339
 						array(
340 340
 							'FROM'	=> array($this->watch_table	=> 'w'),
341
-							'ON'	=> 'c.cat_id = w.cat_id AND w.user_id = ' . (int) $this->user->data['user_id']
341
+							'ON'	=> 'c.cat_id = w.cat_id AND w.user_id = '.(int) $this->user->data['user_id']
342 342
 						),
343 343
 				),
344
-				'WHERE'		=> 'c.cat_id = ' . (int) $cat_id
344
+				'WHERE'		=> 'c.cat_id = '.(int) $cat_id
345 345
 			);
346 346
 			$sql = $this->db->sql_build_query('SELECT', $sql_array);
347 347
 			$result = $this->db->sql_query($sql);
@@ -378,8 +378,8 @@  discard block
 block discarded – undo
378 378
 				$this->template->assign_block_vars('dir_navlinks', array(
379 379
 					'FORUM_NAME'	=> $parent_data['cat_name'],
380 380
 					'FORUM_ID'		=> $parent_cat_id,
381
-					'MICRODATA'		=> $microdata_attr . '="' . $parent_cat_id . '"',
382
-					'U_VIEW_FORUM'	=> $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $parent_cat_id),
381
+					'MICRODATA'		=> $microdata_attr.'="'.$parent_cat_id.'"',
382
+					'U_VIEW_FORUM'	=> $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$parent_cat_id),
383 383
 				));
384 384
 			}
385 385
 		}
@@ -387,8 +387,8 @@  discard block
 block discarded – undo
387 387
 		$this->template->assign_block_vars('dir_navlinks', array(
388 388
 			'FORUM_NAME'	=> $dir_cat_data['cat_name'],
389 389
 			'FORUM_ID'		=> $dir_cat_data['cat_id'],
390
-			'MICRODATA'		=> $microdata_attr . '="' . $dir_cat_data['cat_id'] . '"',
391
-			'U_VIEW_FORUM'	=> $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $dir_cat_data['cat_id']),
390
+			'MICRODATA'		=> $microdata_attr.'="'.$dir_cat_data['cat_id'].'"',
391
+			'U_VIEW_FORUM'	=> $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$dir_cat_data['cat_id']),
392 392
 		));
393 393
 
394 394
 		return;
@@ -444,17 +444,17 @@  discard block
 block discarded – undo
444 444
 			{
445 445
 				if ($mode == 'unwatch')
446 446
 				{
447
-					$sql = 'DELETE FROM ' . $this->watch_table . "
447
+					$sql = 'DELETE FROM '.$this->watch_table."
448 448
 						WHERE cat_id = $cat_id
449 449
 							AND user_id = $user_id";
450 450
 					$this->db->sql_query($sql);
451 451
 
452
-					$redirect_url = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $cat_id);
452
+					$redirect_url = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$cat_id);
453 453
 					$message = $this->language->lang('DIR_NOT_WATCHING_CAT');
454 454
 
455 455
 					if (!$this->request->is_ajax())
456 456
 					{
457
-						$message .= '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="' . $redirect_url . '">', '</a>');
457
+						$message .= '<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="'.$redirect_url.'">', '</a>');
458 458
 					}
459 459
 
460 460
 					meta_refresh(3, $redirect_url);
@@ -466,8 +466,8 @@  discard block
 block discarded – undo
466 466
 
467 467
 					if ($notify_status != NOTIFY_YES)
468 468
 					{
469
-						$sql = 'UPDATE ' . $this->watch_table . '
470
-							SET notify_status = ' . NOTIFY_YES . "
469
+						$sql = 'UPDATE '.$this->watch_table.'
470
+							SET notify_status = ' . NOTIFY_YES."
471 471
 							WHERE cat_id = $cat_id
472 472
 								AND user_id = $user_id";
473 473
 						$this->db->sql_query($sql);
@@ -478,16 +478,16 @@  discard block
 block discarded – undo
478 478
 			{
479 479
 				if ($mode == 'watch')
480 480
 				{
481
-					$sql = 'INSERT INTO ' . $this->watch_table . " (user_id, cat_id, notify_status)
482
-						VALUES ($user_id, $cat_id, " . NOTIFY_YES . ')';
481
+					$sql = 'INSERT INTO '.$this->watch_table." (user_id, cat_id, notify_status)
482
+						VALUES ($user_id, $cat_id, ".NOTIFY_YES.')';
483 483
 					$this->db->sql_query($sql);
484 484
 
485
-					$redirect_url = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $cat_id);
485
+					$redirect_url = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$cat_id);
486 486
 					$message = $this->language->lang('DIR_ARE_WATCHING_CAT');
487 487
 
488 488
 					if (!$this->request->is_ajax())
489 489
 					{
490
-						$message .= '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="' . $redirect_url . '">', '</a>');
490
+						$message .= '<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="'.$redirect_url.'">', '</a>');
491 491
 					}
492 492
 
493 493
 					meta_refresh(3, $redirect_url);
@@ -507,10 +507,10 @@  discard block
 block discarded – undo
507 507
 
508 508
 		if ($can_watch)
509 509
 		{
510
-			$s_watching['link'] 		= $this->helper->route('ernadoo_phpbbdirectory_suscribe_controller', array('cat_id' => $cat_id, 'mode' => (($is_watching) ? 'unwatch' : 'watch')));
510
+			$s_watching['link'] = $this->helper->route('ernadoo_phpbbdirectory_suscribe_controller', array('cat_id' => $cat_id, 'mode' => (($is_watching) ? 'unwatch' : 'watch')));
511 511
 			$s_watching['link_toggle'] 	= $this->helper->route('ernadoo_phpbbdirectory_suscribe_controller', array('cat_id' => $cat_id, 'mode' => ((!$is_watching) ? 'unwatch' : 'watch')));
512
-			$s_watching['title'] 		= $this->language->lang((($is_watching) ? 'DIR_STOP' : 'DIR_START') . '_WATCHING_CAT');
513
-			$s_watching['title_toggle'] = $this->language->lang(((!$is_watching) ? 'DIR_STOP' : 'DIR_START') . '_WATCHING_CAT');
512
+			$s_watching['title'] = $this->language->lang((($is_watching) ? 'DIR_STOP' : 'DIR_START').'_WATCHING_CAT');
513
+			$s_watching['title_toggle'] = $this->language->lang(((!$is_watching) ? 'DIR_STOP' : 'DIR_START').'_WATCHING_CAT');
514 514
 			$s_watching['is_watching'] 	= $is_watching;
515 515
 		}
516 516
 
@@ -530,7 +530,7 @@  discard block
 block discarded – undo
530 530
 		$categories_table = $phpbb_container->getParameter('tables.dir.categories');
531 531
 
532 532
 		$sql = 'SELECT cat_name
533
-			FROM ' . $categories_table . '
533
+			FROM ' . $categories_table.'
534 534
 			WHERE cat_id = ' . (int) $cat_id;
535 535
 		$result = $db->sql_query($sql);
536 536
 		$row = $db->sql_fetchrow($result);
Please login to merge, or discard this patch.
migrations/v20x/add_cat_route_field.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	{
29 29
 		return array(
30 30
 			'add_columns'	=> array(
31
-				$this->table_prefix . 'directory_cats' => array(
31
+				$this->table_prefix.'directory_cats' => array(
32 32
 					'cat_route'	=> array('VCHAR', '', 'after' => 'cat_name'),
33 33
 				)
34 34
 			),
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	{
53 53
 		return array(
54 54
 			'drop_columns'	=> array(
55
-				$this->table_prefix . 'directory_cats' => array(
55
+				$this->table_prefix.'directory_cats' => array(
56 56
 					'cat_route',
57 57
 				),
58 58
 			),
@@ -63,13 +63,13 @@  discard block
 block discarded – undo
63 63
 	{
64 64
 		$slug = new \E1379\SpeakingUrl\SpeakingUrl();
65 65
 
66
-		$sql = 'SELECT cat_id, cat_name FROM ' . $this->table_prefix . 'directory_cats';
66
+		$sql = 'SELECT cat_id, cat_name FROM '.$this->table_prefix.'directory_cats';
67 67
 		$result = $this->db->sql_query($sql);
68 68
 
69 69
 		while ($row = $this->db->sql_fetchrow($result))
70 70
 		{
71
-			$sql = 'UPDATE ' . $this->table_prefix . 'directory_cats' . '
72
-				SET cat_route = "' . (string) $slug->getSlug($row['cat_name'], array('lang' => $this->config['default_lang'], 'symbols' => true)). '"
71
+			$sql = 'UPDATE '.$this->table_prefix.'directory_cats'.'
72
+				SET cat_route = "' . (string) $slug->getSlug($row['cat_name'], array('lang' => $this->config['default_lang'], 'symbols' => true)).'"
73 73
 				WHERE cat_id = ' . (int) $row['cat_id'];
74 74
 			$this->db->sql_query($sql);
75 75
 		}
Please login to merge, or discard this patch.
ext.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 			return false;
33 33
 		}
34 34
 
35
-		if (!file_exists($this->extension_path. 'vendor/autoload.php'))
35
+		if (!file_exists($this->extension_path.'vendor/autoload.php'))
36 36
 		{
37 37
 			return false;
38 38
 		}
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 				if (!class_exists('\E1379\SpeakingUrl\SpeakingUrl'))
70 70
 				{
71 71
 					// When migration is executed, phpBB doesn't know yet extension dependencies, so we need to manually include autoload file
72
-					require($this->extension_path. 'vendor/autoload.php');
72
+					require($this->extension_path.'vendor/autoload.php');
73 73
 				}
74 74
 
75 75
 				// Run parent enable step method
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 
161 161
 		foreach ($notification_types as $notification_type)
162 162
 		{
163
-			call_user_func(array($phpbb_notifications, $step . '_notifications'), $notification_type);
163
+			call_user_func(array($phpbb_notifications, $step.'_notifications'), $notification_type);
164 164
 		}
165 165
 
166 166
 		return 'notifications';
Please login to merge, or discard this patch.
routing/categories_loader.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -34,7 +34,7 @@  discard block
 block discarded – undo
34 34
 	*/
35 35
 	public function __construct(\phpbb\db\driver\driver_interface $db, $categories_table)
36 36
 	{
37
-		$this->db          		= $db;
37
+		$this->db = $db;
38 38
 		$this->categories_table = $categories_table;
39 39
 	}
40 40
 
@@ -67,10 +67,10 @@  discard block
 block discarded – undo
67 67
 		while ($row = $this->db->sql_fetchrow($result))
68 68
 		{
69 69
 			$defaults['cat_id'] = $row['cat_id'];
70
-			$path = 'directory/' . $row['cat_route'] . '/{page}/{sort_days}/{sort_key}/{sort_dir}';
70
+			$path = 'directory/'.$row['cat_route'].'/{page}/{sort_days}/{sort_key}/{sort_dir}';
71 71
 
72 72
 			$route = new Route($path, $defaults, $requirements);
73
-			$routes->add('ernadoo_phpbbdirectory_dynamic_route_' . $row['cat_id'], $route);
73
+			$routes->add('ernadoo_phpbbdirectory_dynamic_route_'.$row['cat_id'], $route);
74 74
 		}
75 75
 		$this->db->sql_freeresult();
76 76
 
Please login to merge, or discard this patch.
controller/search.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -69,18 +69,18 @@  discard block
 block discarded – undo
69 69
 	*/
70 70
 	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\search\fulltext_directory $search, \ernadoo\phpbbdirectory\core\categorie $categorie, \ernadoo\phpbbdirectory\core\link $link)
71 71
 	{
72
-		$this->db			= $db;
73
-		$this->config		= $config;
72
+		$this->db = $db;
73
+		$this->config = $config;
74 74
 		$this->language		= $language;
75 75
 		$this->template		= $template;
76 76
 		$this->user			= $user;
77
-		$this->helper		= $helper;
78
-		$this->request		= $request;
77
+		$this->helper = $helper;
78
+		$this->request = $request;
79 79
 		$this->auth			= $auth;
80
-		$this->pagination	= $pagination;
81
-		$this->search		= $search;
82
-		$this->categorie	= $categorie;
83
-		$this->link			= $link;
80
+		$this->pagination = $pagination;
81
+		$this->search = $search;
82
+		$this->categorie = $categorie;
83
+		$this->link = $link;
84 84
 
85 85
 		$language->add_lang('directory', 'ernadoo/phpbbdirectory');
86 86
 		$language->add_lang('search');
@@ -104,18 +104,18 @@  discard block
 block discarded – undo
104 104
 			throw new \phpbb\exception\http_exception(403, 'DIR_ERROR_NOT_AUTH');
105 105
 		}
106 106
 
107
-		$cat_id				= $this->request->variable('cat_id', 0);
108
-		$keywords			= $this->request->variable('keywords', '', true);
107
+		$cat_id = $this->request->variable('cat_id', 0);
108
+		$keywords = $this->request->variable('keywords', '', true);
109 109
 		$search_terms		= $this->request->variable('terms', 'all');
110
-		$search_category	= $this->request->variable('cid', array(0));
111
-		$search_fields		= $this->request->variable('sf', 'all');
110
+		$search_category = $this->request->variable('cid', array(0));
111
+		$search_fields = $this->request->variable('sf', 'all');
112 112
 		$search_child		= $this->request->variable('sc', true);
113
-		$sort_days			= $this->request->variable('st', 0);
113
+		$sort_days = $this->request->variable('st', 0);
114 114
 		$sort_key			= $this->request->variable('sk', 't');
115 115
 		$sort_dir			= $this->request->variable('sd', 'd');
116
-		$start				= ($page - 1) * (int) $this->config['dir_show'];
116
+		$start = ($page - 1) * (int) $this->config['dir_show'];
117 117
 
118
-		$default_sort_days	= 0;
118
+		$default_sort_days = 0;
119 119
 		$default_sort_key	= (string) substr($this->config['dir_default_order'], 0, 1);
120 120
 		$default_sort_dir	= (string) substr($this->config['dir_default_order'], 2);
121 121
 
@@ -164,12 +164,12 @@  discard block
 block discarded – undo
164 164
 
165 165
 			$u_hilit = urlencode(htmlspecialchars_decode(str_replace('|', ' ', $hilit)));
166 166
 
167
-			($u_hilit) 					? $u_search['keywords']		= urlencode(htmlspecialchars_decode($keywords)) : '';
168
-			($search_terms != 'all') 	? $u_search['terms']		= $search_terms : '';
169
-			($cat_id)					? $u_search['cat_id']		= $cat_id : '';
170
-			($search_category)			? $u_search['cid']			= $search_category : '';
171
-			(!$search_child)			? $u_search['sc']			= 0 : '';
172
-			($search_fields != 'all')	? $u_search['sf'] 			= $search_fields : '';
167
+			($u_hilit) ? $u_search['keywords'] = urlencode(htmlspecialchars_decode($keywords)) : '';
168
+			($search_terms != 'all') ? $u_search['terms'] = $search_terms : '';
169
+			($cat_id) ? $u_search['cat_id'] = $cat_id : '';
170
+			($search_category) ? $u_search['cid'] = $search_category : '';
171
+			(!$search_child) ? $u_search['sc'] = 0 : '';
172
+			($search_fields != 'all') ? $u_search['sf'] = $search_fields : '';
173 173
 
174 174
 			$base_url = array(
175 175
 				'routes'	=> 'ernadoo_phpbbdirectory_search_controller',
@@ -199,7 +199,7 @@  discard block
 block discarded – undo
199 199
 			{
200 200
 				$this->template->assign_vars(array(
201 201
 					'SEARCH_CATEGORY'	=> $this->language->lang('RETURN_TO', \ernadoo\phpbbdirectory\core\categorie::getname((int) $cat_id)),
202
-					'U_SEARCH_CATEGORY'	=> $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $cat_id),
202
+					'U_SEARCH_CATEGORY'	=> $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$cat_id),
203 203
 				));
204 204
 			}
205 205
 
@@ -243,7 +243,7 @@  discard block
 block discarded – undo
243 243
 
244 244
 					foreach ($rowset as $data)
245 245
 					{
246
-						$s_banner	= $this->link->display_bann($data);
246
+						$s_banner = $this->link->display_bann($data);
247 247
 						$s_thumb	= $this->link->display_thumb($data);
248 248
 						$s_flag		= $this->link->display_flag($data);
249 249
 
@@ -251,8 +251,8 @@  discard block
 block discarded – undo
251 251
 
252 252
 						if ($hilit)
253 253
 						{
254
-							$data['link_name'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#isu', '<span class="posthilit">$1</span>', $data['link_name']);
255
-							$data['link_description'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#isu', '<span class="posthilit">$1</span>', $data['link_description']);
254
+							$data['link_name'] = preg_replace('#(?!<.*)(?<!\w)('.$hilit.')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#isu', '<span class="posthilit">$1</span>', $data['link_name']);
255
+							$data['link_description'] = preg_replace('#(?!<.*)(?<!\w)('.$hilit.')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#isu', '<span class="posthilit">$1</span>', $data['link_description']);
256 256
 						}
257 257
 
258 258
 						$this->template->assign_block_vars('results', array(
@@ -312,7 +312,7 @@  discard block
 block discarded – undo
312 312
 	private function _get_exclude_categories(&$search_category, $search_child)
313 313
 	{
314 314
 		$sql = 'SELECT cat_id, parent_id, right_id
315
-				FROM ' . $this->categories_table . '
315
+				FROM ' . $this->categories_table.'
316 316
 				ORDER BY left_id';
317 317
 		$result = $this->db->sql_query($sql);
318 318
 
Please login to merge, or discard this patch.
controller/acp/cat.php 1 patch
Spacing   +90 added lines, -90 removed lines patch added patch discarded remove patch
@@ -84,23 +84,23 @@  discard block
 block discarded – undo
84 84
 	*/
85 85
 	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\nestedset_category $nestedset_category)
86 86
 	{
87
-		$this->cache				= $cache;
88
-		$this->db					= $db;
89
-		$this->helper				= $helper;
87
+		$this->cache = $cache;
88
+		$this->db = $db;
89
+		$this->helper = $helper;
90 90
 		$this->language				= $language;
91 91
 		$this->phpbb_log			= $log;
92
-		$this->request				= $request;
92
+		$this->request = $request;
93 93
 		$this->template				= $template;
94
-		$this->user					= $user;
94
+		$this->user = $user;
95 95
 		$this->categorie			= $categorie;
96
-		$this->nestedset_category	= $nestedset_category;
96
+		$this->nestedset_category = $nestedset_category;
97 97
 
98 98
 		$this->form_key = 'acp_dir_cat';
99 99
 		add_form_key($this->form_key);
100 100
 
101 101
 		$this->action		= $this->request->variable('action', '');
102 102
 		$this->cat_id		= $request->variable('c', 0);
103
-		$this->parent_id	= $request->variable('parent_id', 0);
103
+		$this->parent_id = $request->variable('parent_id', 0);
104 104
 		$this->update		= ($this->request->is_set_post('update')) ? true : false;
105 105
 	}
106 106
 
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 	{
152 152
 		if (!$this->cat_id)
153 153
 		{
154
-			trigger_error($this->language->lang('DIR_NO_CAT') . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
154
+			trigger_error($this->language->lang('DIR_NO_CAT').adm_back_link($this->u_action.'&amp;parent_id='.$this->parent_id), E_USER_WARNING);
155 155
 		}
156 156
 
157 157
 		$this->cat_data = $this->_get_cat_info($this->cat_id);
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 		$cat_list = $this->categorie->make_cat_select((int) $this->cat_data['parent_id'], $subcats_id);
168 168
 
169 169
 		$sql = 'SELECT cat_id
170
-			FROM ' . $this->categories_table . '
170
+			FROM ' . $this->categories_table.'
171 171
 			WHERE cat_id <> ' . (int) $this->cat_id;
172 172
 		$result = $this->db->sql_query_limit($sql, 1);
173 173
 
@@ -183,8 +183,8 @@  discard block
 block discarded – undo
183 183
 
184 184
 		$this->template->assign_vars(array(
185 185
 			'S_DELETE_DIR_CAT'		=> true,
186
-			'U_ACTION'				=> $this->u_action . "&amp;parent_id={$parent_id}&amp;action=delete&amp;c=$this->cat_id",
187
-			'U_BACK'				=> $this->u_action . '&amp;parent_id=' . $this->parent_id,
186
+			'U_ACTION'				=> $this->u_action."&amp;parent_id={$parent_id}&amp;action=delete&amp;c=$this->cat_id",
187
+			'U_BACK'				=> $this->u_action.'&amp;parent_id='.$this->parent_id,
188 188
 
189 189
 			'DIR_CAT_NAME'			=> $this->cat_data['cat_name'],
190 190
 			'S_HAS_SUBCATS'			=> ($this->cat_data['right_id'] - $this->cat_data['left_id'] > 1) ? true : false,
@@ -235,11 +235,11 @@  discard block
 block discarded – undo
235 235
 	{
236 236
 		if (!$this->cat_id)
237 237
 		{
238
-			trigger_error($this->language->lang('DIR_NO_CAT') . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
238
+			trigger_error($this->language->lang('DIR_NO_CAT').adm_back_link($this->u_action.'&amp;parent_id='.$this->parent_id), E_USER_WARNING);
239 239
 		}
240 240
 
241 241
 		$sql = 'SELECT cat_id, cat_name, parent_id, left_id, right_id
242
-			FROM ' . $this->categories_table . '
242
+			FROM ' . $this->categories_table.'
243 243
 			WHERE cat_id = ' . (int) $this->cat_id;
244 244
 		$result = $this->db->sql_query($sql);
245 245
 		$row = $this->db->sql_fetchrow($result);
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 
248 248
 		if (!$row)
249 249
 		{
250
-			trigger_error($this->language->lang('DIR_NO_CAT') . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
250
+			trigger_error($this->language->lang('DIR_NO_CAT').adm_back_link($this->u_action.'&amp;parent_id='.$this->parent_id), E_USER_WARNING);
251 251
 		}
252 252
 
253 253
 		try
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 
262 262
 		if ($move_cat_name !== false)
263 263
 		{
264
-			$this->phpbb_log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_DIR_CAT_' . strtoupper($this->action), time(), array($row['cat_name'], $move_cat_name));
264
+			$this->phpbb_log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_DIR_CAT_'.strtoupper($this->action), time(), array($row['cat_name'], $move_cat_name));
265 265
 			$this->cache->destroy('sql', $this->categories_table);
266 266
 		}
267 267
 
@@ -305,13 +305,13 @@  discard block
 block discarded – undo
305 305
 	{
306 306
 		if (!$this->cat_id)
307 307
 		{
308
-			trigger_error($this->language->lang('DIR_NO_CAT') . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
308
+			trigger_error($this->language->lang('DIR_NO_CAT').adm_back_link($this->u_action.'&amp;parent_id='.$this->parent_id), E_USER_WARNING);
309 309
 		}
310 310
 
311 311
 		@set_time_limit(0);
312 312
 
313 313
 		$sql = 'SELECT cat_name, cat_links
314
-			FROM ' . $this->categories_table . '
314
+			FROM ' . $this->categories_table.'
315 315
 			WHERE cat_id = ' . (int) $this->cat_id;
316 316
 		$result = $this->db->sql_query($sql);
317 317
 		$row = $this->db->sql_fetchrow($result);
@@ -319,12 +319,12 @@  discard block
 block discarded – undo
319 319
 
320 320
 		if (!$row)
321 321
 		{
322
-			trigger_error($this->language->lang('DIR_NO_CAT') . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
322
+			trigger_error($this->language->lang('DIR_NO_CAT').adm_back_link($this->u_action.'&amp;parent_id='.$this->parent_id), E_USER_WARNING);
323 323
 		}
324 324
 
325 325
 		$sql = 'SELECT MIN(link_id) as min_link_id, MAX(link_id) as max_link_id
326
-			FROM ' . $this->links_table . '
327
-			WHERE link_cat = ' . (int) $this->cat_id . '
326
+			FROM ' . $this->links_table.'
327
+			WHERE link_cat = ' . (int) $this->cat_id.'
328 328
 				AND link_active = 1';
329 329
 		$result = $this->db->sql_query($sql);
330 330
 		$row2 = $this->db->sql_fetchrow($result);
@@ -346,22 +346,22 @@  discard block
 block discarded – undo
346 346
 		{
347 347
 			// We really need to find a way of showing statistics... no progress here
348 348
 			$sql = 'SELECT COUNT(link_id) as num_links
349
-				FROM ' . $this->links_table . '
350
-				WHERE link_cat = ' . (int) $this->cat_id . '
349
+				FROM ' . $this->links_table.'
350
+				WHERE link_cat = ' . (int) $this->cat_id.'
351 351
 						AND link_active = 1
352
-						AND link_id BETWEEN ' . $start . ' AND ' . $end;
352
+						AND link_id BETWEEN ' . $start.' AND '.$end;
353 353
 			$result = $this->db->sql_query($sql);
354 354
 			$links_done = $this->request->variable('links_done', 0) + (int) $this->db->sql_fetchfield('num_links');
355 355
 			$this->db->sql_freeresult($result);
356 356
 
357 357
 			$start += $batch_size;
358 358
 
359
-			$url = $this->u_action . "&amp;parent_id={$this->parent_id}&amp;c=$this->cat_id&amp;action=sync&amp;start=$start&amp;links_done=$links_done&amp;total={$row['cat_links']}";
359
+			$url = $this->u_action."&amp;parent_id={$this->parent_id}&amp;c=$this->cat_id&amp;action=sync&amp;start=$start&amp;links_done=$links_done&amp;total={$row['cat_links']}";
360 360
 
361 361
 			meta_refresh(0, $url);
362 362
 
363 363
 			$this->template->assign_vars(array(
364
-				'UA_PROGRESS_BAR'		=> $this->u_action . "&amp;action=progress_bar&amp;start=$links_done&amp;total={$row['cat_links']}",
364
+				'UA_PROGRESS_BAR'		=> $this->u_action."&amp;action=progress_bar&amp;start=$links_done&amp;total={$row['cat_links']}",
365 365
 				'S_CONTINUE_SYNC'		=> true,
366 366
 				'L_PROGRESS_EXPLAIN'	=> $this->language->lang('SYNC_IN_PROGRESS_EXPLAIN', $links_done, $row['cat_links']))
367 367
 			);
@@ -369,11 +369,11 @@  discard block
 block discarded – undo
369 369
 			return;
370 370
 		}
371 371
 
372
-		$url = $this->u_action . "&amp;parent_id={$this->parent_id}&amp;c=$this->cat_id&amp;action=sync_cat";
372
+		$url = $this->u_action."&amp;parent_id={$this->parent_id}&amp;c=$this->cat_id&amp;action=sync_cat";
373 373
 		meta_refresh(0, $url);
374 374
 
375 375
 		$this->template->assign_vars(array(
376
-			'UA_PROGRESS_BAR'		=> $this->u_action . '&amp;action=progress_bar',
376
+			'UA_PROGRESS_BAR'		=> $this->u_action.'&amp;action=progress_bar',
377 377
 			'S_CONTINUE_SYNC'		=> true,
378 378
 			'L_PROGRESS_EXPLAIN'	=> $this->language->lang('SYNC_IN_PROGRESS_EXPLAIN', 0, $row['cat_links']))
379 379
 		);
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
 	public function action_sync_cat()
390 390
 	{
391 391
 		$sql = 'SELECT cat_name
392
-			FROM ' . $this->categories_table . '
392
+			FROM ' . $this->categories_table.'
393 393
 			WHERE cat_id = ' . (int) $this->cat_id;
394 394
 		$result = $this->db->sql_query($sql);
395 395
 		$row = $this->db->sql_fetchrow($result);
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
 
398 398
 		if (!$row)
399 399
 		{
400
-			trigger_error($this->language->lang('DIR_NO_CAT') . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
400
+			trigger_error($this->language->lang('DIR_NO_CAT').adm_back_link($this->u_action.'&amp;parent_id='.$this->parent_id), E_USER_WARNING);
401 401
 		}
402 402
 
403 403
 		$this->_sync_dir_cat($this->cat_id);
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
 		}
423 423
 		else
424 424
 		{
425
-			$navigation = '<a href="' . $this->u_action . '">' . $this->language->lang('DIR_INDEX') . '</a>';
425
+			$navigation = '<a href="'.$this->u_action.'">'.$this->language->lang('DIR_INDEX').'</a>';
426 426
 
427 427
 			$cats_nav = $this->nestedset_category->get_path_data($this->parent_id);
428 428
 
@@ -430,11 +430,11 @@  discard block
 block discarded – undo
430 430
 			{
431 431
 				if ($row['cat_id'] == $this->parent_id)
432 432
 				{
433
-					$navigation .= ' -&gt; ' . $row['cat_name'];
433
+					$navigation .= ' -&gt; '.$row['cat_name'];
434 434
 				}
435 435
 				else
436 436
 				{
437
-					$navigation .= ' -&gt; <a href="' . $this->u_action . '&amp;parent_id=' . $row['cat_id'] . '">' . $row['cat_name'] . '</a>';
437
+					$navigation .= ' -&gt; <a href="'.$this->u_action.'&amp;parent_id='.$row['cat_id'].'">'.$row['cat_name'].'</a>';
438 438
 				}
439 439
 			}
440 440
 		}
@@ -448,8 +448,8 @@  discard block
 block discarded – undo
448 448
 		}
449 449
 
450 450
 		$sql = 'SELECT cat_id, parent_id, right_id, left_id, cat_name, cat_icon, cat_desc_uid, cat_desc_bitfield, cat_desc, cat_desc_options, cat_links
451
-			FROM ' . $this->categories_table . '
452
-			WHERE parent_id = ' . (int) $this->parent_id . '
451
+			FROM ' . $this->categories_table.'
452
+			WHERE parent_id = ' . (int) $this->parent_id.'
453 453
 			ORDER BY left_id';
454 454
 		$result = $this->db->sql_query($sql);
455 455
 
@@ -457,23 +457,23 @@  discard block
 block discarded – undo
457 457
 		{
458 458
 			do
459 459
 			{
460
-				$folder_image = ($row['left_id'] + 1 != $row['right_id']) ? '<img src="images/icon_subfolder.gif" alt="' . $this->language->lang('DIR_SUBCAT') . '" />' : '<img src="images/icon_folder.gif" alt="' . $this->language->lang('FOLDER') . '" />';
460
+				$folder_image = ($row['left_id'] + 1 != $row['right_id']) ? '<img src="images/icon_subfolder.gif" alt="'.$this->language->lang('DIR_SUBCAT').'" />' : '<img src="images/icon_folder.gif" alt="'.$this->language->lang('FOLDER').'" />';
461 461
 
462
-				$url = $this->u_action . "&amp;parent_id=$this->parent_id&amp;c={$row['cat_id']}";
462
+				$url = $this->u_action."&amp;parent_id=$this->parent_id&amp;c={$row['cat_id']}";
463 463
 
464 464
 				$this->template->assign_block_vars('cats', array(
465 465
 					'FOLDER_IMAGE'		=> $folder_image,
466
-					'CAT_IMAGE'			=> ($row['cat_icon']) ? '<img src="' . $this->get_img_path('icons', $row['cat_icon']) . '" alt="" />' : '',
466
+					'CAT_IMAGE'			=> ($row['cat_icon']) ? '<img src="'.$this->get_img_path('icons', $row['cat_icon']).'" alt="" />' : '',
467 467
 					'CAT_NAME'			=> $row['cat_name'],
468 468
 					'CAT_DESCRIPTION'	=> generate_text_for_display($row['cat_desc'], $row['cat_desc_uid'], $row['cat_desc_bitfield'], $row['cat_desc_options']),
469 469
 					'CAT_LINKS'			=> $row['cat_links'],
470 470
 
471
-					'U_CAT'				=> $this->u_action . '&amp;parent_id=' . $row['cat_id'],
472
-					'U_MOVE_UP'			=> $url . '&amp;action=move_up',
473
-					'U_MOVE_DOWN'		=> $url . '&amp;action=move_down',
474
-					'U_EDIT'			=> $url . '&amp;action=edit',
475
-					'U_DELETE'			=> $url . '&amp;action=delete',
476
-					'U_SYNC'			=> $url . '&amp;action=sync')
471
+					'U_CAT'				=> $this->u_action.'&amp;parent_id='.$row['cat_id'],
472
+					'U_MOVE_UP'			=> $url.'&amp;action=move_up',
473
+					'U_MOVE_DOWN'		=> $url.'&amp;action=move_down',
474
+					'U_EDIT'			=> $url.'&amp;action=edit',
475
+					'U_DELETE'			=> $url.'&amp;action=delete',
476
+					'U_SYNC'			=> $url.'&amp;action=sync')
477 477
 				);
478 478
 			}
479 479
 			while ($row = $this->db->sql_fetchrow($result));
@@ -482,14 +482,14 @@  discard block
 block discarded – undo
482 482
 		{
483 483
 			$row = $this->_get_cat_info($this->parent_id);
484 484
 
485
-			$url = $this->u_action . '&amp;parent_id=' . $this->parent_id . '&amp;c=' . $row['cat_id'];
485
+			$url = $this->u_action.'&amp;parent_id='.$this->parent_id.'&amp;c='.$row['cat_id'];
486 486
 
487 487
 			$this->template->assign_vars(array(
488 488
 				'S_NO_CATS'			=> true,
489 489
 
490
-				'U_EDIT'			=> $url . '&amp;action=edit',
491
-				'U_DELETE'			=> $url . '&amp;action=delete',
492
-				'U_SYNC'			=> $url . '&amp;action=sync')
490
+				'U_EDIT'			=> $url.'&amp;action=edit',
491
+				'U_DELETE'			=> $url.'&amp;action=delete',
492
+				'U_SYNC'			=> $url.'&amp;action=sync')
493 493
 			);
494 494
 		}
495 495
 		$this->db->sql_freeresult($result);
@@ -499,9 +499,9 @@  discard block
 block discarded – undo
499 499
 			'NAVIGATION'	=> $navigation,
500 500
 			'CAT_BOX'		=> $cat_box,
501 501
 			'U_SEL_ACTION'	=> $this->u_action,
502
-			'U_ACTION'		=> $this->u_action . '&amp;parent_id=' . $this->parent_id,
502
+			'U_ACTION'		=> $this->u_action.'&amp;parent_id='.$this->parent_id,
503 503
 
504
-			'UA_PROGRESS_BAR'	=> $this->u_action . '&amp;action=progress_bar',
504
+			'UA_PROGRESS_BAR'	=> $this->u_action.'&amp;action=progress_bar',
505 505
 		));
506 506
 	}
507 507
 
@@ -533,10 +533,10 @@  discard block
 block discarded – undo
533 533
 		switch ($this->action)
534 534
 		{
535 535
 			case 'delete':
536
-				$action_subcats	= $this->request->variable('action_subcats', '');
537
-				$subcats_to_id	= $this->request->variable('subcats_to_id', 0);
538
-				$action_links	= $this->request->variable('action_links', '');
539
-				$links_to_id	= $this->request->variable('links_to_id', 0);
536
+				$action_subcats = $this->request->variable('action_subcats', '');
537
+				$subcats_to_id = $this->request->variable('subcats_to_id', 0);
538
+				$action_links = $this->request->variable('action_links', '');
539
+				$links_to_id = $this->request->variable('links_to_id', 0);
540 540
 
541 541
 				try
542 542
 				{
@@ -554,7 +554,7 @@  discard block
 block discarded – undo
554 554
 
555 555
 				$this->cache->destroy('sql', $this->categories_table);
556 556
 
557
-				trigger_error($this->language->lang('DIR_CAT_DELETED') . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
557
+				trigger_error($this->language->lang('DIR_CAT_DELETED').adm_back_link($this->u_action.'&amp;parent_id='.$this->parent_id));
558 558
 
559 559
 				break;
560 560
 
@@ -608,7 +608,7 @@  discard block
 block discarded – undo
608 608
 
609 609
 					$message = ($this->action == 'add') ? $this->language->lang('DIR_CAT_CREATED') : $this->language->lang('DIR_CAT_UPDATED');
610 610
 
611
-					trigger_error($message . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
611
+					trigger_error($message.adm_back_link($this->u_action.'&amp;parent_id='.$this->parent_id));
612 612
 				}
613 613
 
614 614
 			break;
@@ -642,8 +642,8 @@  discard block
 block discarded – undo
642 642
 		}
643 643
 
644 644
 		$sql = 'SELECT cat_route
645
-			FROM ' . $this->categories_table  . "
646
-			WHERE cat_route = '" . $this->db->sql_escape($route) . "'
645
+			FROM ' . $this->categories_table."
646
+			WHERE cat_route = '" . $this->db->sql_escape($route)."'
647 647
 				AND cat_id <> " . $this->cat_id;
648 648
 		$result = $this->db->sql_query_limit($sql, 1);
649 649
 		$row = $this->db->sql_fetchrow($result);
@@ -693,10 +693,10 @@  discard block
 block discarded – undo
693 693
 			'S_CAT_PARENT_ID'	=> $this->cat_data['parent_id'],
694 694
 			'S_ADD_ACTION'		=> ($this->action == 'add') ? true : false,
695 695
 
696
-			'U_BACK'			=> $this->u_action . '&amp;parent_id=' . $this->parent_id,
697
-			'U_EDIT_ACTION'		=> $this->u_action . "&amp;parent_id={$this->parent_id}&amp;action=$this->action&amp;c=$this->cat_id",
696
+			'U_BACK'			=> $this->u_action.'&amp;parent_id='.$this->parent_id,
697
+			'U_EDIT_ACTION'		=> $this->u_action."&amp;parent_id={$this->parent_id}&amp;action=$this->action&amp;c=$this->cat_id",
698 698
 
699
-			'L_TITLE'					=> $this->language->lang('DIR_' . strtoupper($this->action) . '_CAT'),
699
+			'L_TITLE'					=> $this->language->lang('DIR_'.strtoupper($this->action).'_CAT'),
700 700
 			'ERROR_MSG'					=> (sizeof($this->errors)) ? implode('<br />', $this->errors) : '',
701 701
 			'ICON_IMAGE'				=> ($this->cat_data['cat_icon']) ? $this->get_img_path('icons', $this->cat_data['cat_icon']) : 'images/spacer.gif',
702 702
 
@@ -740,7 +740,7 @@  discard block
 block discarded – undo
740 740
 	private function _get_cat_info($cat_id)
741 741
 	{
742 742
 		$sql = 'SELECT cat_id, parent_id, right_id, left_id, cat_desc, cat_desc_uid, cat_desc_options, cat_icon, cat_name, cat_route, 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
743
-			FROM ' . $this->categories_table . '
743
+			FROM ' . $this->categories_table.'
744 744
 			WHERE cat_id = ' . (int) $cat_id;
745 745
 		$result = $this->db->sql_query($sql);
746 746
 		$row = $this->db->sql_fetchrow($result);
@@ -805,7 +805,7 @@  discard block
 block discarded – undo
805 805
 		{
806 806
 			if ($cat_data_sql['cat_cron_enable'])
807 807
 			{
808
-				$cat_data_sql['cat_cron_next'] = time() + $cat_data_sql['cat_cron_freq']*86400;
808
+				$cat_data_sql['cat_cron_next'] = time() + $cat_data_sql['cat_cron_freq'] * 86400;
809 809
 			}
810 810
 
811 811
 			$this->cat_data = $this->nestedset_category->insert($cat_data_sql);
@@ -828,13 +828,13 @@  discard block
 block discarded – undo
828 828
 
829 829
 			if ($cat_data_sql['cat_cron_enable'] && ($row['cat_cron_freq'] != $cat_data_sql['cat_cron_freq'] || !$row['cat_cron_enable']))
830 830
 			{
831
-				$cat_data_sql['cat_cron_next'] = time() + $cat_data_sql['cat_cron_freq']*86400;
831
+				$cat_data_sql['cat_cron_next'] = time() + $cat_data_sql['cat_cron_freq'] * 86400;
832 832
 			}
833 833
 
834 834
 			if ($row['cat_name'] != $cat_data_sql['cat_name'])
835 835
 			{
836 836
 				// the cat name has changed, clear the parents list of all categories (for safety)
837
-				$sql = 'UPDATE ' . $this->categories_table . "
837
+				$sql = 'UPDATE '.$this->categories_table."
838 838
 					SET cat_parents = ''";
839 839
 				$this->db->sql_query($sql);
840 840
 			}
@@ -842,8 +842,8 @@  discard block
 block discarded – undo
842 842
 			// Setting the cat id to the categorie id is not really received well by some dbs. ;)
843 843
 			unset($cat_data_sql['cat_id']);
844 844
 
845
-			$sql = 'UPDATE ' . $this->categories_table . '
846
-				SET ' . $this->db->sql_build_array('UPDATE', $cat_data_sql) . '
845
+			$sql = 'UPDATE '.$this->categories_table.'
846
+				SET ' . $this->db->sql_build_array('UPDATE', $cat_data_sql).'
847 847
 				WHERE cat_id = ' . (int) $this->cat_id;
848 848
 			$this->db->sql_query($sql);
849 849
 
@@ -884,7 +884,7 @@  discard block
 block discarded – undo
884 884
 				$log_action_links = 'MOVE_LINKS';
885 885
 
886 886
 				$sql = 'SELECT cat_name
887
-					FROM ' . $this->categories_table . '
887
+					FROM ' . $this->categories_table.'
888 888
 					WHERE cat_id = ' . (int) $links_to_id;
889 889
 				$result = $this->db->sql_query($sql);
890 890
 				$row = $this->db->sql_fetchrow($result);
@@ -986,12 +986,12 @@  discard block
 block discarded – undo
986 986
 	*/
987 987
 	private function _move_cat_content($from_id, $to_id)
988 988
 	{
989
-		$sql = 'UPDATE ' . $this->links_table . '
990
-			SET link_cat = ' . (int) $to_id . '
989
+		$sql = 'UPDATE '.$this->links_table.'
990
+			SET link_cat = ' . (int) $to_id.'
991 991
 			WHERE link_cat = ' . (int) $from_id;
992 992
 		$this->db->sql_query($sql);
993 993
 
994
-		$sql = 'DELETE FROM ' . $this->watch_table . '
994
+		$sql = 'DELETE FROM '.$this->watch_table.'
995 995
 			WHERE cat_id = ' . (int) $from_id;
996 996
 		$this->db->sql_query($sql);
997 997
 
@@ -1009,7 +1009,7 @@  discard block
 block discarded – undo
1009 1009
 
1010 1010
 		// Before we remove anything we make sure we are able to adjust the post counts later. ;)
1011 1011
 		$sql = 'SELECT link_id, link_banner
1012
-			FROM ' . $this->links_table . '
1012
+			FROM ' . $this->links_table.'
1013 1013
 			WHERE link_cat = ' . (int) $this->cat_id;
1014 1014
 		$result = $this->db->sql_query($sql);
1015 1015
 
@@ -1040,7 +1040,7 @@  discard block
 block discarded – undo
1040 1040
 
1041 1041
 			foreach ($link_datas_ary as $table => $field)
1042 1042
 			{
1043
-				$this->db->sql_query("DELETE FROM $table WHERE " . $this->db->sql_in_set($field, $link_ids));
1043
+				$this->db->sql_query("DELETE FROM $table WHERE ".$this->db->sql_in_set($field, $link_ids));
1044 1044
 			}
1045 1045
 		}
1046 1046
 
@@ -1052,7 +1052,7 @@  discard block
 block discarded – undo
1052 1052
 
1053 1053
 		foreach ($cat_datas_ary as $table => $field)
1054 1054
 		{
1055
-			$this->db->sql_query("DELETE FROM $table WHERE $field = " . (int) $this->cat_id);
1055
+			$this->db->sql_query("DELETE FROM $table WHERE $field = ".(int) $this->cat_id);
1056 1056
 		}
1057 1057
 
1058 1058
 		$this->db->sql_transaction('commit');
@@ -1069,15 +1069,15 @@  discard block
 block discarded – undo
1069 1069
 	private function _sync_dir_cat($cat_id)
1070 1070
 	{
1071 1071
 		$sql = 'SELECT COUNT(link_id) AS num_links
1072
-			FROM ' . $this->links_table . '
1073
-			WHERE link_cat = ' . (int) $cat_id . '
1072
+			FROM ' . $this->links_table.'
1073
+			WHERE link_cat = ' . (int) $cat_id.'
1074 1074
 				AND link_active = 1';
1075 1075
 		$result = $this->db->sql_query($sql);
1076 1076
 		$total_links = (int) $this->db->sql_fetchfield('num_links');
1077 1077
 		$this->db->sql_freeresult($result);
1078 1078
 
1079
-		$sql = 'UPDATE ' . $this->categories_table . '
1080
-			SET cat_links = ' . $total_links . '
1079
+		$sql = 'UPDATE '.$this->categories_table.'
1080
+			SET cat_links = ' . $total_links.'
1081 1081
 			WHERE cat_id = ' . (int) $cat_id;
1082 1082
 		$this->db->sql_query($sql);
1083 1083
 	}
@@ -1097,33 +1097,33 @@  discard block
 block discarded – undo
1097 1097
 			'link_vote'		=> 0,
1098 1098
 		);
1099 1099
 
1100
-		$sql = 'UPDATE ' . $this->links_table . '
1101
-			SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . '
1102
-			WHERE link_id BETWEEN ' . (int) $start . ' AND ' . (int) $stop;
1100
+		$sql = 'UPDATE '.$this->links_table.'
1101
+			SET ' . $this->db->sql_build_array('UPDATE', $sql_ary).'
1102
+			WHERE link_id BETWEEN ' . (int) $start.' AND '.(int) $stop;
1103 1103
 		$this->db->sql_query($sql);
1104 1104
 
1105
-		$sql = 'SELECT vote_link_id, COUNT(vote_note) AS nb_vote, SUM(vote_note) AS total FROM ' . $this->votes_table . '
1106
-			WHERE vote_link_id BETWEEN ' . (int) $start . ' AND ' . (int) $stop . '
1105
+		$sql = 'SELECT vote_link_id, COUNT(vote_note) AS nb_vote, SUM(vote_note) AS total FROM '.$this->votes_table.'
1106
+			WHERE vote_link_id BETWEEN ' . (int) $start.' AND '.(int) $stop.'
1107 1107
 			GROUP BY vote_link_id';
1108 1108
 		$result = $this->db->sql_query($sql);
1109 1109
 		while ($tmp = $this->db->sql_fetchrow($result))
1110 1110
 		{
1111
-			$sql = 'UPDATE ' . $this->links_table . '
1112
-				SET link_note = ' . (int) $tmp['total'] . ', link_vote = ' . (int) $tmp['nb_vote'] . '
1111
+			$sql = 'UPDATE '.$this->links_table.'
1112
+				SET link_note = ' . (int) $tmp['total'].', link_vote = '.(int) $tmp['nb_vote'].'
1113 1113
 				WHERE link_id = ' . (int) $tmp['vote_link_id'];
1114 1114
 			$this->db->sql_query($sql);
1115 1115
 		}
1116 1116
 		$this->db->sql_freeresult($result);
1117 1117
 
1118 1118
 		$sql = 'SELECT 	comment_link_id, COUNT(comment_id) AS nb_comment
1119
-			FROM ' . $this->comments_table . '
1120
-			WHERE comment_link_id BETWEEN ' . (int) $start . ' AND ' . (int) $stop . '
1119
+			FROM ' . $this->comments_table.'
1120
+			WHERE comment_link_id BETWEEN ' . (int) $start.' AND '.(int) $stop.'
1121 1121
 			GROUP BY comment_link_id';
1122 1122
 		$result = $this->db->sql_query($sql);
1123 1123
 		while ($tmp = $this->db->sql_fetchrow($result))
1124 1124
 		{
1125
-			$sql = 'UPDATE ' . $this->links_table . '
1126
-				SET link_comment = ' . (int) $tmp['nb_comment'] . '
1125
+			$sql = 'UPDATE '.$this->links_table.'
1126
+				SET link_comment = ' . (int) $tmp['nb_comment'].'
1127 1127
 				WHERE link_id = ' . (int) $tmp['comment_link_id'];
1128 1128
 			$this->db->sql_query($sql);
1129 1129
 		}
@@ -1148,7 +1148,7 @@  discard block
 block discarded – undo
1148 1148
 
1149 1149
 			foreach ($img_ary as $img)
1150 1150
 			{
1151
-				$img = $path . $img;
1151
+				$img = $path.$img;
1152 1152
 				$selected = '';
1153 1153
 
1154 1154
 				if (strlen($img) > 255)
@@ -1161,7 +1161,7 @@  discard block
 block discarded – undo
1161 1161
 					$selected = ' selected="selected"';
1162 1162
 				}
1163 1163
 
1164
-				$filename_list .= '<option value="' . htmlspecialchars($img) . '"' . $selected . '>' . $img . '</option>';
1164
+				$filename_list .= '<option value="'.htmlspecialchars($img).'"'.$selected.'>'.$img.'</option>';
1165 1165
 			}
1166 1166
 		}
1167 1167
 
Please login to merge, or discard this patch.