Completed
Push — 3.3.x ( 21c685...3ad265 )
by Erwan
02:49
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/search.php 1 patch
Spacing   +26 added lines, -26 removed lines patch added patch discarded remove patch
@@ -69,18 +69,18 @@  discard block
 block discarded – undo
69 69
 	*/
70 70
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\language\language $language, \phpbb\template\template $template, \phpbb\user $user, \phpbb\controller\helper $helper, \phpbb\request\request $request, \phpbb\auth\auth $auth, \phpbb\pagination $pagination, \ernadoo\phpbbdirectory\search\fulltext_directory $search, \ernadoo\phpbbdirectory\core\categorie $categorie, \ernadoo\phpbbdirectory\core\link $link)
71 71
 	{
72
-		$this->db			= $db;
73
-		$this->config		= $config;
72
+		$this->db = $db;
73
+		$this->config = $config;
74 74
 		$this->language		= $language;
75 75
 		$this->template		= $template;
76 76
 		$this->user			= $user;
77
-		$this->helper		= $helper;
78
-		$this->request		= $request;
77
+		$this->helper = $helper;
78
+		$this->request = $request;
79 79
 		$this->auth			= $auth;
80
-		$this->pagination	= $pagination;
81
-		$this->search		= $search;
82
-		$this->categorie	= $categorie;
83
-		$this->link			= $link;
80
+		$this->pagination = $pagination;
81
+		$this->search = $search;
82
+		$this->categorie = $categorie;
83
+		$this->link = $link;
84 84
 
85 85
 		$language->add_lang('directory', 'ernadoo/phpbbdirectory');
86 86
 		$language->add_lang('search');
@@ -104,24 +104,24 @@  discard block
 block discarded – undo
104 104
 			throw new \phpbb\exception\http_exception(403, 'DIR_ERROR_NOT_AUTH');
105 105
 		}
106 106
 
107
-		$cat_id				= $this->request->variable('cat_id', 0);
108
-		$keywords			= $this->request->variable('keywords', '', true);
107
+		$cat_id = $this->request->variable('cat_id', 0);
108
+		$keywords = $this->request->variable('keywords', '', true);
109 109
 		$search_terms		= $this->request->variable('terms', 'all');
110
-		$search_category	= $this->request->variable('cid', array(0));
111
-		$search_fields		= $this->request->variable('sf', 'all');
110
+		$search_category = $this->request->variable('cid', array(0));
111
+		$search_fields = $this->request->variable('sf', 'all');
112 112
 		$search_child		= $this->request->variable('sc', true);
113
-		$sort_days			= $this->request->variable('st', 0);
113
+		$sort_days = $this->request->variable('st', 0);
114 114
 		$sort_key			= $this->request->variable('sk', 't');
115 115
 		$sort_dir			= $this->request->variable('sd', 'd');
116
-		$start				= ($page - 1) * (int) $this->config['dir_show'];
116
+		$start = ($page - 1) * (int) $this->config['dir_show'];
117 117
 
118
-		$default_sort_days	= 0;
118
+		$default_sort_days = 0;
119 119
 		$default_sort_key	= (string) substr($this->config['dir_default_order'], 0, 1);
120 120
 		$default_sort_dir	= (string) substr($this->config['dir_default_order'], 2);
121 121
 
122 122
 		// Categorie ordering options
