Completed
Push — 3.2.x ( 0f953a...5a2f7e )
by Erwan
01:52
created
acp/phpbbdirectory_info.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -18,11 +18,11 @@
 block discarded – undo
18 18
 			'filename'		=> '\ernadoo\phpbbdirectory\acp\phpbbdirectory_module',
19 19
 			'title'			=> 'ACP_DIRECTORY',
20 20
 			'modes'			=> array(
21
-				''				=> array('title' => 'ACP_DIRECTORY',			'auth'	=> 'ext_ernadoo/phpbbdirectory', 'cat' => array('')),
22
-				'main'			=> array('title' => 'ACP_DIRECTORY_MAIN',		'auth'	=> 'ext_ernadoo/phpbbdirectory', 'cat' => array('ACP_DIRECTORY')),
23
-				'settings'		=> array('title' => 'ACP_DIRECTORY_SETTINGS',	'auth'	=> 'ext_ernadoo/phpbbdirectory', 'cat' => array('ACP_DIRECTORY')),
24
-				'cat'			=> array('title' => 'ACP_DIRECTORY_CATS',		'auth'	=> 'ext_ernadoo/phpbbdirectory', 'cat' => array('ACP_DIRECTORY')),
25
-				'val'			=> array('title' => 'ACP_DIRECTORY_VAL',		'auth'	=> 'ext_ernadoo/phpbbdirectory', 'cat' => array('ACP_DIRECTORY')),
21
+				''				=> array('title' => 'ACP_DIRECTORY', 'auth'	=> 'ext_ernadoo/phpbbdirectory', 'cat' => array('')),
22
+				'main'			=> array('title' => 'ACP_DIRECTORY_MAIN', 'auth'	=> 'ext_ernadoo/phpbbdirectory', 'cat' => array('ACP_DIRECTORY')),
23
+				'settings'		=> array('title' => 'ACP_DIRECTORY_SETTINGS', 'auth'	=> 'ext_ernadoo/phpbbdirectory', 'cat' => array('ACP_DIRECTORY')),
24
+				'cat'			=> array('title' => 'ACP_DIRECTORY_CATS', 'auth'	=> 'ext_ernadoo/phpbbdirectory', 'cat' => array('ACP_DIRECTORY')),
25
+				'val'			=> array('title' => 'ACP_DIRECTORY_VAL', 'auth'	=> 'ext_ernadoo/phpbbdirectory', 'cat' => array('ACP_DIRECTORY')),
26 26
 			),
27 27
 		);
28 28
 	}
