Completed
Branch 3.3.x (9c8dfb)
by Erwan
02:13
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.
core/helper.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -29,8 +29,8 @@  discard block
 block discarded – undo
29 29
 	*/
30 30
 	public function __construct(\phpbb\extension\manager $phpbb_extension_manager, \phpbb\path_helper $path_helper)
31 31
 	{
32
-		$this->extension_manager	= $phpbb_extension_manager;
33
-		$this->path_helper			= $path_helper;
32
+		$this->extension_manager = $phpbb_extension_manager;
33
+		$this->path_helper = $path_helper;
34 34
 	}
35 35
 
36 36
 	/**
@@ -41,7 +41,7 @@  discard block
 block discarded – undo
41 41
 	*/
42 42
 	public function get_ext_name($web_root_path = false)
43 43
 	{
44
-		return (($web_root_path) ? $this->path_helper->get_web_root_path() : '') . $this->extension_manager->get_extension_path($this->ext_name);
44
+		return (($web_root_path) ? $this->path_helper->get_web_root_path() : '').$this->extension_manager->get_extension_path($this->ext_name);
45 45
 	}
46 46
 
47 47
 	/**
@@ -53,7 +53,7 @@  discard block
 block discarded – undo
53 53
 	*/
54 54
 	public function get_img_path($type, $image = '')
55 55
 	{
56
-		return $this->get_ext_name(true) . 'images/' . $type . '/' . $image;
56
+		return $this->get_ext_name(true).'images/'.$type.'/'.$image;
57 57
 	}
58 58
 
59 59
 	/**
@@ -64,7 +64,7 @@  discard block
 block discarded – undo
64 64
 	*/
65 65
 	public function get_banner_path($banner = '')
66 66
 	{
67
-		return 'files/' . $this->get_ext_name() . 'banners/' . $banner;
67
+		return 'files/'.$this->get_ext_name().'banners/'.$banner;
68 68
 	}
69 69
 
70 70
 	/**
Please login to merge, or discard this patch.
cron/task/core/prune_categorie.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -37,8 +37,8 @@  discard block
 block discarded – undo
37 37
 	*/
38 38
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \ernadoo\phpbbdirectory\core\link $directory_cron, $php_ext)
39 39
 	{
40
-		$this->db 				= $db;
41
-		$this->config 			= $config;
40
+		$this->db = $db;
41
+		$this->config = $config;
42 42
 		$this->dir_cron 		= $directory_cron;
43 43
 		$this->php_ext 			= $php_ext;
44 44
 	}
@@ -113,7 +113,7 @@  discard block
 block discarded – undo
113 113
 			$cat_id = $request->variable('c', 0);
114 114
 
115 115
 			$sql = 'SELECT cat_id, cat_cron_enable, cat_cron_next, cat_cron_freq, cat_cron_nb_check
116
-				FROM ' . DIR_CAT_TABLE . "
116
+				FROM ' . DIR_CAT_TABLE."
117 117
 				WHERE cat_id = $cat_id";
118 118
 			$result = $this->db->sql_query($sql);