123 123
 		$limit_days		= array(0 => $this->language->lang('ALL_RESULTS'), 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'));
124
-		$sort_by_text	= array('a' => $this->language->lang('AUTHOR'), 't' => $this->language->lang('POST_TIME'), 'r' => $this->language->lang('DIR_COMMENTS_ORDER'), 's' =>  $this->language->lang('DIR_NAME_ORDER'), 'v' => $this->language->lang('DIR_NB_CLICKS_ORDER'));
124
+		$sort_by_text = array('a' => $this->language->lang('AUTHOR'), 't' => $this->language->lang('POST_TIME'), 'r' => $this->language->lang('DIR_COMMENTS_ORDER'), 's' =>  $this->language->lang('DIR_NAME_ORDER'), 'v' => $this->language->lang('DIR_NB_CLICKS_ORDER'));
125 125
 		$sort_by_sql	= array('a' => 'u.username_clean', 't' => array('l.link_time', 'l.link_id'), 'r' => 'l.link_comment', 's' => 'LOWER(l.link_name)', 'v' => 'l.link_view');
126 126
 
127 127
 		if ($this->config['dir_activ_pagerank'])
@@ -170,12 +170,12 @@  discard block
 block discarded – undo
170 170
 
171 171
 			$u_hilit = urlencode(htmlspecialchars_decode(str_replace('|', ' ', $hilit)));
172 172
 
173
-			($u_hilit) 					? $u_search['keywords']		= urlencode(htmlspecialchars_decode($keywords)) : '';
174
-			($search_terms != 'all') 	? $u_search['terms']		= $search_terms : '';
175
-			($cat_id)					? $u_search['cat_id']		= $cat_id : '';
176
-			($search_category)			? $u_search['cid']			= $search_category : '';
177
-			(!$search_child)			? $u_search['sc']			= 0 : '';
178
-			($search_fields != 'all')	? $u_search['sf'] 			= $search_fields : '';
173
+			($u_hilit) ? $u_search['keywords'] = urlencode(htmlspecialchars_decode($keywords)) : '';
174
+			($search_terms != 'all') ? $u_search['terms'] = $search_terms : '';
175
+			($cat_id) ? $u_search['cat_id'] = $cat_id : '';
176
+			($search_category) ? $u_search['cid'] = $search_category : '';
177
+			(!$search_child) ? $u_search['sc'] = 0 : '';
178
+			($search_fields != 'all') ? $u_search['sf'] = $search_fields : '';
179 179
 
180 180
 			$base_url = array(
181 181
 				'routes'	=> 'ernadoo_phpbbdirectory_search_controller',
@@ -249,7 +249,7 @@  discard block
 block discarded – undo
249 249
 
250 250
 					foreach ($rowset as $data)
251 251
 					{
252
-						$s_banner	= $this->link->display_bann($data);
252
+						$s_banner = $this->link->display_bann($data);
253 253
 						$s_thumb	= $this->link->display_thumb($data);
254 254
 						$s_flag		= $this->link->display_flag($data);
255 255
 
@@ -257,8 +257,8 @@  discard block
 block discarded – undo
257 257
 
258 258
 						if ($hilit)
259 259
 						{
260
-							$data['link_name'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#isu', '<span class="posthilit">$1</span>', $data['link_name']);
261
-							$data['link_description'] = preg_replace('#(?!<.*)(?<!\w)(' . $hilit . ')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#isu', '<span class="posthilit">$1</span>', $data['link_description']);
260
+							$data['link_name'] = preg_replace('#(?!<.*)(?<!\w)('.$hilit.')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#isu', '<span class="posthilit">$1</span>', $data['link_name']);
261
+							$data['link_description'] = preg_replace('#(?!<.*)(?<!\w)('.$hilit.')(?!\w|[^<>]*(?:</s(?:cript|tyle))?>)#isu', '<span class="posthilit">$1</span>', $data['link_description']);
262 262
 						}
263 263
 
264 264
 						$this->template->assign_block_vars('results', array(
@@ -328,7 +328,7 @@  discard block
 block discarded – undo
328 328
 	private function _get_exclude_categories(&$search_category, $search_child)
329 329
 	{
330 330
 		$sql = 'SELECT cat_id, parent_id, right_id
331
-				FROM ' . $this->categories_table . '
331
+				FROM ' . $this->categories_table.'
332 332
 				ORDER BY left_id';
333 333
 		$result = $this->db->sql_query($sql);
334 334
 
Please login to merge, or discard this patch.
controller/categories.php 1 patch
Spacing   +22 added lines, -22 removed lines patch added patch discarded remove patch
@@ -64,16 +64,16 @@  discard block
 block discarded – undo
64 64
 	*/
65 65
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\language\language $language, \phpbb\template\template $template, \phpbb\user $user, \phpbb\controller\helper $helper, \phpbb\request\request $request, \phpbb\auth\auth $auth, \phpbb\pagination $pagination, \ernadoo\phpbbdirectory\core\categorie $categorie, \ernadoo\phpbbdirectory\core\link $link)
66 66
 	{
67
-		$this->db			= $db;
68
-		$this->config		= $config;
67
+		$this->db = $db;
68
+		$this->config = $config;
69 69
 		$this->language		= $language;
70 70
 		$this->template		= $template;
71 71
 		$this->user			= $user;
72
-		$this->helper		= $helper;
73
-		$this->request		= $request;
72
+		$this->helper = $helper;
73
+		$this->request = $request;
74 74
 		$this->auth			= $auth;
75
-		$this->pagination	= $pagination;
76
-		$this->categorie	= $categorie;
75
+		$this->pagination = $pagination;
76
+		$this->categorie = $categorie;
77 77
 		$this->link			= $link;
78 78
 
79 79
 		$language->add_lang('directory', 'ernadoo/phpbbdirectory');
@@ -117,18 +117,18 @@  discard block
 block discarded – undo
117 117
 
118 118
 		$start = ($page - 1) * $this->config['dir_show'];
119 119
 
120
-		$default_sort_days	= 0;
120
+		$default_sort_days = 0;
121 121
 		$default_sort_key	= (string) substr($this->config['dir_default_order'], 0, 1);
122 122
 		$default_sort_dir	= (string) substr($this->config['dir_default_order'], 2);
123 123
 
124 124
 		$sort_days	= (!$sort_days) ? $this->request->variable('st', $default_sort_days) : $sort_days;
125 125
 		$sort_key 	= (!$sort_key) ? $this->request->variable('sk', $default_sort_key) : $sort_key;
126
-		$sort_dir	= (!$sort_dir) ? $this->request->variable('sd', $default_sort_dir) : $sort_dir;
126
+		$sort_dir = (!$sort_dir) ? $this->request->variable('sd', $default_sort_dir) : $sort_dir;
127 127
 		$link_list = $rowset = array();
128 128
 
129 129
 		// Categorie ordering options
130 130
 		$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'));
131
-		$sort_by_text	= array('a' => $this->language->lang('AUTHOR'), 't' => $this->language->lang('POST_TIME'), 'r' => $this->language->lang('DIR_COMMENTS_ORDER'), 's' =>  $this->language->lang('DIR_NAME_ORDER'), 'v' => $this->language->lang('DIR_NB_CLICKS_ORDER'));
131
+		$sort_by_text = array('a' => $this->language->lang('AUTHOR'), 't' => $this->language->lang('POST_TIME'), 'r' => $this->language->lang('DIR_COMMENTS_ORDER'), 's' =>  $this->language->lang('DIR_NAME_ORDER'), 'v' => $this->language->lang('DIR_NB_CLICKS_ORDER'));
132 132
 		$sort_by_sql	= array('a' => 'u.username_clean', 't' => array('l.link_time', 'l.link_id'), 'r' => 'l.link_comment', 's' => 'LOWER(l.link_name)', 'v' => 'l.link_view');
133 133
 
134 134
 		if ($this->config['dir_activ_pagerank'])
@@ -167,8 +167,8 @@  discard block
 block discarded – undo
167 167
 			$min_post_time = time() - ($sort_days * 86400);
168 168
 
169 169
 			$sql = 'SELECT COUNT(link_id) AS nb_links
170
-				FROM ' . $this->links_table . '
171
-				WHERE link_cat = ' . (int) $cat_id . '
170
+				FROM ' . $this->links_table.'
171
+				WHERE link_cat = ' . (int) $cat_id.'
172 172
 					AND link_time >= ' . $min_post_time;
173 173
 			$result = $this->db->sql_query($sql);
174 174
 			$nb_links = (int) $this->db->sql_fetchfield('nb_links');
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 		else
184 184
 		{
185 185
 			$sql_limit_time = '';
186
-			$nb_links		= (int) $this->categorie->data['cat_links'];
186
+			$nb_links = (int) $this->categorie->data['cat_links'];
187 187
 		}
188 188
 
189 189
 		// Make sure $start is set to the last page if it exceeds the amount
@@ -246,11 +246,11 @@  discard block
 block discarded – undo
246 246
 
247 247
 		if (is_array($sort_by_sql[$sort_key]))
248 248
 		{
249
-			$sql_sort_order = implode(' ' . $direction . ', ', $sort_by_sql[$sort_key]) . ' ' . $direction;
249
+			$sql_sort_order = implode(' '.$direction.', ', $sort_by_sql[$sort_key]).' '.$direction;
250 250
 		}
251 251
 		else
252 252
 		{
253
-			$sql_sort_order = $sort_by_sql[$sort_key] . ' ' . $direction;
253
+			$sql_sort_order = $sort_by_sql[$sort_key].' '.$direction;
254 254
 		}
255 255
 
256 256
 		// Grab just the sorted link ids
@@ -293,7 +293,7 @@  discard block
 block discarded – undo
293 293
 						),
294 294
 						array(
295 295
 							'FROM'	=> array($this->votes_table => 'v'),
296
-							'ON'	=> 'l.link_id = v.vote_link_id AND v.vote_user_id = ' . $this->user->data['user_id']
296
+							'ON'	=> 'l.link_id = v.vote_link_id AND v.vote_user_id = '.$this->user->data['user_id']
297 297
 						)
298 298
 				),
299 299
 				'WHERE'		=> $this->db->sql_in_set('l.link_id', $link_list)
@@ -310,8 +310,8 @@  discard block
 block discarded – undo
310 310
 
311 311
 			$link_list = ($store_reverse) ? array_reverse($link_list) : $link_list;
312 312
 
313
-			$votes_status 		= ($this->categorie->data['cat_allow_votes']) ? true : false;
314
-			$comments_status 	= ($this->categorie->data['cat_allow_comments']) ? true : false;
313
+			$votes_status = ($this->categorie->data['cat_allow_votes']) ? true : false;
314
+			$comments_status = ($this->categorie->data['cat_allow_comments']) ? true : false;
315 315
 
316 316
 			foreach ($link_list as $link_id)
317 317
 			{
@@ -321,11 +321,11 @@  discard block
 block discarded – undo
321 321
 				$s_note		= $this->link->display_note($site['link_note'], $site['link_vote'], $votes_status);
322 322
 				$s_thumb	= $this->link->display_thumb($site);
323 323
 				$s_vote		= $this->link->display_vote($site);
324
-				$s_banner	= $this->link->display_bann($site);
325
-				$s_pr		= $this->link->display_pagerank($site);
326
-				$s_rss		= $this->link->display_rss($site);
324
+				$s_banner = $this->link->display_bann($site);
325
+				$s_pr = $this->link->display_pagerank($site);
326
+				$s_rss = $this->link->display_rss($site);
327 327
 
328
-				$edit_allowed 	= ($this->user->data['is_registered'] && ($this->auth->acl_get('m_edit_dir') || ($this->user->data['user_id'] == $site['link_user_id'] && $this->auth->acl_get('u_edit_dir'))));
328
+				$edit_allowed = ($this->user->data['is_registered'] && ($this->auth->acl_get('m_edit_dir') || ($this->user->data['user_id'] == $site['link_user_id'] && $this->auth->acl_get('u_edit_dir'))));
329 329
 				$delete_allowed = ($this->user->data['is_registered'] && ($this->auth->acl_get('m_delete_dir') || ($this->user->data['user_id'] == $site['link_user_id'] && $this->auth->acl_get('u_delete_dir'))));
330 330
 
331 331
 				$this->template->assign_block_vars('site', array(
@@ -362,7 +362,7 @@  discard block
 block discarded – undo
362 362
 			$this->template->assign_block_vars('no_draw_link', array());
363 363
 		}
364 364
 
365
-		$page_title = $this->language->lang('DIRECTORY') . ' - ' . $this->categorie->data['cat_name'];
365
+		$page_title = $this->language->lang('DIRECTORY').' - '.$this->categorie->data['cat_name'];
366 366
 
367 367
 		$this->categorie->display();
368 368
 
Please login to merge, or discard this patch.