Completed
Push — master ( 26f62e...4d4020 )
by Erwan
05:32
created
controller/comments.php 2 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.
Spacing   +27 added lines, -27 removed lines patch added patch discarded remove patch
@@ -74,15 +74,15 @@  discard block
 block discarded – undo
74 74
 	*/
75 75
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \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)
76 76
 	{
77
-		$this->db				= $db;
77
+		$this->db = $db;
78 78
 		$this->config			= $config;
79
-		$this->template			= $template;
79
+		$this->template = $template;
80 80
 		$this->user				= $user;
81 81
 		$this->helper			= $helper;
82
-		$this->request			= $request;
82
+		$this->request = $request;
83 83
 		$this->auth				= $auth;
84
-		$this->pagination		= $pagination;
85
-		$this->captcha_factory 	= $captcha_factory;
84
+		$this->pagination = $pagination;
85
+		$this->captcha_factory = $captcha_factory;
86 86
 		$this->categorie		= $categorie;
87 87
 		$this->comment			= $comment;
88 88
 		$this->root_path		= $root_path;
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 		}
125 125
 
126 126
 		$sql = 'SELECT *
127
-			FROM ' . DIR_COMMENT_TABLE . '
127
+			FROM ' . DIR_COMMENT_TABLE.'
128 128
 			WHERE comment_id = ' . (int) $comment_id;
129 129
 		$result = $this->db->sql_query($sql);
130 130
 		$value = $this->db->sql_fetchrow($result);
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 			$meta_info = $this->helper->route('ernadoo_phpbbdirectory_comment_view_controller', array('link_id' => (int) $link_id));
142 142
 			meta_refresh(3, $meta_info);
143 143
 			$message = $this->user->lang['DIR_COMMENT_DELETE_OK'];
144
-			$message = $message . '<br /><br />' . $this->user->lang('DIR_CLICK_RETURN_COMMENT', '<a href="' . $meta_info . '">', '</a>');
144
+			$message = $message.'<br /><br />'.$this->user->lang('DIR_CLICK_RETURN_COMMENT', '<a href="'.$meta_info.'">', '</a>');
145 145
 			return $this->helper->message($message);
146 146
 		}
147 147
 		else
@@ -163,7 +163,7 @@  discard block
 block discarded – undo
163 163
 		$this->_check_comments_enable($link_id);
164 164
 
165 165
 		$sql = 'SELECT *
166
-			FROM ' . DIR_COMMENT_TABLE . '
166
+			FROM ' . DIR_COMMENT_TABLE.'
167 167
 			WHERE comment_id = ' . (int) $comment_id;
168 168
 		$result = $this->db->sql_query($sql);
169 169
 		$value = $this->db->sql_fetchrow($result);
@@ -176,7 +176,7 @@  discard block
 block discarded – undo
176 176
 		$comment_text = generate_text_for_edit($value['comment_text'], $value['comment_uid'], $value['comment_flags']);
177 177
 		$this->s_comment = $comment_text['text'];
178 178
 
179
-		$submit	= $this->request->is_set_post('update_comment') ? true : false;
179
+		$submit = $this->request->is_set_post('update_comment') ? true : false;
180 180
 
181 181
 		// If form is done
182 182
 		if ($submit)
@@ -232,15 +232,15 @@  discard block
 block discarded – undo
232 232
 		$this->_check_comments_enable($link_id);
233 233
 
234 234
 		$comment_id = $this->request->variable('c', 0);
235
-		$view 		= $this->request->variable('view', '');
236
-		$start 		= ($page - 1) * $this->config['dir_comments_per_page'];
235
+		$view = $this->request->variable('view', '');
236
+		$start = ($page - 1) * $this->config['dir_comments_per_page'];
237 237
 
238 238
 		$this->s_hidden_fields = array_merge($this->s_hidden_fields, array('page' => $page));
239 239
 
240 240
 		$this->_populate_form($link_id, $mode);
241 241
 
242 242
 		$sql = 'SELECT COUNT(comment_id) AS nb_comments
243
-			FROM ' . DIR_COMMENT_TABLE . '
243
+			FROM ' . DIR_COMMENT_TABLE.'
244 244
 			WHERE comment_link_id = ' . (int) $link_id;
245 245
 		$result = $this->db->sql_query($sql);
246 246
 		$nb_comments = (int) $this->db->sql_fetchfield('nb_comments');
@@ -260,10 +260,10 @@  discard block
 block discarded – undo
