Completed
Push — 3.2.x ( 83259b...375400 )
by Erwan
02:07
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_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.
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/acp/validation.php 1 patch
Spacing   +21 added lines, -21 removed lines patch added patch discarded remove patch
@@ -84,21 +84,21 @@  discard block
 block discarded – undo
84 84
 	*/
85 85
 	public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\pagination $pagination, \phpbb\language\language $language, \phpbb\log\log $log, \phpbb\notification\manager $notification, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user, \ernadoo\phpbbdirectory\core\categorie $categorie, \ernadoo\phpbbdirectory\core\link $link, $root_path, $php_ext)
86 86
 	{
87
-		$this->config		= $config;
88
-		$this->db			= $db;
89
-		$this->pagination	= $pagination;
87
+		$this->config = $config;
88
+		$this->db = $db;
89
+		$this->pagination = $pagination;
90 90
 		$this->language		= $language;
91 91
 		$this->phpbb_log	= $log;
92
-		$this->notification	= $notification;
93
-		$this->request		= $request;
92
+		$this->notification = $notification;
93
+		$this->request = $request;
94 94
 		$this->template		= $template;
95 95
 		$this->user			= $user;
96 96
 		$this->categorie	= $categorie;
97 97
 		$this->link			= $link;
98 98
 		$this->root_path	= $root_path;
99
-		$this->php_ext		= $php_ext;
99
+		$this->php_ext = $php_ext;
100 100
 
101
-		$this->action		= $this->request->variable('action', '');
101
+		$this->action = $this->request->variable('action', '');
102 102
 	}
103 103
 