Please login to merge, or discard this patch.
migrations/v10x/v1_0_0.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	{
24 24
 		return array(
25 25
 			'add_tables' => array(
26
-				$this->table_prefix . 'directory_cats' => array(
26
+				$this->table_prefix.'directory_cats' => array(
27 27
 					'COLUMNS' => array(
28 28
 						'cat_id'				=> array('UINT', null, 'auto_increment'),
29 29
 						'parent_id'				=> array('UINT', 0),
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 					),
58 58
 				),
59 59
 
60
-				$this->table_prefix . 'directory_comments' => array(
60
+				$this->table_prefix.'directory_comments' => array(
61 61
 					'COLUMNS' => array(
62 62
 						'comment_id' 		=> array('UINT', null, 'auto_increment'),
63 63
 						'comment_date' 		=> array('TIMESTAMP', 0),
@@ -73,7 +73,7 @@  discard block
 block discarded – undo
73 73
 					'PRIMARY_KEY'	=> array('comment_id'),
74 74
 				),
75 75
 
76
-				$this->table_prefix . 'directory_links' => array(
76
+				$this->table_prefix.'directory_links' => array(
77 77
 					'COLUMNS' => array(
78 78
 						'link_id'			=> array('UINT', null, 'auto_increment'),
79 79
 						'link_time' 		=> array('TIMESTAMP', 0),
@@ -110,7 +110,7 @@  discard block
 block discarded – undo
110 110
 					),
111 111
 				),
112 112
 
113
-				$this->table_prefix . 'directory_watch' => array(
113
+				$this->table_prefix.'directory_watch' => array(
114 114
 					'COLUMNS' => array(
115 115
 						'cat_id'		=> array('UINT', 0),
116 116
 						'user_id'		=> array('UINT', 0),
@@ -125,7 +125,7 @@  discard block
 block discarded – undo
125 125
 
126 126
 				),
127 127
 
128
-				$this->table_prefix . 'directory_votes' => array(
128
+				$this->table_prefix.'directory_votes' => array(
129 129
 					'COLUMNS' => array(
130 130
 						'vote_id'			=> array('UINT', null, 'auto_increment'),
131 131
 						'vote_link_id'		=> array('UINT', 0),
@@ -148,11 +148,11 @@  discard block
 block discarded – undo
148 148
 	{
149 149
 		return array(
150 150
 			'drop_tables'	=> array(
151
-				$this->table_prefix . 'directory_cats',
152
-				$this->table_prefix . 'directory_comments',
153
-				$this->table_prefix . 'directory_links',
154
-				$this->table_prefix . 'directory_votes',
155
-				$this->table_prefix . 'directory_watch',
151
+				$this->table_prefix.'directory_cats',
152
+				$this->table_prefix.'directory_comments',
153
+				$this->table_prefix.'directory_links',
154
+				$this->table_prefix.'directory_votes',
155
+				$this->table_prefix.'directory_watch',
156 156
 			),
157 157
 		);
158 158
 	}
@@ -272,10 +272,10 @@  discard block
 block discarded – undo
272 272
 
273 273
 		foreach ($directories as $dir)
274 274
 		{
275
-			if (!file_exists($this->phpbb_root_path . $dir))
275
+			if (!file_exists($this->phpbb_root_path.$dir))
276 276
 			{
277
-				@mkdir($this->phpbb_root_path . $dir, 0777, true);
278
-				phpbb_chmod($this->phpbb_root_path . $dir, CHMOD_READ | CHMOD_WRITE);
277
+				@mkdir($this->phpbb_root_path.$dir, 0777, true);
278
+				phpbb_chmod($this->phpbb_root_path.$dir, CHMOD_READ | CHMOD_WRITE);
279 279
 			}
280 280
 		}
281 281
 	}
@@ -287,7 +287,7 @@  discard block
 block discarded – undo
287 287
 	*/
288 288
 	public function remove_directories()
289 289
 	{
290
-		$dir = $this->phpbb_root_path . 'files/ext/ernadoo/phpbbdirectory/';
290
+		$dir = $this->phpbb_root_path.'files/ext/ernadoo/phpbbdirectory/';
291 291
 
292 292
 		$this->_recursive_rmdir($dir);
293 293
 	}
Please login to merge, or discard this patch.
migrations/converter/convert_module.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -24,7 +24,7 @@  discard block
 block discarded – undo
24 24
 	public function effectively_installed()
25 25
 	{
26 26
 		$sql = 'SELECT module_id
27
-			FROM ' . $this->table_prefix . "modules
27
+			FROM ' . $this->table_prefix."modules
28 28
 			WHERE module_class = 'acp'
29 29
 				AND module_basename = 'acp_directory'
30 30
 				AND module_mode = 'main'";
@@ -56,8 +56,8 @@  discard block
 block discarded – undo
56 56
 			'module_auth'		=> 'ext_ernadoo/phpbbdirectory'
57 57
 		);
58 58
 
59
-		$sql = 'UPDATE '  . $this->table_prefix . 'modules
60
-			SET ' . $this->db->sql_build_array('UPDATE', $module_data) . "
59
+		$sql = 'UPDATE '.$this->table_prefix.'modules
60
+			SET ' . $this->db->sql_build_array('UPDATE', $module_data)."
61 61
 			WHERE module_basename = 'acp_directory'
62 62
 				AND module_mode IN ('main', 'settings', 'cat', 'val')";
63 63
 		$this->db->sql_query($sql);
Please login to merge, or discard this patch.
migrations/converter/convert_notifications.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -23,7 +23,7 @@  discard block
 block discarded – undo
23 23
 	*/
24 24
 	public function effectively_installed()
25 25
 	{
26
-		return !$this->db_tools->sql_table_exists($this->table_prefix . 'directory_notifications');
26
+		return !$this->db_tools->sql_table_exists($this->table_prefix.'directory_notifications');
27 27
 	}
28 28
 
29 29
 	static public function depends_on()
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
 	public function copy_from_notifications()
55 55
 	{
56 56
 		$sql = 'SELECT n_user_id, n_cat_id
57
-			FROM ' . $this->table_prefix . 'directory_notifications';
57
+			FROM ' . $this->table_prefix.'directory_notifications';
58 58
 		$result = $this->db->sql_query($sql);
59 59
 
60 60
 		while ($row = $this->db->sql_fetchrow($result))
@@ -65,7 +65,7 @@  discard block
 block discarded – undo
65 65
 				'notify_status'	=> 1,
66 66
 			);
67 67
 
68
-			$sql = 'INSERT INTO ' . $this->table_prefix . 'directory_watch ' . $this->db->sql_build_array('INSERT', $data);
68
+			$sql = 'INSERT INTO '.$this->table_prefix.'directory_watch '.$this->db->sql_build_array('INSERT', $data);
69 69
 			$this->db->sql_query($sql);
70 70
 		}
71 71
 		$this->db->sql_freeresult($result);
Please login to merge, or discard this patch.
ext.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -155,7 +155,7 @@
 block discarded – undo
155 155
 
156 156
 		foreach ($notification_types as $notification_type)
157 157
 		{
158
-			call_user_func(array($phpbb_notifications, $step . '_notifications'), $notification_type);
158
+			call_user_func(array($phpbb_notifications, $step.'_notifications'), $notification_type);
159 159
 		}
160 160
 
161 161
 		return 'notifications';
Please login to merge, or discard this patch.
acp/phpbbdirectory_module.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -204,7 +204,7 @@  discard block
 block discarded – undo
204 204
 		{
205 205
 			$selected = ($url == $url_selected) ? 'selected="selected"' : '';
206 206
 
207
-			$select_options .= '<option value="' . $url . '" ' . $selected . '>' . parse_url($url, PHP_URL_HOST) . '</option>';
207
+			$select_options .= '<option value="'.$url.'" '.$selected.'>'.parse_url($url, PHP_URL_HOST).'</option>';
208 208
 		}
209 209
 
210 210
 		return $select_options;
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 		{
238 238
 			$selected = ($i == $order_selected) ? 'selected="selected"' : '';
239 239
 			$order_substr = trim(str_replace(' ', '_', $i));
240
-			$tpl .= '<option value="' . $i . '" ' . $selected . '>' . $user->lang['DIR_ORDER_' . strtoupper($order_substr)] . '</option>';
240
+			$tpl .= '<option value="'.$i.'" '.$selected.'>'.$user->lang['DIR_ORDER_'.strtoupper($order_substr)].'</option>';
241 241
 		}
242 242
 
243 243
 		return ($tpl);
@@ -254,6 +254,6 @@  discard block
 block discarded – undo
254 254
 		$value = $filesize['value'];
255 255
 
256 256
 		// size and maxlength must not be specified for input of type number
257
-		return '<input type="number" id="' . $key . '" min="0" max="999999999999999" step="any" name="config[' . $key . ']" value="' . $value . '" /> <select name="' . $key . '">' . size_select_options($size_var) . '</select>';
257
+		return '<input type="number" id="'.$key.'" min="0" max="999999999999999" step="any" name="config['.$key.']" value="'.$value.'" /> <select name="'.$key.'">'.size_select_options($size_var).'</select>';
258 258
 	}
259 259
 }
Please login to merge, or discard this patch.
migrations/v20x/v2_0_0.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -45,7 +45,7 @@  discard block
 block discarded – undo
45 45
 		{
46 46
 			$default_reparser = new $fast_reparsers[0][0](
47 47
 				$this->db,
48
-				$this->container->getParameter('core.table_prefix') . $fast_reparsers[0][1]);
48
+				$this->container->getParameter('core.table_prefix').$fast_reparsers[0][1]);
49 49
 
50 50
 			$resume_data = array(
51 51
 				'reparser'	=> 0,
@@ -60,7 +60,7 @@  discard block
 block discarded – undo
60 60
 		{
61 61
 			$reparser = new $fast_reparsers[$resume_data['reparser']][0](
62 62
 				$this->db,
63
-				$this->container->getParameter('core.table_prefix') . $fast_reparsers[$resume_data['reparser']][1]
63
+				$this->container->getParameter('core.table_prefix').$fast_reparsers[$resume_data['reparser']][1]
64 64
 				);
65 65
 
66 66
 			// New reparser
Please login to merge, or discard this patch.
controller/comments.php 1 patch
Spacing   +28 added lines, -28 removed lines patch added patch discarded remove patch
@@ -80,16 +80,16 @@  discard block
 block discarded – undo
80 80
 	*/
81 81
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\language\language $language, \phpbb\template\template $template, \phpbb\user $user, \phpbb\controller\helper $helper, \phpbb\request\request $request, \phpbb\auth\auth $auth, \phpbb\pagination $pagination, \phpbb\captcha\factory $captcha_factory, \ernadoo\phpbbdirectory\core\categorie $categorie, \ernadoo\phpbbdirectory\core\comment $comment, $root_path, $php_ext)
82 82
 	{
83
-		$this->db				= $db;
84
-		$this->config			= $config;
83
+		$this->db = $db;
84
+		$this->config = $config;
85 85
 		$this->language			= $language;
86 86
 		$this->template			= $template;
87 87
 		$this->user				= $user;
88
-		$this->helper			= $helper;
89
-		$this->request			= $request;
88
+		$this->helper = $helper;
89
+		$this->request = $request;
90 90
 		$this->auth				= $auth;
91
-		$this->pagination		= $pagination;
92
-		$this->captcha_factory 	= $captcha_factory;
91
+		$this->pagination = $pagination;
92
+		$this->captcha_factory = $captcha_factory;
93 93
 		$this->categorie		= $categorie;
94 94
 		$this->comment			= $comment;
95 95
 		$this->root_path		= $root_path;
@@ -130,7 +130,7 @@  discard block
 block discarded – undo
130 130
 		}
131 131
 
132 132
 		$sql = 'SELECT *
133
-			FROM ' . $this->comments_table . '
133
+			FROM ' . $this->comments_table.'
134 134
 			WHERE comment_id = ' . (int) $comment_id;
135 135
 		$result = $this->db->sql_query($sql);
136 136
 		$value = $this->db->sql_fetchrow($result);
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 			$meta_info = $this->helper->route('ernadoo_phpbbdirectory_comment_view_controller', array('link_id' => (int) $link_id));
148 148
 			meta_refresh(3, $meta_info);
149 149
 			$message = $this->language->lang('DIR_COMMENT_DELETE_OK');
150
-			$message = $message . '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_COMMENT', '<a href="' . $meta_info . '">', '</a>');
150
+			$message = $message.'<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_COMMENT', '<a href="'.$meta_info.'">', '</a>');
151 151
 			return $this->helper->message($message);
152 152
 		}
153 153
 		else
@@ -169,7 +169,7 @@  discard block
 block discarded – undo
169 169
 		$this->_check_comments_enable($link_id);
170 170
 
171 171
 		$sql = 'SELECT *
172
-			FROM ' . $this->comments_table . '
172
+			FROM ' . $this->comments_table.'
173 173
 			WHERE comment_id = ' . (int) $comment_id;
174 174
 		$result = $this->db->sql_query($sql);
175 175
 		$value = $this->db->sql_fetchrow($result);
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 		$comment_text = generate_text_for_edit($value['comment_text'], $value['comment_uid'], $value['comment_flags']);
183 183
 		$this->s_comment = $comment_text['text'];
184 184
 
185
-		$submit	= $this->request->is_set_post('update_comment') ? true : false;
185
+		$submit = $this->request->is_set_post('update_comment') ? true : false;
186 186
 
187 187
 		// If form is done
188 188
 		if ($submit)
@@ -238,15 +238,15 @@  discard block
 block discarded – undo
238 238
 		$this->_check_comments_enable($link_id);
239 239
 
240 240
 		$comment_id = $this->request->variable('c', 0);
241
-		$view 		= $this->request->variable('view', '');
242
-		$start 		= ($page - 1) * $this->config['dir_comments_per_page'];
241
+		$view = $this->request->variable('view', '');
242
+		$start = ($page - 1) * $this->config['dir_comments_per_page'];
243 243
 
244 244
 		$this->s_hidden_fields = array_merge($this->s_hidden_fields, array('page' => $page));
245 245
 
246 246
 		$this->_populate_form($link_id, $mode);
247 247
 
248 248
 		$sql = 'SELECT COUNT(comment_id) AS nb_comments
249
-			FROM ' . $this->comments_table . '
249
+			FROM ' . $this->comments_table.'
250 250
 			WHERE comment_link_id = ' . (int) $link_id;
251 251
 		$result = $this->db->sql_query($sql);
252 252
 		$nb_comments = (int) $this->db->sql_fetchfield('nb_comments');
@@ -266,10 +266,10 @@  discard block
 block discarded – undo
266 266
 					),
267 267
 					array(
268 268
 						'FROM'	=> array(ZEBRA_TABLE => 'z'),
269
-						'ON'	=> 'z.user_id = ' . $this->user->data['user_id'] . ' AND z.zebra_id = a.comment_user_id'
269
+						'ON'	=> 'z.user_id = '.$this->user->data['user_id'].' AND z.zebra_id = a.comment_user_id'
270 270
 					)
271 271
 			),
272
-			'WHERE'		=> 'a.comment_link_id = ' . (int) $link_id,
272
+			'WHERE'		=> 'a.comment_link_id = '.(int) $link_id,
273 273
 			'ORDER_BY'	=> 'a.comment_date DESC');
274 274
 		$sql = $this->db->sql_build_query('SELECT', $sql_array);
275 275
 		$result = $this->db->sql_query_limit($sql, $this->config['dir_comments_per_page'], $start);
@@ -298,12 +298,12 @@  discard block
 block discarded – undo
298 298
 				'S_COMMENT'			=> generate_text_for_display($comments['comment_text'], $comments['comment_uid'], $comments['comment_bitfield'], $comments['comment_flags']),
299 299
 				'S_ID'				=> $comments['comment_id'],
300 300
 
301
-				'U_EDIT'			=> ($edit_allowed) 		? $this->helper->route('ernadoo_phpbbdirectory_comment_edit_controller', array('link_id' => (int) $link_id, 'comment_id' => (int) $comments['comment_id'])) : '',
302
-				'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())) : '',
301
+				'U_EDIT'			=> ($edit_allowed) ? $this->helper->route('ernadoo_phpbbdirectory_comment_edit_controller', array('link_id' => (int) $link_id, 'comment_id' => (int) $comments['comment_id'])) : '',
302
+				'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())) : '',
303 303
 
304 304
 				'S_IGNORE_POST'		=> ($comments['foe'] && ($view != 'show' || $comment_id != $comments['comment_id'])) ? true : false,
305 305
 				'L_IGNORE_POST'		=> ($comments['foe']) ? $this->language->lang('POST_BY_FOE', get_username_string('full', $comments['comment_user_id'], $comments['username'], $comments['user_colour']), '<a href="'.$this->helper->url('directory/link/'.$link_id.'/comment'.(($page > 1) ? '/'.$page : '').'?view=show#c'.(int) $comments['comment_id']).'">', '</a>') : '',
306
-				'L_POST_DISPLAY'	=> ($comments['foe']) ? $this->language->lang('POST_DISPLAY', '<a class="display_post" data-post-id="' . $comments['comment_id'] . '" href="' . $this->helper->url('directory/link/'.$link_id.'/comment'.(($page > 1) ? '/'.$page : '').'?c='.(int) $comments['comment_id'] . '&view=show#c'.(int) $comments['comment_id']).'">', '</a>') : '',
306
+				'L_POST_DISPLAY'	=> ($comments['foe']) ? $this->language->lang('POST_DISPLAY', '<a class="display_post" data-post-id="'.$comments['comment_id'].'" href="'.$this->helper->url('directory/link/'.$link_id.'/comment'.(($page > 1) ? '/'.$page : '').'?c='.(int) $comments['comment_id'].'&view=show#c'.(int) $comments['comment_id']).'">', '</a>') : '',
307 307
 
308 308
 				'S_INFO'			=> $this->auth->acl_get('m_info'),
309 309
 			));
@@ -343,7 +343,7 @@  discard block
 block discarded – undo
343 343
 
344 344
 		if (!function_exists('validate_data'))
345 345
 		{
346
-			include($this->root_path . 'includes/functions_user.' . $this->php_ext);
346
+			include($this->root_path.'includes/functions_user.'.$this->php_ext);
347 347
 		}
348 348
 
349 349
 		$error = validate_data(
@@ -405,7 +405,7 @@  discard block
 block discarded – undo
405 405
 			$meta_info = $this->helper->route('ernadoo_phpbbdirectory_comment_view_controller', array('link_id' => (int) $link_id));
406 406
 			meta_refresh(3, $meta_info);
407 407
 			$message = $this->language->lang('DIR_'.strtoupper($mode).'_COMMENT_OK');
408
-			$message = $message . '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_COMMENT', '<a href="' . $meta_info . '">', '</a>');
408
+			$message = $message.'<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_COMMENT', '<a href="'.$meta_info.'">', '</a>');
409 409
 			return $this->helper->message($message);