260 260
 					),
261 261
 					array(
262 262
 						'FROM'	=> array(ZEBRA_TABLE => 'z'),
263
-						'ON'	=> 'z.user_id = ' . $this->user->data['user_id'] . ' AND z.zebra_id = a.comment_user_id'
263
+						'ON'	=> 'z.user_id = '.$this->user->data['user_id'].' AND z.zebra_id = a.comment_user_id'
264 264
 					)
265 265
 			),
266
-			'WHERE'		=> 'a.comment_link_id = ' . (int) $link_id,
266
+			'WHERE'		=> 'a.comment_link_id = '.(int) $link_id,
267 267
 			'ORDER_BY'	=> 'a.comment_date DESC');
268 268
 		$sql = $this->db->sql_build_query('SELECT', $sql_array);
269 269
 		$result = $this->db->sql_query_limit($sql, $this->config['dir_comments_per_page'], $start);
@@ -292,12 +292,12 @@  discard block
 block discarded – undo
292 292
 				'S_COMMENT'			=> generate_text_for_display($comments['comment_text'], $comments['comment_uid'], $comments['comment_bitfield'], $comments['comment_flags']),
293 293
 				'S_ID'				=> $comments['comment_id'],
294 294
 
295
-				'U_EDIT'			=> ($edit_allowed) 		? $this->helper->route('ernadoo_phpbbdirectory_comment_edit_controller', array('link_id' => (int) $link_id, 'comment_id' => (int) $comments['comment_id'])) : '',
296
-				'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())) : '',
295
+				'U_EDIT'			=> ($edit_allowed) ? $this->helper->route('ernadoo_phpbbdirectory_comment_edit_controller', array('link_id' => (int) $link_id, 'comment_id' => (int) $comments['comment_id'])) : '',
296
+				'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())) : '',
297 297
 
298 298
 				'S_IGNORE_POST'		=> ($comments['foe'] && ($view != 'show' || $comment_id != $comments['comment_id'])) ? true : false,
299 299
 				'L_IGNORE_POST'		=> ($comments['foe']) ? $this->user->lang('POST_BY_FOE', get_username_string('full', $comments['comment_user_id'], $comments['username'], $comments['user_colour']), '<a href="'.$this->helper->url('directory/link/'.$link_id.'/comment'.(($page > 1) ? '/'.$page : '').'?view=show#c'.(int) $comments['comment_id']).'">', '</a>') : '',
300
-				'L_POST_DISPLAY'	=> ($comments['foe']) ? $this->user->lang('POST_DISPLAY', '<a class="display_post" data-post-id="' . $comments['comment_id'] . '" href="' . $this->helper->url('directory/link/'.$link_id.'/comment'.(($page > 1) ? '/'.$page : '').'?c='.(int) $comments['comment_id'] . '&view=show#c'.(int) $comments['comment_id']).'">', '</a>') : '',
300
+				'L_POST_DISPLAY'	=> ($comments['foe']) ? $this->user->lang('POST_DISPLAY', '<a class="display_post" data-post-id="'.$comments['comment_id'].'" href="'.$this->helper->url('directory/link/'.$link_id.'/comment'.(($page > 1) ? '/'.$page : '').'?c='.(int) $comments['comment_id'].'&view=show#c'.(int) $comments['comment_id']).'">', '</a>') : '',
301 301
 
302 302
 				'S_INFO'			=> $this->auth->acl_get('m_info'),
303 303
 			));
@@ -337,7 +337,7 @@  discard block
 block discarded – undo
337 337
 
338 338
 		if (!function_exists('validate_data'))
339 339
 		{
340
-			include($this->root_path . 'includes/functions_user.' . $this->php_ext);
340
+			include($this->root_path.'includes/functions_user.'.$this->php_ext);
341 341
 		}
342 342
 
343 343
 		$error = validate_data(
@@ -399,7 +399,7 @@  discard block
 block discarded – undo
399 399
 			$meta_info = $this->helper->route('ernadoo_phpbbdirectory_comment_view_controller', array('link_id' => (int) $link_id));
400 400
 			meta_refresh(3, $meta_info);
401 401
 			$message = $this->user->lang['DIR_'.strtoupper($mode).'_COMMENT_OK'];
402
-			$message = $message . '<br /><br />' . $this->user->lang('DIR_CLICK_RETURN_COMMENT', '<a href="' . $meta_info . '">', '</a>');
402
+			$message = $message.'<br /><br />'.$this->user->lang('DIR_CLICK_RETURN_COMMENT', '<a href="'.$meta_info.'">', '</a>');
403 403
 			return $this->helper->message($message);
404 404
 		}