104 104
 	/**
@@ -127,14 +127,14 @@  discard block
 block discarded – undo
127 127
 		global $phpbb_admin_path;
128 128
 
129 129
 		// Sort keys
130
-		$sort_days	= $this->request->variable('st', 0);
130
+		$sort_days = $this->request->variable('st', 0);
131 131
 		$sort_key	= $this->request->variable('sk', 't');
132 132
 		$sort_dir	= $this->request->variable('sd', 'd');
133 133
 
134 134
 		// Number of entries to display
135 135
 		$per_page = $this->request->variable('links_per_page', (int) $this->config['dir_show']);
136 136
 
137
-		$start	= $this->request->variable('start', 0);
137
+		$start = $this->request->variable('start', 0);
138 138
 
139 139
 		// Categorie ordering options
140 140
 		$limit_days		= array(0 => $this->language->lang('SEE_ALL'), 1 => $this->language->lang('1_DAY'), 7 => $this->language->lang('7_DAYS'), 14 => $this->language->lang('2_WEEKS'), 30 => $this->language->lang('1_MONTH'), 90 => $this->language->lang('3_MONTHS'), 180 => $this->language->lang('6_MONTHS'), 365 => $this->language->lang('1_YEAR'));
@@ -150,15 +150,15 @@  discard block
 block discarded – undo
150 150
 
151 151
 		if (is_array($sort_by_sql[$sort_key]))
152 152
 		{
153
-			$sql_sort_order = implode(' ' . $direction . ', ', $sort_by_sql[$sort_key]) . ' ' . $direction;
153
+			$sql_sort_order = implode(' '.$direction.', ', $sort_by_sql[$sort_key]).' '.$direction;
154 154
 		}
155 155
 		else
156 156
 		{
157
-			$sql_sort_order = $sort_by_sql[$sort_key] . ' ' . $direction;
157
+			$sql_sort_order = $sort_by_sql[$sort_key].' '.$direction;
158 158
 		}
159 159
 
160 160
 		$sql = 'SELECT COUNT(1) AS total_links
161
-			FROM ' . $this->links_table . '
161
+			FROM ' . $this->links_table.'
162 162
 			WHERE link_active = 0' .
163 163
 				(($sql_where) ? " AND link_time >= $sql_where" : '');
164 164
 		$result = $this->db->sql_query($sql);
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 					'ON'	=> 'u.user_id = l.link_user_id'
183 183
 				)
184 184
 			),
185
-			'WHERE'		=> 'l.link_active = 0' . (($sql_where) ? " AND l.link_time >= $sql_where" : ''),
185
+			'WHERE'		=> 'l.link_active = 0'.(($sql_where) ? " AND l.link_time >= $sql_where" : ''),
186 186
 			'ORDER_BY'	=> $sql_sort_order);
187 187
 
188 188
 		$sql = $this->db->sql_build_query('SELECT', $sql_array);
@@ -209,7 +209,7 @@  discard block
 block discarded – undo
209 209
 
210 210
 		$option_ary = array('approved' => 'DIR_LINK_ACTIVATE', 'disapproved' => 'DIR_LINK_DELETE');
211 211
 
212
-		$base_url = $this->u_action . "&amp;$u_sort_param&amp;links_per_page=$per_page";
212
+		$base_url = $this->u_action."&amp;$u_sort_param&amp;links_per_page=$per_page";
213 213
 		$this->pagination->generate_template_pagination($base_url, 'pagination', 'start', $total_links, $per_page, $start);
214 214
 
215 215
 		$this->template->assign_vars(array(
@@ -220,7 +220,7 @@  discard block
 block discarded – undo
220 220
 			'S_SORT_DIR'		=> $s_sort_dir,
221 221
 			'LINKS_PER_PAGE'	=> $per_page,
222 222
 
223
-			'U_ACTION'			=> $this->u_action . "&amp;$u_sort_param&amp;links_per_page=$per_page&amp;start=$start",
223
+			'U_ACTION'			=> $this->u_action."&amp;$u_sort_param&amp;links_per_page=$per_page&amp;start=$start",
224 224
 		));
225 225
 	}
226 226
 
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 				return;
249 249
 		}
250 250
 
251
-		$this->phpbb_log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_LINK_' . strtoupper($this->action), time(), array(implode(', ', $this->affected_link_name)));
251
+		$this->phpbb_log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_LINK_'.strtoupper($this->action), time(), array(implode(', ', $this->affected_link_name)));
252 252
 	}
253 253
 
254 254
 	/**
@@ -260,7 +260,7 @@  discard block
 block discarded – undo
260 260
 	{
261 261
 		if (!class_exists('messenger'))
262 262
 		{
263
-			include($this->root_path . 'includes/functions_messenger.' . $this->php_ext);
263
+			include($this->root_path.'includes/functions_messenger.'.$this->php_ext);
264 264
 		}
265 265
 		$messenger = new \messenger(false);
266 266
 
@@ -327,15 +327,15 @@  discard block
 block discarded – undo
327 327
 				'link_cat'		=> (int) $row['link_cat'],
328 328
 			);
329 329
 
330
-			$sql = 'UPDATE ' . $this->links_table . '
331
-							SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . '
330
+			$sql = 'UPDATE '.$this->links_table.'
331
+							SET ' . $this->db->sql_build_array('UPDATE', $sql_ary).'
332 332
 							WHERE link_id = ' . (int) $row['link_id'];
333 333
 			$this->db->sql_query($sql);
334 334
 		}
335 335
 
336 336
 		foreach ($this->cat_data as $cat_id => $count)
337 337
 		{
338
-			$sql = 'UPDATE ' . $this->categories_table . '
338
+			$sql = 'UPDATE '.$this->categories_table.'
339 339
 							SET cat_links = cat_links + '.$count.'
340 340
 							WHERE cat_id = ' . (int) $cat_id;
341 341
 			$this->db->sql_query($sql);
@@ -361,7 +361,7 @@  discard block
 block discarded – undo
361 361
 				}
362 362
 			}
363 363
 
364
-			$sql = 'DELETE FROM ' . $this->links_table . ' WHERE link_id = ' . (int) $row['link_id'];
364
+			$sql = 'DELETE FROM '.$this->links_table.' WHERE link_id = '.(int) $row['link_id'];
365 365
 			$this->db->sql_query($sql);
366 366
 		}
367 367
 	}
Please login to merge, or discard this patch.
core/comment.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -28,8 +28,8 @@  discard block
 block discarded – undo
28 28
 	*/
29 29
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\language\language $language)
30 30
 	{
31
-		$this->db		= $db;
32
-		$this->language	= $language;
31
+		$this->db = $db;
32
+		$this->language = $language;
33 33
 	}
34 34
 