410 410
 		}
411 411
 		else
@@ -428,7 +428,7 @@  discard block
 block discarded – undo
428 428
 	private function _check_comments_enable($link_id)
429 429
 	{
430 430
 		$sql = 'SELECT link_cat
431
-			FROM ' . $this->links_table . '
431
+			FROM ' . $this->links_table.'
432 432
 			WHERE link_id = ' . (int) $link_id;
433 433
 		$result = $this->db->sql_query($sql);
434 434
 		$cat_id = (int) $this->db->sql_fetchfield('link_cat');
@@ -470,11 +470,11 @@  discard block
 block discarded – undo
470 470
 
471 471
 		if (!function_exists('generate_smilies'))
472 472
 		{
473
-			include($this->root_path . 'includes/functions_posting.' . $this->php_ext);
473
+			include($this->root_path.'includes/functions_posting.'.$this->php_ext);
474 474
 		}
475 475
 		if (!function_exists('display_custom_bbcodes'))
476 476
 		{
477
-			include($this->root_path . 'includes/functions_display.' . $this->php_ext);
477
+			include($this->root_path.'includes/functions_display.'.$this->php_ext);
478 478
 		}
479 479
 
480 480
 		generate_smilies('inline', 0);
@@ -484,11 +484,11 @@  discard block
 block discarded – undo
484 484
 		$this->template->assign_vars(array(
485 485
 			'S_AUTH_COMM' 		=> $this->auth->acl_get('u_comment_dir'),
486 486
 
487
-			'BBCODE_STATUS'		=> ($this->config['dir_allow_bbcode']) 	? $this->language->lang('BBCODE_IS_ON', '<a href="' . append_sid($this->root_path."faq.$this->php_ext", 'mode=bbcode') . '">', '</a>') : $this->language->lang('BBCODE_IS_OFF', '<a href="' . append_sid($this->root_path."faq.$this->php_ext", 'mode=bbcode') . '">', '</a>'),
488
-			'IMG_STATUS'		=> ($this->config['dir_allow_bbcode']) 	? $this->language->lang('IMAGES_ARE_ON') : $this->language->lang('IMAGES_ARE_OFF'),
489
-			'SMILIES_STATUS'	=> ($this->config['dir_allow_smilies'])	? $this->language->lang('SMILIES_ARE_ON') : $this->language->lang('SMILIES_ARE_OFF'),
490
-			'URL_STATUS'		=> ($this->config['dir_allow_links'])	? $this->language->lang('URL_IS_ON') : $this->language->lang('URL_IS_OFF'),
491
-			'FLASH_STATUS'		=> ($this->config['dir_allow_bbcode'] && $this->config['dir_allow_flash'])	? $this->language->lang('FLASH_IS_ON') : $this->language->lang('FLASH_IS_OFF'),
487
+			'BBCODE_STATUS'		=> ($this->config['dir_allow_bbcode']) ? $this->language->lang('BBCODE_IS_ON', '<a href="'.append_sid($this->root_path."faq.$this->php_ext", 'mode=bbcode').'">', '</a>') : $this->language->lang('BBCODE_IS_OFF', '<a href="'.append_sid($this->root_path."faq.$this->php_ext", 'mode=bbcode').'">', '</a>'),
488
+			'IMG_STATUS'		=> ($this->config['dir_allow_bbcode']) ? $this->language->lang('IMAGES_ARE_ON') : $this->language->lang('IMAGES_ARE_OFF'),
489
+			'SMILIES_STATUS'	=> ($this->config['dir_allow_smilies']) ? $this->language->lang('SMILIES_ARE_ON') : $this->language->lang('SMILIES_ARE_OFF'),
490
+			'URL_STATUS'		=> ($this->config['dir_allow_links']) ? $this->language->lang('URL_IS_ON') : $this->language->lang('URL_IS_OFF'),
491
+			'FLASH_STATUS'		=> ($this->config['dir_allow_bbcode'] && $this->config['dir_allow_flash']) ? $this->language->lang('FLASH_IS_ON') : $this->language->lang('FLASH_IS_OFF'),
492 492
 
493 493
 			'L_DIR_REPLY_EXP'	=> $this->language->lang('DIR_REPLY_EXP', $this->config['dir_length_comments']),
494 494
 
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
@@ -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
 
@@ -124,7 +124,7 @@  discard block
 block discarded – undo
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);
@@ -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->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_page_controller', array('cat_id' => (int) $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_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 ' . $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);
@@ -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->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,
@@ -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->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_page_controller', array('cat_id' => (int) $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_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->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.