405 405
 		else
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
 	private function _check_comments_enable($link_id)
423 423
 	{
424 424
 		$sql = 'SELECT link_cat
425
-			FROM ' . DIR_LINK_TABLE . '
425
+			FROM ' . DIR_LINK_TABLE.'
426 426
 			WHERE link_id = ' . (int) $link_id;
427 427
 		$result = $this->db->sql_query($sql);
428 428
 		$cat_id = (int) $this->db->sql_fetchfield('link_cat');
@@ -464,11 +464,11 @@  discard block
 block discarded – undo
464 464
 
465 465
 		if (!function_exists('generate_smilies'))
466 466
 		{
467
-			include($this->root_path . 'includes/functions_posting.' . $this->php_ext);
467
+			include($this->root_path.'includes/functions_posting.'.$this->php_ext);
468 468
 		}
469 469
 		if (!function_exists('display_custom_bbcodes'))
470 470
 		{
471
-			include($this->root_path . 'includes/functions_display.' . $this->php_ext);
471
+			include($this->root_path.'includes/functions_display.'.$this->php_ext);
472 472
 		}
473 473
 
474 474
 		generate_smilies('inline', 0);
@@ -478,11 +478,11 @@  discard block
 block discarded – undo
478 478
 		$this->template->assign_vars(array(
479 479
 			'S_AUTH_COMM' 		=> $this->auth->acl_get('u_comment_dir'),
480 480
 
481
-			'BBCODE_STATUS'		=> ($this->config['dir_allow_bbcode']) 	? $this->user->lang('BBCODE_IS_ON', '<a href="' . append_sid($this->root_path."faq.$this->php_ext", 'mode=bbcode') . '">', '</a>') : $this->user->lang('BBCODE_IS_OFF', '<a href="' . append_sid($this->root_path."faq.$this->php_ext", 'mode=bbcode') . '">', '</a>'),
482
-			'IMG_STATUS'		=> ($this->config['dir_allow_bbcode']) 	? $this->user->lang['IMAGES_ARE_ON'] : $this->user->lang['IMAGES_ARE_OFF'],
483
-			'SMILIES_STATUS'	=> ($this->config['dir_allow_smilies'])	? $this->user->lang['SMILIES_ARE_ON'] : $this->user->lang['SMILIES_ARE_OFF'],
484
-			'URL_STATUS'		=> ($this->config['dir_allow_links'])	? $this->user->lang['URL_IS_ON'] : $this->user->lang['URL_IS_OFF'],
485
-			'FLASH_STATUS'		=> ($this->config['dir_allow_bbcode'] && $this->config['dir_allow_flash'])	? $this->user->lang['FLASH_IS_ON'] : $this->user->lang['FLASH_IS_OFF'],
481
+			'BBCODE_STATUS'		=> ($this->config['dir_allow_bbcode']) ? $this->user->lang('BBCODE_IS_ON', '<a href="'.append_sid($this->root_path."faq.$this->php_ext", 'mode=bbcode').'">', '</a>') : $this->user->lang('BBCODE_IS_OFF', '<a href="'.append_sid($this->root_path."faq.$this->php_ext", 'mode=bbcode').'">', '</a>'),
482
+			'IMG_STATUS'		=> ($this->config['dir_allow_bbcode']) ? $this->user->lang['IMAGES_ARE_ON'] : $this->user->lang['IMAGES_ARE_OFF'],
483
+			'SMILIES_STATUS'	=> ($this->config['dir_allow_smilies']) ? $this->user->lang['SMILIES_ARE_ON'] : $this->user->lang['SMILIES_ARE_OFF'],
484
+			'URL_STATUS'		=> ($this->config['dir_allow_links']) ? $this->user->lang['URL_IS_ON'] : $this->user->lang['URL_IS_OFF'],
485
+			'FLASH_STATUS'		=> ($this->config['dir_allow_bbcode'] && $this->config['dir_allow_flash']) ? $this->user->lang['FLASH_IS_ON'] : $this->user->lang['FLASH_IS_OFF'],
486 486
 
487 487
 			'L_DIR_REPLY_EXP'	=> $this->user->lang('DIR_REPLY_EXP', $this->config['dir_length_comments']),
488 488
 
Please login to merge, or discard this patch.
controller/links.php 1 patch
Spacing   +39 added lines, -39 removed lines patch added patch discarded remove patch
@@ -86,19 +86,19 @@  discard block
 block discarded – undo
86 86
 	*/
87 87
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \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, \ernadoo\phpbbdirectory\core\helper $dir_helper, $root_path, $php_ext)
88 88
 	{
89
-		$this->db				= $db;
89
+		$this->db = $db;
90 90
 		$this->config			= $config;
91
-		$this->template			= $template;
91
+		$this->template = $template;
92 92
 		$this->user				= $user;
93 93
 		$this->helper			= $helper;
94
-		$this->request			= $request;
94
+		$this->request = $request;
95 95
 		$this->auth				= $auth;
96
-		$this->captcha_factory 	= $captcha_factory;
96
+		$this->captcha_factory = $captcha_factory;
97 97
 		$this->categorie		= $categorie;
98 98
 		$this->link				= $link;
99
-		$this->dir_helper		= $dir_helper;
99
+		$this->dir_helper = $dir_helper;
100 100
 		$this->root_path		= $root_path;
101
-		$this->php_ext			= $php_ext;
101
+		$this->php_ext = $php_ext;
102 102
 
103 103
 		$this->user->add_lang_ext('ernadoo/phpbbdirectory', 'directory');
104 104
 
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
124 124
 		}
125 125
 
126 126
 		$sql = 'SELECT link_user_id
127
-			FROM ' . DIR_LINK_TABLE . '
127
+			FROM ' . DIR_LINK_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);
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 
148 148
 			$meta_info = $this->helper->route('ernadoo_phpbbdirectory_page_controller', array('cat_id' => (int) $cat_id));
149 149
 			meta_refresh(3, $meta_info);
150
-			$message = $this->user->lang['DIR_DELETE_OK'] . '<br /><br />' . $this->user->lang('DIR_CLICK_RETURN_DIR', '<a href="' . $this->helper->route('ernadoo_phpbbdirectory_base_controller') . '">', '</a>') . '<br /><br />' . $this->user->lang('DIR_CLICK_RETURN_CAT', '<a href="' . $this->helper->route('ernadoo_phpbbdirectory_page_controller', array('cat_id' => (int) $cat_id)) . '">', '</a>');
150
+			$message = $this->user->lang['DIR_DELETE_OK'].'<br /><br />'.$this->user->lang('DIR_CLICK_RETURN_DIR', '<a href="'.$this->helper->route('ernadoo_phpbbdirectory_base_controller').'">', '</a>').'<br /><br />'.$this->user->lang('DIR_CLICK_RETURN_CAT', '<a href="'.$this->helper->route('ernadoo_phpbbdirectory_page_controller', array('cat_id' => (int) $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 ' . DIR_LINK_TABLE . '
170
+			FROM ' . DIR_LINK_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->user->lang['DIR_EDIT_SITE'];
186
+		$title = $this->user->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 ' . DIR_LINK_TABLE . '
206
+				FROM ' . DIR_LINK_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->user->lang['DIR_NEW_SITE'];
257
+		$title = $this->user->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 ' . DIR_VOTE_TABLE . '
321
+			FROM ' . DIR_VOTE_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);
@@ -332,7 +332,7 @@  discard block
 block discarded – undo
332 332
 
333 333
 		$meta_info = $this->helper->route('ernadoo_phpbbdirectory_page_controller', array('cat_id' => (int) $cat_id));
334 334
 		meta_refresh(3, $meta_info);
335
-		$message = $this->user->lang['DIR_VOTE_OK'] . '<br /><br />' . $this->user->lang('DIR_CLICK_RETURN_CAT', '<a href="' . $meta_info . '">', '</a>');
335
+		$message = $this->user->lang['DIR_VOTE_OK'].'<br /><br />'.$this->user->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,
@@ -500,7 +500,7 @@  discard block
 block discarded – undo
500 500
 			$meta_info = $this->helper->route('ernadoo_phpbbdirectory_page_controller', array('cat_id' => (int) $cat_id));
501 501
 			meta_refresh(3, $meta_info);
502 502
 			$message	= ($need_approval) ? $this->user->lang['DIR_'.strtoupper($mode).'_SITE_ACTIVE'] : $this->user->lang['DIR_'.strtoupper($mode).'_SITE_OK'];
503
-			$message	= $message . '<br /><br />' . $this->user->lang('DIR_CLICK_RETURN_DIR', '<a href="' . $this->helper->route('ernadoo_phpbbdirectory_base_controller') . '">', '</a>') . '<br /><br />' . $this->user->lang('DIR_CLICK_RETURN_CAT', '<a href="' . $this->helper->route('ernadoo_phpbbdirectory_page_controller', array('cat_id' => (int) $cat_id)) . '">', '</a>');
503
+			$message	= $message.'<br /><br />'.$this->user->lang('DIR_CLICK_RETURN_DIR', '<a href="'.$this->helper->route('ernadoo_phpbbdirectory_base_controller').'">', '</a>').'<br /><br />'.$this->user->lang('DIR_CLICK_RETURN_CAT', '<a href="'.$this->helper->route('ernadoo_phpbbdirectory_page_controller', array('cat_id' => (int) $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->dir_helper->get_banner_path($banner_img);
@@ -583,7 +583,7 @@  discard block
 block discarded – undo
583 583
 
584 584
 		if (!function_exists('display_custom_bbcodes'))
585 585
 		{
586
-			include($this->root_path . 'includes/functions_display.' . $this->php_ext);
586
+			include($this->root_path.'includes/functions_display.'.$this->php_ext);
587 587
 		}
588 588
 		display_custom_bbcodes();
589 589
 		add_form_key('dir_form');
@@ -592,17 +592,17 @@  discard block
 block discarded – undo
592 592
 		$flag_path = $ext_path.'images/flags/';
593 593
 
594 594
 		$s_guest	= (!$this->user->data['is_registered'] || !empty($this->guest_email));
595
-		$s_rss		= $this->config['dir_activ_rss'];
596
-		$s_banner	= $this->config['dir_activ_banner'];
595
+		$s_rss = $this->config['dir_activ_rss'];
596
+		$s_banner = $this->config['dir_activ_banner'];
597 597
 		$s_back		= $this->categorie->data['cat_link_back'];
598 598
 		$s_flag		= $this->config['dir_activ_flag'];
599 599
 
600 600
 		$this->template->assign_vars(array(
601
-			'BBCODE_STATUS'			=> ($this->config['allow_bbcode']) 	? $this->user->lang('BBCODE_IS_ON', '<a href="' . append_sid($this->root_path."faq.$this->php_ext", 'mode=bbcode') . '">', '</a>') : $this->user->lang('BBCODE_IS_OFF', '<a href="' . append_sid($this->root_path."faq.$this->php_ext", 'mode=bbcode') . '">', '</a>'),
602
-			'IMG_STATUS'			=> ($this->config['allow_bbcode'])	? $this->user->lang['IMAGES_ARE_ON'] : $this->user->lang['IMAGES_ARE_OFF'],
601
+			'BBCODE_STATUS'			=> ($this->config['allow_bbcode']) ? $this->user->lang('BBCODE_IS_ON', '<a href="'.append_sid($this->root_path."faq.$this->php_ext", 'mode=bbcode').'">', '</a>') : $this->user->lang('BBCODE_IS_OFF', '<a href="'.append_sid($this->root_path."faq.$this->php_ext", 'mode=bbcode').'">', '</a>'),
602
+			'IMG_STATUS'			=> ($this->config['allow_bbcode']) ? $this->user->lang['IMAGES_ARE_ON'] : $this->user->lang['IMAGES_ARE_OFF'],
603 603
 			'SMILIES_STATUS'		=> ($this->config['allow_smilies']) ? $this->user->lang['SMILIES_ARE_ON'] : $this->user->lang['SMILIES_ARE_OFF'],
604 604
 			'URL_STATUS'			=> ($this->config['allow_post_links']) ? $this->user->lang['URL_IS_ON'] : $this->user->lang['URL_IS_OFF'],
605
-			'FLASH_STATUS'			=> ($this->config['allow_bbcode'] && $this->config['allow_post_flash'])	? $this->user->lang['FLASH_IS_ON'] : $this->user->lang['FLASH_IS_OFF'],
605
+			'FLASH_STATUS'			=> ($this->config['allow_bbcode'] && $this->config['allow_post_flash']) ? $this->user->lang['FLASH_IS_ON'] : $this->user->lang['FLASH_IS_OFF'],
606 606
 
607 607
 			'L_TITLE'				=> $title,
608 608
 			'L_DIR_DESCRIPTION_EXP'	=> $this->user->lang('DIR_DESCRIPTION_EXP', $this->config['dir_length_describe']),
Please login to merge, or discard this patch.