35 35
 	/**
@@ -42,10 +42,10 @@  discard block
 block discarded – undo
42 42
 	{
43 43
 		$this->db->sql_transaction('begin');
44 44
 
45
-		$sql = 'INSERT INTO ' . $this->comments_table . ' ' . $this->db->sql_build_array('INSERT', $data);
45
+		$sql = 'INSERT INTO '.$this->comments_table.' '.$this->db->sql_build_array('INSERT', $data);
46 46
 		$this->db->sql_query($sql);
47 47
 
48
-		$sql = 'UPDATE ' . $this->links_table . '
48
+		$sql = 'UPDATE '.$this->links_table.'
49 49
 			SET link_comment = link_comment + 1
50 50
 			WHERE link_id = ' . (int) $data['comment_link_id'];
51 51
 		$this->db->sql_query($sql);
@@ -62,8 +62,8 @@  discard block
 block discarded – undo
62 62
 	*/
63 63
 	public function edit($data, $comment_id)
64 64
 	{
65
-		$sql = 'UPDATE ' . $this->comments_table . '
66
-			SET ' . $this->db->sql_build_array('UPDATE', $data) . '
65
+		$sql = 'UPDATE '.$this->comments_table.'
66
+			SET ' . $this->db->sql_build_array('UPDATE', $data).'
67 67
 			WHERE comment_id = ' . (int) $comment_id;
68 68
 		$this->db->sql_query($sql);
69 69
 	}
@@ -81,10 +81,10 @@  discard block
 block discarded – undo
81 81
 
82 82
 		$this->db->sql_transaction('begin');
83 83
 
84
-		$sql = 'DELETE FROM ' . $this->comments_table . ' WHERE comment_id = ' . (int) $comment_id;
84
+		$sql = 'DELETE FROM '.$this->comments_table.' WHERE comment_id = '.(int) $comment_id;
85 85
 		$this->db->sql_query($sql);
86 86
 
87
-		$sql = 'UPDATE ' . $this->links_table . '
87
+		$sql = 'UPDATE '.$this->links_table.'
88 88
 			SET link_comment = link_comment - 1
89 89
 			WHERE link_id = ' . (int) $link_id;
90 90
 		$this->db->sql_query($sql);
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
 		if ($request->is_ajax())
95 95
 		{
96 96
 			$sql = 'SELECT COUNT(comment_id) AS nb_comments
97
-				FROM ' . $this->comments_table . '
97
+				FROM ' . $this->comments_table.'
98 98
 				WHERE comment_link_id = ' . (int) $link_id;
99 99
 			$result = $this->db->sql_query($sql);
100 100
 			$nb_comments = (int) $this->db->sql_fetchfield('nb_comments');
Please login to merge, or discard this patch.
search/fulltext_directory.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -69,20 +69,20 @@  discard block
 block discarded – undo
69 69
 			$match_search_query = '';
70 70
 			foreach ($matches as $match)
71 71
 			{
72
-				$match_search_query .= (($match_search_query) ? ' OR ' : '') . 'LOWER('. $match . ') ';
73
-				$match_search_query .= $this->db->sql_like_expression(str_replace('*', $this->db->get_any_char(), $this->db->get_any_char() . strtolower($word) . $this->db->get_any_char()));
72
+				$match_search_query .= (($match_search_query) ? ' OR ' : '').'LOWER('.$match.') ';
73
+				$match_search_query .= $this->db->sql_like_expression(str_replace('*', $this->db->get_any_char(), $this->db->get_any_char().strtolower($word).$this->db->get_any_char()));
74 74
 			}
75
-			$search_query .= ((!$search_query) ? '' : (($terms == 'all') ? ' AND ' : ' OR ')) . '(' . $match_search_query . ')';
75
+			$search_query .= ((!$search_query) ? '' : (($terms == 'all') ? ' AND ' : ' OR ')).'('.$match_search_query.')';
76 76
 		}
77 77
 		$direction = (($sort_dir == 'd') ? 'DESC' : 'ASC');
78 78
 
79 79
 		if (is_array($sort_by_sql[$sort_key]))