119 119
 			$row = $this->db->sql_fetchrow($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.
controller/acp/validation.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -85,21 +85,21 @@  discard block
 block discarded – undo
85 85
 	*/
86 86
 	public function __construct(\phpbb\config\config $config, \phpbb\db\driver\driver_interface $db, \phpbb\pagination $pagination, \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\helper $dir_helper, \ernadoo\phpbbdirectory\core\link $link, $root_path, $php_ext)
87 87
 	{
88
-		$this->config		= $config;
89
-		$this->db			= $db;
90
-		$this->pagination	= $pagination;
88
+		$this->config = $config;
89
+		$this->db = $db;
90
+		$this->pagination = $pagination;
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
-		$this->dir_helper	= $dir_helper;
97
+		$this->dir_helper = $dir_helper;
98 98
 		$this->link			= $link;
99 99
 		$this->root_path	= $root_path;
100
-		$this->php_ext		= $php_ext;
100
+		$this->php_ext = $php_ext;
101 101
 
102
-		$this->action		= $this->request->variable('action', '');
102
+		$this->action = $this->request->variable('action', '');
103 103
 	}
104 104
 
105 105
 	/**
@@ -128,14 +128,14 @@  discard block
 block discarded – undo
128 128
 		global $phpbb_admin_path;
129 129
 
130 130
 		// Sort keys
131
-		$sort_days	= $this->request->variable('st', 0);
131
+		$sort_days = $this->request->variable('st', 0);
132 132
 		$sort_key	= $this->request->variable('sk', 't');
133 133
 		$sort_dir	= $this->request->variable('sd', 'd');
134 134
 
135 135
 		// Number of entries to display
136 136
 		$per_page = $this->request->variable('links_per_page', (int) $this->config['dir_show']);
137 137
 
138
-		$start	= $this->request->variable('start', 0);
138
+		$start = $this->request->variable('start', 0);
139 139
 
140 140
 		// Categorie ordering options
141 141
 		$limit_days		= array(0 => $this->user->lang['SEE_ALL'], 1 => $this->user->lang['1_DAY'], 7 => $this->user->lang['7_DAYS'], 14 => $this->user->lang['2_WEEKS'], 30 => $this->user->lang['1_MONTH'], 90 => $this->user->lang['3_MONTHS'], 180 => $this->user->lang['6_MONTHS'], 365 => $this->user->lang['1_YEAR']);
@@ -151,15 +151,15 @@  discard block
 block discarded – undo
151 151
 
152 152
 		if (is_array($sort_by_sql[$sort_key]))
153 153
 		{
154
-			$sql_sort_order = implode(' ' . $direction . ', ', $sort_by_sql[$sort_key]) . ' ' . $direction;
154
+			$sql_sort_order = implode(' '.$direction.', ', $sort_by_sql[$sort_key]).' '.$direction;
155 155
 		}
156 156
 		else
157 157
 		{
158
-			$sql_sort_order = $sort_by_sql[$sort_key] . ' ' . $direction;
158
+			$sql_sort_order = $sort_by_sql[$sort_key].' '.$direction;
159 159
 		}
160 160
 
161 161
 		$sql = 'SELECT COUNT(1) AS total_links
162
-			FROM ' . DIR_LINK_TABLE . '
162
+			FROM ' . DIR_LINK_TABLE.'
163 163
 			WHERE link_active = 0' .
164 164
 				(($sql_where) ? " AND link_time >= $sql_where" : '');
165 165
 		$result = $this->db->sql_query($sql);
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 					'ON'	=> 'u.user_id = l.link_user_id'
184 184
 				)
185 185
 			),
186
-			'WHERE'		=> 'l.link_active = 0' . (($sql_where) ? " AND l.link_time >= $sql_where" : ''),
186
+			'WHERE'		=> 'l.link_active = 0'.(($sql_where) ? " AND l.link_time >= $sql_where" : ''),
187 187
 			'ORDER_BY'	=> $sql_sort_order);
188 188
 
189 189
 		$sql = $this->db->sql_build_query('SELECT', $sql_array);
@@ -210,7 +210,7 @@  discard block
 block discarded – undo
210 210
 
211 211
 		$option_ary = array('approved' => 'DIR_LINK_ACTIVATE', 'disapproved' => 'DIR_LINK_DELETE');
212 212
 
213
-		$base_url = $this->u_action . "&$u_sort_param&links_per_page=$per_page";
213
+		$base_url = $this->u_action."&$u_sort_param&links_per_page=$per_page";
214 214
 		$this->pagination->generate_template_pagination($base_url, 'pagination', 'start', $total_links, $per_page, $start);
215 215
 
216 216
 		$this->template->assign_vars(array(
@@ -221,7 +221,7 @@  discard block
 block discarded – undo
221 221
 			'S_SORT_DIR'		=> $s_sort_dir,
222 222
 			'LINKS_PER_PAGE'	=> $per_page,
223 223
 
224
-			'U_ACTION'			=> $this->u_action . "&$u_sort_param&links_per_page=$per_page&start=$start",
224
+			'U_ACTION'			=> $this->u_action."&$u_sort_param&links_per_page=$per_page&start=$start",
225 225
 		));
226 226
 	}
227 227
 
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 				return;
250 250
 		}
251 251
 
252
-		$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
+		$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)));
253 253
 	}
254 254
 
255 255
 	/**
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 	{
262 262
 		if (!class_exists('messenger'))
263 263
 		{
264
-			include($this->root_path . 'includes/functions_messenger.' . $this->php_ext);
264
+			include($this->root_path.'includes/functions_messenger.'.$this->php_ext);
265 265
 		}
266 266
 		$messenger = new \messenger(false);
267 267
 
@@ -328,15 +328,15 @@  discard block
 block discarded – undo
328 328
 				'link_cat'		=> (int) $row['link_cat'],
329 329
 			);
330 330
 
331
-			$sql = 'UPDATE ' . DIR_LINK_TABLE . '
332
-							SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . '
331
+			$sql = 'UPDATE '.DIR_LINK_TABLE.'
332
+							SET ' . $this->db->sql_build_array('UPDATE', $sql_ary).'
333 333
 							WHERE link_id = ' . (int) $row['link_id'];
334 334
 			$this->db->sql_query($sql);
335 335
 		}
336 336
 
337 337
 		foreach ($this->cat_data as $cat_id => $count)
338 338
 		{
339
-			$sql = 'UPDATE ' . DIR_CAT_TABLE . '
339
+			$sql = 'UPDATE '.DIR_CAT_TABLE.'
340 340
 							SET cat_links = cat_links + '.$count.'
341 341
 							WHERE cat_id = ' . (int) $cat_id;
342 342
 			$this->db->sql_query($sql);
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
 				}
363 363
 			}
364 364
 
365
-			$sql = 'DELETE FROM ' . DIR_LINK_TABLE . ' WHERE link_id = ' . (int) $row['link_id'];
365
+			$sql = 'DELETE FROM '.DIR_LINK_TABLE.' WHERE link_id = '.(int) $row['link_id'];
366 366
 			$this->db->sql_query($sql);
367 367
 		}
368 368
 	}
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
@@ -67,20 +67,20 @@  discard block
 block discarded – undo
67 67
 			$match_search_query = '';
68 68
 			foreach ($matches as $match)
69 69
 			{
70
-				$match_search_query .= (($match_search_query) ? ' OR ' : '') . 'LOWER('. $match . ') ';
71
-				$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()));
70
+				$match_search_query .= (($match_search_query) ? ' OR ' : '').'LOWER('.$match.') ';
71
+				$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 72
 			}
73
-			$search_query .= ((!$search_query) ? '' : (($terms == 'all') ? ' AND ' : ' OR ')) . '(' . $match_search_query . ')';
73
+			$search_query .= ((!$search_query) ? '' : (($terms == 'all') ? ' AND ' : ' OR ')).'('.$match_search_query.')';
74 74
 		}
75 75
 		$direction = (($sort_dir == 'd') ? 'DESC' : 'ASC');
76 76
 
77 77
 		if (is_array($sort_by_sql[$sort_key]))
78 78
 		{
79
-			$sql_sort_order = implode(' ' . $direction . ', ', $sort_by_sql[$sort_key]) . ' ' . $direction;
79
+			$sql_sort_order = implode(' '.$direction.', ', $sort_by_sql[$sort_key]).' '.$direction;
80 80
 		}
81 81
 		else
82 82
 		{
83
-			$sql_sort_order = $sort_by_sql[$sort_key] . ' ' . $direction;
83
+			$sql_sort_order = $sort_by_sql[$sort_key].' '.$direction;
84 84
 		}
85 85
 
86 86
 		$sql_array = array(
@@ -88,10 +88,10 @@  discard block
 block discarded – undo
88 88
 			'FROM'		=> array(
89 89
 					DIR_LINK_TABLE	=> 'l'),
90 90
 			'WHERE'		=> 'l.link_active = 1
91
-				' . (($search_query) ? 'AND (' . $search_query . ')' : '') . '
92
-				' . (sizeof($ex_cid_ary) ? ' AND ' . $this->db->sql_in_set('l.link_cat', $ex_cid_ary, true) : '') . '
93
-				' . (($cat_id) ? ' AND ' . $this->db->sql_in_set('l.link_cat', $cat_id) : '') . '
94
-				' . (($sort_days) ? ' AND l.link_time >= ' . (time() - ($sort_days * 86400)) : ''),
91
+				' . (($search_query) ? 'AND ('.$search_query.')' : '').'
92
+				' . (sizeof($ex_cid_ary) ? ' AND '.$this->db->sql_in_set('l.link_cat', $ex_cid_ary, true) : '').'
93
+				' . (($cat_id) ? ' AND '.$this->db->sql_in_set('l.link_cat', $cat_id) : '').'
94
+				' . (($sort_days) ? ' AND l.link_time >= '.(time() - ($sort_days * 86400)) : ''),
95 95
 			'ORDER_BY'	=> $sql_sort_order
96 96
 		);
97 97
 
Please login to merge, or discard this patch.