80 80
 		{
81
-			$sql_sort_order = implode(' ' . $direction . ', ', $sort_by_sql[$sort_key]) . ' ' . $direction;
81
+			$sql_sort_order = implode(' '.$direction.', ', $sort_by_sql[$sort_key]).' '.$direction;
82 82
 		}
83 83
 		else
84 84
 		{
85
-			$sql_sort_order = $sort_by_sql[$sort_key] . ' ' . $direction;
85
+			$sql_sort_order = $sort_by_sql[$sort_key].' '.$direction;
86 86
 		}
87 87
 
88 88
 		$sql_array = array(
@@ -90,10 +90,10 @@  discard block
 block discarded – undo
90 90
 			'FROM'		=> array(
91 91
 					$this->links_table	=> 'l'),
92 92
 			'WHERE'		=> 'l.link_active = 1
93
-				' . (($search_query) ? 'AND (' . $search_query . ')' : '') . '
94
-				' . (sizeof($ex_cid_ary) ? ' AND ' . $this->db->sql_in_set('l.link_cat', $ex_cid_ary, true) : '') . '
95
-				' . (($cat_id) ? ' AND ' . $this->db->sql_in_set('l.link_cat', $cat_id) : '') . '
96
-				' . (($sort_days) ? ' AND l.link_time >= ' . (time() - ($sort_days * 86400)) : ''),
93
+				' . (($search_query) ? 'AND ('.$search_query.')' : '').'
94
+				' . (sizeof($ex_cid_ary) ? ' AND '.$this->db->sql_in_set('l.link_cat', $ex_cid_ary, true) : '').'
95
+				' . (($cat_id) ? ' AND '.$this->db->sql_in_set('l.link_cat', $cat_id) : '').'
96
+				' . (($sort_days) ? ' AND l.link_time >= '.(time() - ($sort_days * 86400)) : ''),
97 97
 			'ORDER_BY'	=> $sql_sort_order
98 98
 		);
99 99
 
Please login to merge, or discard this patch.
core/helper.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -44,7 +44,7 @@  discard block
 block discarded – undo
44 44
 	*/
45 45
 	public function set_extension_manager(\phpbb\extension\manager $phpbb_extension_manager)
46 46
 	{
47
-		$this->extension_manager	= $phpbb_extension_manager;
47
+		$this->extension_manager = $phpbb_extension_manager;
48 48
 	}
49 49
 
50 50
 	/**
@@ -70,11 +70,11 @@  discard block
 block discarded – undo
70 70
 	*/
71 71
 	public function set_tables($categories_table, $comments_table, $links_table, $votes_table, $watch_table)
72 72
 	{
73
-		$this->comments_table		= $comments_table;
73
+		$this->comments_table = $comments_table;
74 74
 		$this->links_table			= $links_table;
75 75
 		$this->votes_table			= $votes_table;
76 76
 		$this->watch_table			= $watch_table;
77
-		$this->categories_table		= $categories_table;
77
+		$this->categories_table = $categories_table;
78 78
 	}
79 79
 	/**
80 80
 	* Return ext name
@@ -84,7 +84,7 @@  discard block
 block discarded – undo
84 84
 	*/
85 85
 	public function get_ext_name($web_root_path = false)
86 86
 	{
87
-		return (($web_root_path) ? $this->path_helper->get_web_root_path() : '') . $this->extension_manager->get_extension_path($this->ext_name);
87
+		return (($web_root_path) ? $this->path_helper->get_web_root_path() : '').$this->extension_manager->get_extension_path($this->ext_name);
88 88
 	}
89 89
 
90 90
 	/**
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 	*/
97 97
 	public function get_img_path($type, $image = '')
98 98
 	{
99
-		return $this->get_ext_name(true) . 'images/' . $type . '/' . $image;
99
+		return $this->get_ext_name(true).'images/'.$type.'/'.$image;
100 100
 	}
101 101
 
102 102
 	/**
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 	*/
108 108
 	public function get_banner_path($banner = '')
109 109
 	{
110
-		return 'files/' . $this->get_ext_name() . 'banners/' . $banner;
110
+		return 'files/'.$this->get_ext_name().'banners/'.$banner;
111 111
 	}
112 112
 
113 113
 	/**
Please login to merge, or discard this patch.