Completed
Push — 3.2.x ( d8070d...5ec8e2 )
by Erwan
03:06
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.
controller/acp/cat.php 1 patch
Spacing   +14 added lines, -14 removed lines patch added patch discarded remove patch
@@ -86,24 +86,24 @@  discard block
 block discarded – undo
86 86
 	*/
87 87
 	public function __construct(\phpbb\cache\service $cache, \phpbb\db\driver\driver_interface $db, \phpbb\controller\helper $helper, \phpbb\language\language $language, \phpbb\log\log $log, \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\nestedset_category $nestedset_category)
88 88
 	{
89
-		$this->cache				= $cache;
90
-		$this->db					= $db;
91
-		$this->helper				= $helper;
89
+		$this->cache = $cache;
90
+		$this->db = $db;
91
+		$this->helper = $helper;
92 92
 		$this->language				= $language;
93 93
 		$this->phpbb_log			= $log;
94
-		$this->request				= $request;
94
+		$this->request = $request;
95 95
 		$this->template				= $template;
96
-		$this->user					= $user;
96
+		$this->user = $user;
97 97
 		$this->categorie			= $categorie;
98
-		$this->dir_helper			= $dir_helper;
99
-		$this->nestedset_category	= $nestedset_category;
98
+		$this->dir_helper = $dir_helper;
99
+		$this->nestedset_category = $nestedset_category;
100 100
 
101 101
 		$this->form_key = 'acp_dir_cat';
102 102
 		add_form_key($this->form_key);
103 103
 
104 104
 		$this->action		= $this->request->variable('action', '');
105 105
 		$this->cat_id		= $request->variable('c', 0);
106
-		$this->parent_id	= $request->variable('parent_id', 0);
106
+		$this->parent_id = $request->variable('parent_id', 0);
107 107
 		$this->update		= ($this->request->is_set_post('update')) ? true : false;
108 108
 	}
109 109
 
@@ -538,10 +538,10 @@  discard block
 block discarded – undo
538 538
 		switch ($this->action)
539 539
 		{
540 540
 			case 'delete':
541
-				$action_subcats	= $this->request->variable('action_subcats', '');
542
-				$subcats_to_id	= $this->request->variable('subcats_to_id', 0);
543
-				$action_links	= $this->request->variable('action_links', '');
544
-				$links_to_id	= $this->request->variable('links_to_id', 0);
541
+				$action_subcats = $this->request->variable('action_subcats', '');
542
+				$subcats_to_id = $this->request->variable('subcats_to_id', 0);
543
+				$action_links = $this->request->variable('action_links', '');
544
+				$links_to_id = $this->request->variable('links_to_id', 0);
545 545
 
546 546
 				try
547 547
 				{
@@ -765,7 +765,7 @@  discard block
 block discarded – undo
765 765
 		{
766 766
 			if ($cat_data_sql['cat_cron_enable'])
767 767
 			{
768
-				$cat_data_sql['cat_cron_next'] = time() + $cat_data_sql['cat_cron_freq']*86400;
768
+				$cat_data_sql['cat_cron_next'] = time() + $cat_data_sql['cat_cron_freq'] * 86400;
769 769
 			}
770 770
 
771 771
 			$this->cat_data = $this->nestedset_category->insert($cat_data_sql);
@@ -788,7 +788,7 @@  discard block
 block discarded – undo
788 788
 
789 789
 			if ($cat_data_sql['cat_cron_enable'] && ($row['cat_cron_freq'] != $cat_data_sql['cat_cron_freq'] || !$row['cat_cron_enable']))
790 790
 			{
791
-				$cat_data_sql['cat_cron_next'] = time() + $cat_data_sql['cat_cron_freq']*86400;
791
+				$cat_data_sql['cat_cron_next'] = time() + $cat_data_sql['cat_cron_freq'] * 86400;
792 792
 			}
793 793
 
794 794
 			if ($row['cat_name'] != $cat_data_sql['cat_name'])
Please login to merge, or discard this patch.
controller/acp/main.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -41,11 +41,11 @@  discard block
 block discarded – undo
41 41
 	*/
42 42
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\language\language $language, \phpbb\request\request $request, \phpbb\template\template $template, \ernadoo\phpbbdirectory\core\helper $dir_helper)
43 43
 	{
44
-		$this->db			= $db;
44
+		$this->db = $db;
45 45
 		$this->language		= $language;
46 46
 		$this->template		= $template;
47
-		$this->request		= $request;
48
-		$this->dir_helper	= $dir_helper;
47
+		$this->request = $request;
48
+		$this->dir_helper = $dir_helper;
49 49
 	}
50 50
 
51 51
 	/**
@@ -170,7 +170,7 @@  discard block
 block discarded – undo
170 170
 			'U_ACTION'			=> $this->u_action,
171 171
 
172 172
 			'TOTAL_CATS'		=> $total_cats,
173
-			'TOTAL_LINKS'		=> $total_links-$waiting_links,
173
+			'TOTAL_LINKS'		=> $total_links - $waiting_links,
174 174
 			'WAITING_LINKS'		=> $waiting_links,
175 175
 			'TOTAL_COMMENTS'	=> $total_comments,
176 176
 			'TOTAL_VOTES'		=> $total_votes,
Please login to merge, or discard this patch.
controller/acp/settings.php 1 patch
Spacing   +34 added lines, -34 removed lines patch added patch discarded remove patch
@@ -51,12 +51,12 @@  discard block
 block discarded – undo
51 51
 	*/
52 52
 	public function __construct(\phpbb\config\config $config, \phpbb\language\language $language, \phpbb\log\log $log, \phpbb\request\request $request, \phpbb\template\template $template, \phpbb\user $user)
53 53
 	{
54
-		$this->config	= $config;
54
+		$this->config = $config;
55 55
 		$this->language	= $language;
56
-		$this->log		= $log;
56
+		$this->log = $log;
57 57
 		$this->template	= $template;
58
-		$this->user		= $user;
59
-		$this->request	= $request;
58
+		$this->user = $user;
59
+		$this->request = $request;
60 60
 
61 61
 		$this->_generate_config();
62 62
 	}
@@ -117,7 +117,7 @@  discard block
 block discarded – undo
117 117
 	*/
118 118
 	public function process()
119 119
 	{
120
-		$submit	= ($this->request->is_set_post('submit')) ? true : false;
120
+		$submit = ($this->request->is_set_post('submit')) ? true : false;
121 121
 
122 122
 		$this->new_config = $this->config;
123 123
 		$cfg_array = ($this->request->is_set('config')) ? $this->request->variable('config', array('' => ''), true) : $this->new_config;
@@ -193,45 +193,45 @@  discard block
 block discarded – undo
193 193
 				'dir_banner_width'					=> '',
194 194
 				'dir_banner_height'					=> '',
195 195
 
196
-				'dir_mail'							=> array('lang' => 'DIR_MAIL_VALIDATION',	'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => false),
197
-				'dir_activ_checkurl'				=> array('lang' => 'DIR_ACTIVE_CHECK',		'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => true),
198
-				'dir_activ_flag'					=> array('lang' => 'DIR_ACTIV_FLAG',		'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => false),
199
-				'dir_activ_rss'						=> array('lang' => 'DIR_ACTIV_RSS',			'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => true),
200
-				'dir_activ_pagerank'				=> array('lang' => 'DIR_ACTIV_PAGERANK',	'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => true),
201
-				'dir_show'							=> array('lang' => 'DIR_SHOW',				'validate' => 'int:1', 	'type' => 'text:3:3',		'explain' => false),
202
-				'dir_length_describe'				=> array('lang' => 'DIR_MAX_DESC',			'validate' => 'int:1', 	'type' => 'text:3:3',		'explain' => false),
203
-				'dir_new_time'						=> array('lang' => 'DIR_NEW_TIME',			'validate' => 'int', 	'type' => 'text:3:3',		'explain' => true),
204
-				'dir_default_order'					=> array('lang' => 'DIR_DEFAULT_ORDER',		'validate' => 'string', 'type' => 'select',			'explain' => true, 'method' => 'get_order_list', 'params' => array('{CONFIG_VALUE}')),
196
+				'dir_mail'							=> array('lang' => 'DIR_MAIL_VALIDATION', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
197
+				'dir_activ_checkurl'				=> array('lang' => 'DIR_ACTIVE_CHECK', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
198
+				'dir_activ_flag'					=> array('lang' => 'DIR_ACTIV_FLAG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
199
+				'dir_activ_rss'						=> array('lang' => 'DIR_ACTIV_RSS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
200
+				'dir_activ_pagerank'				=> array('lang' => 'DIR_ACTIV_PAGERANK', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
201
+				'dir_show'							=> array('lang' => 'DIR_SHOW', 'validate' => 'int:1', 'type' => 'text:3:3', 'explain' => false),
202
+				'dir_length_describe'				=> array('lang' => 'DIR_MAX_DESC', 'validate' => 'int:1', 'type' => 'text:3:3', 'explain' => false),
203
+				'dir_new_time'						=> array('lang' => 'DIR_NEW_TIME', 'validate' => 'int', 'type' => 'text:3:3', 'explain' => true),
204
+				'dir_default_order'					=> array('lang' => 'DIR_DEFAULT_ORDER', 'validate' => 'string', 'type' => 'select', 'explain' => true, 'method' => 'get_order_list', 'params' => array('{CONFIG_VALUE}')),
205 205
 
206 206
 				'legend2'							=> 'DIR_RECENT_GUEST',
207
-				'dir_recent_block'					=> array('lang' => 'DIR_RECENT_ENABLE',		'validate' => 'bool',		'type' => 'radio:yes_no',	'explain' => true),
208
-				'dir_recent_rows'					=> array('lang' => 'DIR_RECENT_ROWS',		'validate' => 'int:1',		'type' => 'text:3:3',		'explain' => false),
209
-				'dir_recent_columns'				=> array('lang' => 'DIR_RECENT_COLUMNS',	'validate' => 'int:1',		'type' => 'text:3:3',		'explain' => false),
210
-				'dir_recent_exclude'				=> array('lang' => 'DIR_RECENT_EXCLUDE',	'validate' => 'string',		'type' => 'text:6:99',			'explain' => true),
207
+				'dir_recent_block'					=> array('lang' => 'DIR_RECENT_ENABLE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
208
+				'dir_recent_rows'					=> array('lang' => 'DIR_RECENT_ROWS', 'validate' => 'int:1', 'type' => 'text:3:3', 'explain' => false),
209
+				'dir_recent_columns'				=> array('lang' => 'DIR_RECENT_COLUMNS', 'validate' => 'int:1', 'type' => 'text:3:3', 'explain' => false),
210
+				'dir_recent_exclude'				=> array('lang' => 'DIR_RECENT_EXCLUDE', 'validate' => 'string', 'type' => 'text:6:99', 'explain' => true),
211 211
 
212 212
 				'legend3'							=> 'DIR_ADD_GUEST',
213
-				'dir_visual_confirm'				=> array('lang' => 'DIR_VISUAL_CONFIRM',	'validate' => 'bool',		'type' => 'radio:yes_no',	'explain' => true),
214
-				'dir_visual_confirm_max_attempts'	=> array('lang' => 'DIR_MAX_ADD_ATTEMPTS',	'validate' => 'int:1:10',	'type' => 'text:3:3',		'explain' => true),
213
+				'dir_visual_confirm'				=> array('lang' => 'DIR_VISUAL_CONFIRM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
214
+				'dir_visual_confirm_max_attempts'	=> array('lang' => 'DIR_MAX_ADD_ATTEMPTS', 'validate' => 'int:1:10', 'type' => 'text:3:3', 'explain' => true),
215 215
 
216 216
 				'legend4'							=> 'DIR_THUMB_PARAM',
217
-				'dir_activ_thumb'					=> array('lang' => 'DIR_ACTIVE_THUMB',			'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => false),
218
-				'dir_activ_thumb_remote'			=> array('lang' => 'DIR_ACTIVE_THUMB_REMOTE',	'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => true),
219
-				'dir_thumb_service'					=> array('lang' => 'DIR_THUMB_SERVICE',			'validate' => 'string', 'type' => 'select',			'explain' => true, 'method' => 'get_thumb_service_list', 'params' => array('{CONFIG_VALUE}')),
220
-				'dir_thumb_service_reverse'			=> array('lang' => 'DIR_THUMB_SERVICE_REVERSE',	'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => true),
217
+				'dir_activ_thumb'					=> array('lang' => 'DIR_ACTIVE_THUMB', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
218
+				'dir_activ_thumb_remote'			=> array('lang' => 'DIR_ACTIVE_THUMB_REMOTE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
219
+				'dir_thumb_service'					=> array('lang' => 'DIR_THUMB_SERVICE', 'validate' => 'string', 'type' => 'select', 'explain' => true, 'method' => 'get_thumb_service_list', 'params' => array('{CONFIG_VALUE}')),
220
+				'dir_thumb_service_reverse'			=> array('lang' => 'DIR_THUMB_SERVICE_REVERSE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
221 221
 
222 222
 				'legend5'							=> 'DIR_COMM_PARAM',
223
-				'dir_allow_bbcode'					=> array('lang' => 'DIR_ALLOW_BBCODE',		'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => false),
224
-				'dir_allow_flash'					=> array('lang' => 'DIR_ALLOW_FLASH',		'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => false),
225
-				'dir_allow_links'					=> array('lang' => 'DIR_ALLOW_LINKS',		'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => false),
226
-				'dir_allow_smilies'					=> array('lang' => 'DIR_ALLOW_SMILIES',		'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => false),
227
-				'dir_length_comments'				=> array('lang' => 'DIR_LENGTH_COMMENTS',	'validate' => 'int:2',	'type' => 'text:3:3',		'explain' => true),
228
-				'dir_comments_per_page'				=> array('lang' => 'DIR_COMM_PER_PAGE',		'validate' => 'int:1',	'type' => 'text:3:3',		'explain' => false),
223
+				'dir_allow_bbcode'					=> array('lang' => 'DIR_ALLOW_BBCODE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
224
+				'dir_allow_flash'					=> array('lang' => 'DIR_ALLOW_FLASH', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
225
+				'dir_allow_links'					=> array('lang' => 'DIR_ALLOW_LINKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
226
+				'dir_allow_smilies'					=> array('lang' => 'DIR_ALLOW_SMILIES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
227
+				'dir_length_comments'				=> array('lang' => 'DIR_LENGTH_COMMENTS', 'validate' => 'int:2', 'type' => 'text:3:3', 'explain' => true),
228
+				'dir_comments_per_page'				=> array('lang' => 'DIR_COMM_PER_PAGE', 'validate' => 'int:1', 'type' => 'text:3:3', 'explain' => false),
229 229
 
230 230
 				'legend6'							=> 'DIR_BANN_PARAM',
231
-				'dir_activ_banner'					=> array('lang' => 'DIR_ACTIV_BANNER',		'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => false),
232
-				'dir_banner'						=> array('lang' => 'DIR_MAX_BANN',			'validate' => 'int',	'type' => 'dimension:0',	'explain' => true, 'append' => ' ' . $this->language->lang('PIXEL')),
233
-				'dir_banner_filesize'				=> array('lang' => 'DIR_MAX_SIZE',			'validate' => 'int:0',	'type' => 'number:0',		'explain' => true, 'append' => ' ' . $this->language->lang('BYTES')),
234
-				'dir_storage_banner'				=> array('lang' => 'DIR_STORAGE_BANNER',	'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => true),
231
+				'dir_activ_banner'					=> array('lang' => 'DIR_ACTIV_BANNER', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
232
+				'dir_banner'						=> array('lang' => 'DIR_MAX_BANN', 'validate' => 'int', 'type' => 'dimension:0', 'explain' => true, 'append' => ' ' . $this->language->lang('PIXEL')),
233
+				'dir_banner_filesize'				=> array('lang' => 'DIR_MAX_SIZE', 'validate' => 'int:0', 'type' => 'number:0', 'explain' => true, 'append' => ' ' . $this->language->lang('BYTES')),
234
+				'dir_storage_banner'				=> array('lang' => 'DIR_STORAGE_BANNER', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
235 235
 			)
236 236
 		);
237 237
 	}
Please login to merge, or discard this patch.
controller/acp/validation.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -86,22 +86,22 @@  discard block
 block discarded – undo
86 86
 	*/
87 87
 	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\helper $dir_helper, \ernadoo\phpbbdirectory\core\link $link, $root_path, $php_ext)
88 88
 	{
89
-		$this->config		= $config;
90
-		$this->db			= $db;
91
-		$this->pagination	= $pagination;
89
+		$this->config = $config;
90
+		$this->db = $db;
91
+		$this->pagination = $pagination;
92 92
 		$this->language		= $language;
93 93
 		$this->phpbb_log	= $log;
94
-		$this->notification	= $notification;
95
-		$this->request		= $request;
94
+		$this->notification = $notification;
95
+		$this->request = $request;
96 96
 		$this->template		= $template;
97 97
 		$this->user			= $user;
98 98
 		$this->categorie	= $categorie;
99
-		$this->dir_helper	= $dir_helper;
99
+		$this->dir_helper = $dir_helper;
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
-		$this->action		= $this->request->variable('action', '');
104
+		$this->action = $this->request->variable('action', '');
105 105
 	}
106 106
 
107 107
 	/**
@@ -130,14 +130,14 @@  discard block
 block discarded – undo
130 130
 		global $phpbb_admin_path;
131 131
 
132 132
 		// Sort keys
133
-		$sort_days	= $this->request->variable('st', 0);
133
+		$sort_days = $this->request->variable('st', 0);
134 134
 		$sort_key	= $this->request->variable('sk', 't');
135 135
 		$sort_dir	= $this->request->variable('sd', 'd');
136 136
 
137 137
 		// Number of entries to display
138 138
 		$per_page = $this->request->variable('links_per_page', (int) $this->config['dir_show']);
139 139
 
140
-		$start	= $this->request->variable('start', 0);
140
+		$start = $this->request->variable('start', 0);
141 141
 
142 142
 		// Categorie ordering options
143 143
 		$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'));
@@ -201,7 +201,7 @@  discard block
 block discarded – undo
201 201
 				'LINK_URL'			=> $row['link_url'],
202 202
 				'LINK_NAME'			=> $row['link_name'],
203 203
 				'LINK_DESC'			=> generate_text_for_display($row['link_description'], $row['link_uid'], $row['link_bitfield'], $row['link_flags']),
204
-				'L_DIR_USER_PROP'	=> $this->language->lang('DIR_USER_PROP', get_username_string('full', $row['link_user_id'], $username, $row['user_colour'], false, append_sid("{$phpbb_admin_path}index.$this->php_ext", 'i=users&amp;mode=overview')), '<select name=c'.$row['link_id'].'>'.$this->categorie->make_cat_select((int) $row['link_cat']).'</select>', $this->user->format_date($row['link_time'])),
204
+				'L_DIR_USER_PROP'	=> $this->language->lang('DIR_USER_PROP', get_username_string('full', $row['link_user_id'], $username, $row['user_colour'], false, append_sid("{$phpbb_admin_path}index.$this->php_ext", 'i=users&amp;mode=overview')), '<select name=c' . $row['link_id'] . '>' . $this->categorie->make_cat_select((int) $row['link_cat']) . '</select>', $this->user->format_date($row['link_time'])),
205 205
 				'BANNER'			=> $s_banner,
206 206
 				'LINK_ID'			=> $row['link_id'],
207 207
 
@@ -276,7 +276,7 @@  discard block
 block discarded – undo
276 276
 			{
277 277
 				$username = $email = $row['link_guest_email'];
278 278
 
279
-				$messenger->template('@ernadoo_phpbbdirectory/directory_website_'.$this->action, $row['user_lang']);
279
+				$messenger->template('@ernadoo_phpbbdirectory/directory_website_' . $this->action, $row['user_lang']);
280 280
 				$messenger->to($email, $username);
281 281
 
282 282
 				$messenger->assign_vars(array(
@@ -296,7 +296,7 @@  discard block
 block discarded – undo
296 296
 					'cat_id'			=> (int) $row['link_cat'],
297 297
 				);
298 298
 
299
-				$this->notification->add_notifications('ernadoo.phpbbdirectory.notification.type.directory_website_'.$this->action, $notification_data);
299
+				$this->notification->add_notifications('ernadoo.phpbbdirectory.notification.type.directory_website_' . $this->action, $notification_data);
300 300
 			}
301 301
 		}
302 302
 	}
@@ -339,7 +339,7 @@  discard block
 block discarded – undo
339 339
 		foreach ($this->cat_data as $cat_id => $count)
340 340
 		{
341 341
 			$sql = 'UPDATE ' . DIR_CAT_TABLE . '
342
-							SET cat_links = cat_links + '.$count.'
342
+							SET cat_links = cat_links + '.$count . '
343 343
 							WHERE cat_id = ' . (int) $cat_id;
344 344
 			$this->db->sql_query($sql);
345 345
 		}
@@ -398,7 +398,7 @@  discard block
 block discarded – undo
398 398
 
399 399
 		while ($row = $this->db->sql_fetchrow($result))
400 400
 		{
401
-			$row['link_cat'] = $this->request->variable('c'.$row['link_id'], (int) $row['cat_id']);
401
+			$row['link_cat'] = $this->request->variable('c' . $row['link_id'], (int) $row['cat_id']);
402 402
 
403 403
 			$this->links_data[] = $row;
404 404
 
Please login to merge, or discard this patch.
controller/categories.php 1 patch
Spacing   +17 added lines, -17 removed lines patch added patch discarded remove patch
@@ -62,16 +62,16 @@  discard block
 block discarded – undo
62 62
 	*/
63 63
 	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)
64 64
 	{
65
-		$this->db			= $db;
66
-		$this->config		= $config;
65
+		$this->db = $db;
66
+		$this->config = $config;
67 67
 		$this->language		= $language;
68 68
 		$this->template		= $template;
69 69
 		$this->user			= $user;
70
-		$this->helper		= $helper;
71
-		$this->request		= $request;
70
+		$this->helper = $helper;
71
+		$this->request = $request;
72 72
 		$this->auth			= $auth;
73
-		$this->pagination	= $pagination;
74
-		$this->categorie	= $categorie;
73
+		$this->pagination = $pagination;
74
+		$this->categorie = $categorie;
75 75
 		$this->link			= $link;
76 76
 
77 77
 		$language->add_lang('directory', 'ernadoo/phpbbdirectory');
@@ -116,18 +116,18 @@  discard block
 block discarded – undo
116 116
 
117 117
 		$start = ($page - 1) * $this->config['dir_show'];
118 118
 
119
-		$default_sort_days	= 0;
119
+		$default_sort_days = 0;
120 120
 		$default_sort_key	= (string) substr($this->config['dir_default_order'], 0, 1);
121 121
 		$default_sort_dir	= (string) substr($this->config['dir_default_order'], 2);
122 122
 
123 123
 		$sort_days	= (!$sort_days) ? $this->request->variable('st', $default_sort_days) : $sort_days;
124 124
 		$sort_key 	= (!$sort_key) ? $this->request->variable('sk', $default_sort_key) : $sort_key;
125
-		$sort_dir	= (!$sort_dir) ? $this->request->variable('sd', $default_sort_dir) : $sort_dir;
125
+		$sort_dir = (!$sort_dir) ? $this->request->variable('sd', $default_sort_dir) : $sort_dir;
126 126
 		$link_list = $rowset = array();
127 127
 
128 128
 		// Categorie ordering options
129 129
 		$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'));
130
-		$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'));
130
+		$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 131
 		$sort_by_sql	= array('a' => 'u.username_clean', 't' => array('l.link_time', 'l.link_id'), 'r' => 'l.link_comment', 's' => 'l.link_name', 'v' => 'l.link_view');
132 132
 
133 133
 		if ($this->config['dir_activ_pagerank'])
@@ -182,7 +182,7 @@  discard block
 block discarded – undo
182 182
 		else
183 183
 		{
184 184
 			$sql_limit_time = '';
185
-			$nb_links		= (int) $this->categorie->data['cat_links'];
185
+			$nb_links = (int) $this->categorie->data['cat_links'];
186 186
 		}
187 187
 
188 188
 		// Make sure $start is set to the last page if it exceeds the amount
@@ -306,8 +306,8 @@  discard block
 block discarded – undo
306 306
 
307 307
 			$link_list = ($store_reverse) ? array_reverse($link_list) : $link_list;
308 308
 
309
-			$votes_status 		= ($this->categorie->data['cat_allow_votes']) ? true : false;
310
-			$comments_status 	= ($this->categorie->data['cat_allow_comments']) ? true : false;
309
+			$votes_status = ($this->categorie->data['cat_allow_votes']) ? true : false;
310
+			$comments_status = ($this->categorie->data['cat_allow_comments']) ? true : false;
311 311
 
312 312
 			foreach ($link_list as $link_id)
313 313
 			{
@@ -317,11 +317,11 @@  discard block
 block discarded – undo
317 317
 				$s_note		= $this->link->display_note($site['link_note'], $site['link_vote'], $votes_status);
318 318
 				$s_thumb	= $this->link->display_thumb($site);
319 319
 				$s_vote		= $this->link->display_vote($site);
320
-				$s_banner	= $this->link->display_bann($site);
321
-				$s_pr		= $this->link->display_pagerank($site);
322
-				$s_rss		= $this->link->display_rss($site);
320
+				$s_banner = $this->link->display_bann($site);
321
+				$s_pr = $this->link->display_pagerank($site);
322
+				$s_rss = $this->link->display_rss($site);
323 323
 
324
-				$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'))));
324
+				$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'))));
325 325
 				$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'))));
326 326
 
327 327
 				$this->template->assign_block_vars('site', array(
@@ -340,7 +340,7 @@  discard block
 block discarded – undo
340 340
 					'VOTE_LIST'		=> ($votes_status) ? $s_vote : '',
341 341
 
342 342
 					'IMG_FLAG'		=> $s_flag,
343
-					'ON_CLICK' 		=> "onclick=\"window.open('".$this->helper->route('ernadoo_phpbbdirectory_view_controller', array('link_id' => (int) $site['link_id']))."'); return false;\"",
343
+					'ON_CLICK' 		=> "onclick=\"window.open('" . $this->helper->route('ernadoo_phpbbdirectory_view_controller', array('link_id' => (int) $site['link_id'])) . "'); return false;\"",
344 344
 
345 345
 					'S_NEW_LINK'	=> (((time() - $site['link_time']) / 86400) <= $this->config['dir_new_time']) ? true : false,
346 346
 
Please login to merge, or discard this patch.
controller/comments.php 1 patch
Spacing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -78,16 +78,16 @@  discard block
 block discarded – undo
78 78
 	*/
79 79
 	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)
80 80
 	{
81
-		$this->db				= $db;
82
-		$this->config			= $config;
81
+		$this->db = $db;
82
+		$this->config = $config;
83 83
 		$this->language			= $language;
84 84
 		$this->template			= $template;
85 85
 		$this->user				= $user;
86
-		$this->helper			= $helper;
87
-		$this->request			= $request;
86
+		$this->helper = $helper;
87
+		$this->request = $request;
88 88
 		$this->auth				= $auth;
89
-		$this->pagination		= $pagination;
90
-		$this->captcha_factory 	= $captcha_factory;
89
+		$this->pagination = $pagination;
90
+		$this->captcha_factory = $captcha_factory;
91 91
 		$this->categorie		= $categorie;
92 92
 		$this->comment			= $comment;
93 93
 		$this->root_path		= $root_path;
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 		$comment_text = generate_text_for_edit($value['comment_text'], $value['comment_uid'], $value['comment_flags']);
182 182
 		$this->s_comment = $comment_text['text'];
183 183
 
184
-		$submit	= $this->request->is_set_post('update_comment') ? true : false;
184
+		$submit = $this->request->is_set_post('update_comment') ? true : false;
185 185
 
186 186
 		// If form is done
187 187
 		if ($submit)
@@ -237,8 +237,8 @@  discard block
 block discarded – undo
237 237
 		$this->_check_comments_enable($link_id);
238 238
 
239 239
 		$comment_id = $this->request->variable('c', 0);
240
-		$view 		= $this->request->variable('view', '');
241
-		$start 		= ($page - 1) * $this->config['dir_comments_per_page'];
240
+		$view = $this->request->variable('view', '');
241
+		$start = ($page - 1) * $this->config['dir_comments_per_page'];
242 242
 
243 243
 		$this->s_hidden_fields = array_merge($this->s_hidden_fields, array('page' => $page));
244 244
 
@@ -297,12 +297,12 @@  discard block
 block discarded – undo
297 297
 				'S_COMMENT'			=> generate_text_for_display($comments['comment_text'], $comments['comment_uid'], $comments['comment_bitfield'], $comments['comment_flags']),
298 298
 				'S_ID'				=> $comments['comment_id'],
299 299
 
300
-				'U_EDIT'			=> ($edit_allowed) 		? $this->helper->route('ernadoo_phpbbdirectory_comment_edit_controller', array('link_id' => (int) $link_id, 'comment_id' => (int) $comments['comment_id'])) : '',
301
-				'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())) : '',
300
+				'U_EDIT'			=> ($edit_allowed) ? $this->helper->route('ernadoo_phpbbdirectory_comment_edit_controller', array('link_id' => (int) $link_id, 'comment_id' => (int) $comments['comment_id'])) : '',
301
+				'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())) : '',
302 302
 
303 303
 				'S_IGNORE_POST'		=> ($comments['foe'] && ($view != 'show' || $comment_id != $comments['comment_id'])) ? true : false,
304
-				'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>') : '',
305
-				'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>') : '',
304
+				'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>') : '',
305
+				'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 306
 
307 307
 				'S_INFO'			=> $this->auth->acl_get('m_info'),
308 308
 			));
@@ -403,7 +403,7 @@  discard block
 block discarded – undo
403 403
 
404 404
 			$meta_info = $this->helper->route('ernadoo_phpbbdirectory_comment_view_controller', array('link_id' => (int) $link_id));
405 405
 			meta_refresh(3, $meta_info);
406
-			$message = $this->language->lang('DIR_'.strtoupper($mode).'_COMMENT_OK');
406
+			$message = $this->language->lang('DIR_' . strtoupper($mode) . '_COMMENT_OK');
407 407
 			$message = $message . '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_COMMENT', '<a href="' . $meta_info . '">', '</a>');
408 408
 			return $this->helper->message($message);
409 409
 		}
@@ -483,11 +483,11 @@  discard block
 block discarded – undo
483 483
 		$this->template->assign_vars(array(
484 484
 			'S_AUTH_COMM' 		=> $this->auth->acl_get('u_comment_dir'),
485 485
 
486
-			'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>'),
487
-			'IMG_STATUS'		=> ($this->config['dir_allow_bbcode']) 	? $this->language->lang('IMAGES_ARE_ON') : $this->language->lang('IMAGES_ARE_OFF'),
488
-			'SMILIES_STATUS'	=> ($this->config['dir_allow_smilies'])	? $this->language->lang('SMILIES_ARE_ON') : $this->language->lang('SMILIES_ARE_OFF'),
489
-			'URL_STATUS'		=> ($this->config['dir_allow_links'])	? $this->language->lang('URL_IS_ON') : $this->language->lang('URL_IS_OFF'),
490
-			'FLASH_STATUS'		=> ($this->config['dir_allow_bbcode'] && $this->config['dir_allow_flash'])	? $this->language->lang('FLASH_IS_ON') : $this->language->lang('FLASH_IS_OFF'),
486
+			'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>'),
487
+			'IMG_STATUS'		=> ($this->config['dir_allow_bbcode']) ? $this->language->lang('IMAGES_ARE_ON') : $this->language->lang('IMAGES_ARE_OFF'),
488
+			'SMILIES_STATUS'	=> ($this->config['dir_allow_smilies']) ? $this->language->lang('SMILIES_ARE_ON') : $this->language->lang('SMILIES_ARE_OFF'),
489
+			'URL_STATUS'		=> ($this->config['dir_allow_links']) ? $this->language->lang('URL_IS_ON') : $this->language->lang('URL_IS_OFF'),
490
+			'FLASH_STATUS'		=> ($this->config['dir_allow_bbcode'] && $this->config['dir_allow_flash']) ? $this->language->lang('FLASH_IS_ON') : $this->language->lang('FLASH_IS_OFF'),
491 491
 
492 492
 			'L_DIR_REPLY_EXP'	=> $this->language->lang('DIR_REPLY_EXP', $this->config['dir_length_comments']),
493 493
 
Please login to merge, or discard this patch.
controller/links.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -90,20 +90,20 @@  discard block
 block discarded – undo
90 90
 	*/
91 91
 	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, \ernadoo\phpbbdirectory\core\helper $dir_helper, $root_path, $php_ext)
92 92
 	{
93
-		$this->db				= $db;
94
-		$this->config			= $config;
93
+		$this->db = $db;
94
+		$this->config = $config;
95 95
 		$this->language			= $language;
96 96
 		$this->template			= $template;
97 97
 		$this->user				= $user;
98
-		$this->helper			= $helper;
99
-		$this->request			= $request;
98
+		$this->helper = $helper;
99
+		$this->request = $request;
100 100
 		$this->auth				= $auth;
101
-		$this->captcha_factory 	= $captcha_factory;
101
+		$this->captcha_factory = $captcha_factory;
102 102
 		$this->categorie		= $categorie;
103 103
 		$this->link				= $link;
104
-		$this->dir_helper		= $dir_helper;
104
+		$this->dir_helper = $dir_helper;
105 105
 		$this->root_path		= $root_path;
106
-		$this->php_ext			= $php_ext;
106
+		$this->php_ext = $php_ext;
107 107
 
108 108
 		$language->add_lang('directory', 'ernadoo/phpbbdirectory');
109 109
 
@@ -188,7 +188,7 @@  discard block
 block discarded – undo
188 188
 		$cat_id		= $this->request->variable('id', $cat_id);
189 189
 		$submit		= $this->request->is_set_post('submit') ? true : false;
190 190
 		$refresh	= $this->request->is_set_post('refresh_vc') ? true : false;
191
-		$title		= $this->language->lang('DIR_EDIT_SITE');
191
+		$title = $this->language->lang('DIR_EDIT_SITE');
192 192
 
193 193
 		$this->template->assign_block_vars('dir_navlinks', array(
194 194
 			'FORUM_NAME'	=> $title,
@@ -224,15 +224,15 @@  discard block
 block discarded – undo
224 224
 				'old_banner'	=> $site['link_banner'],
225 225
 			);
226 226
 
227
-			$site_description		= generate_text_for_edit($site['link_description'], $site['link_uid'], $site['link_flags']);
228
-			$site['link_banner'] 	= (preg_match('/^(http:\/\/|https:\/\/|ftp:\/\/|ftps:\/\/|www\.).+/si', $site['link_banner'])) ? $site['link_banner'] : '';
227
+			$site_description = generate_text_for_edit($site['link_description'], $site['link_uid'], $site['link_flags']);
228
+			$site['link_banner'] = (preg_match('/^(http:\/\/|https:\/\/|ftp:\/\/|ftps:\/\/|www\.).+/si', $site['link_banner'])) ? $site['link_banner'] : '';
229 229
 
230
-			$this->url			= $site['link_url'];
231
-			$this->site_name	= $site['link_name'];
230
+			$this->url = $site['link_url'];
231
+			$this->site_name = $site['link_name'];
232 232
 			$this->description	= $site_description['text'];
233 233
 			$this->guest_email	= $site['link_guest_email'];
234
-			$this->rss			= $site['link_rss'];
235
-			$this->banner 		= $site['link_banner'];
234
+			$this->rss = $site['link_rss'];
235
+			$this->banner = $site['link_banner'];
236 236
 			$this->back			= $site['link_back'];
237 237
 			$this->flag 		= $site['link_flag'];
238 238
 		}
@@ -259,7 +259,7 @@  discard block
 block discarded – undo
259 259
 		$cat_id		= $this->request->variable('id', $cat_id);
260 260
 		$submit		= $this->request->is_set_post('submit') ? true : false;
261 261
 		$refresh	= $this->request->is_set_post('refresh_vc') ? true : false;
262
-		$title		= $this->language->lang('DIR_NEW_SITE');
262
+		$title = $this->language->lang('DIR_NEW_SITE');
263 263
 
264 264
 		$this->template->assign_block_vars('dir_navlinks', array(
265 265
 			'FORUM_NAME'	=> $title,
@@ -362,12 +362,12 @@  discard block
 block discarded – undo
362 362
 			return $this->helper->message('FORM_INVALID');
363 363
 		}
364 364
 
365
-		$this->url			= $this->request->variable('url', '');
366
-		$this->site_name	= $this->request->variable('site_name', '', true);
365
+		$this->url = $this->request->variable('url', '');
366
+		$this->site_name = $this->request->variable('site_name', '', true);
367 367
 		$this->description	= $this->request->variable('description', '', true);
368 368
 		$this->guest_email	= $this->request->variable('guest_email', '');
369
-		$this->rss			= $this->request->variable('rss', '');
370
-		$this->banner 		= $this->request->variable('banner', '');
369
+		$this->rss = $this->request->variable('rss', '');
370
+		$this->banner = $this->request->variable('banner', '');
371 371
 		$this->back			= $this->request->variable('back', '');
372 372
 		$this->flag 		= $this->request->variable('flag', '');
373 373
 
@@ -396,17 +396,17 @@  discard block
 block discarded – undo
396 396
 			'site_name' =>			array(
397 397
 				array('string', false, 1, 100)),
398 398
 			'website'		=>		array(
399
-				array('string',	false, 12, 255),
400
-				array('match',	true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')),
399
+				array('string', false, 12, 255),
400
+				array('match', true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')),
401 401
 			'description'	=>		array(
402 402
 				array('string', !$this->categorie->data['cat_must_describe'], 1, $this->config['dir_length_describe'])),
403 403
 			'rss'			=>		array(
404 404
 				array('string', true, 12, 255),
405
-				array('match',	empty($this->rss), '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')),
405
+				array('match', empty($this->rss), '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')),
406 406
 			'banner'		=>		array(
407 407
 				array('string', true, 5, 255)),
408 408
 			'back'			=>		array(
409
-				array('string',	!$this->categorie->data['cat_link_back'], 12, 255),
409
+				array('string', !$this->categorie->data['cat_link_back'], 12, 255),
410 410
 				array(array($this->link, 'link_back'), true)),
411 411
 			'cat'			=>		array(
412 412
 				array('num', '', 1))
@@ -458,8 +458,8 @@  discard block
 block discarded – undo
458 458
 			$uid = $bitfield = $flags = '';
459 459
 			generate_text_for_storage($this->description, $uid, $bitfield, $flags, (bool) $this->config['allow_bbcode'], (bool) $this->config['allow_post_links'], (bool) $this->config['allow_smilies'], (bool) $this->config['allow_bbcode'], ($this->config['allow_bbcode'] && $this->config['allow_post_flash']), true, (bool) $this->config['allow_post_links']);
460 460
 
461
-			$this->banner	= (!$this->banner && !$this->request->is_set_post('delete_banner')) ? $this->request->variable('old_banner', '') : $this->banner;
462
-			$this->url		= $this->link->clean_url($this->url);
461
+			$this->banner = (!$this->banner && !$this->request->is_set_post('delete_banner')) ? $this->request->variable('old_banner', '') : $this->banner;
462
+			$this->url = $this->link->clean_url($this->url);
463 463
 
464 464
 			$data_edit = array(
465 465
 				'link_user_id'		=> $this->link_user_id,
@@ -502,7 +502,7 @@  discard block
 block discarded – undo
502 502
 
503 503
 			$meta_info = $this->helper->route('ernadoo_phpbbdirectory_page_controller', array('cat_id' => (int) $cat_id));
504 504
 			meta_refresh(3, $meta_info);
505
-			$message	= ($need_approval) ? $this->language->lang('DIR_'.strtoupper($mode).'_SITE_ACTIVE') : $this->language->lang('DIR_'.strtoupper($mode).'_SITE_OK');
505
+			$message	= ($need_approval) ? $this->language->lang('DIR_' . strtoupper($mode) . '_SITE_ACTIVE') : $this->language->lang('DIR_' . strtoupper($mode) . '_SITE_OK');
506 506
 			$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>');
507 507
 			return $this->helper->message($message);
508 508
 		}
@@ -593,20 +593,20 @@  discard block
 block discarded – undo
593 593
 		add_form_key('dir_form');
594 594
 
595 595
 		$ext_path = $phpbb_extension_manager->get_extension_path('ernadoo/phpbbdirectory', false);
596
-		$flag_path = $ext_path.'images/flags/';
596
+		$flag_path = $ext_path . 'images/flags/';
597 597
 
598 598
 		$s_guest	= (!$this->user->data['is_registered'] || !empty($this->guest_email));
599
-		$s_rss		= $this->config['dir_activ_rss'];
600
-		$s_banner	= $this->config['dir_activ_banner'];
599
+		$s_rss = $this->config['dir_activ_rss'];
600
+		$s_banner = $this->config['dir_activ_banner'];
601 601
 		$s_back		= $this->categorie->data['cat_link_back'];
602 602
 		$s_flag		= $this->config['dir_activ_flag'];
603 603
 
604 604
 		$this->template->assign_vars(array(
605
-			'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>'),
606
-			'IMG_STATUS'			=> ($this->config['allow_bbcode'])	? $this->language->lang('IMAGES_ARE_ON') : $this->language->lang('IMAGES_ARE_OFF'),
605
+			'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>'),
606
+			'IMG_STATUS'			=> ($this->config['allow_bbcode']) ? $this->language->lang('IMAGES_ARE_ON') : $this->language->lang('IMAGES_ARE_OFF'),
607 607
 			'SMILIES_STATUS'		=> ($this->config['allow_smilies']) ? $this->language->lang('SMILIES_ARE_ON') : $this->language->lang('SMILIES_ARE_OFF'),
608 608
 			'URL_STATUS'			=> ($this->config['allow_post_links']) ? $this->language->lang('URL_IS_ON') : $this->language->lang('URL_IS_OFF'),
609
-			'FLASH_STATUS'			=> ($this->config['allow_bbcode'] && $this->config['allow_post_flash'])	? $this->language->lang('FLASH_IS_ON') : $this->language->lang('FLASH_IS_OFF'),
609
+			'FLASH_STATUS'			=> ($this->config['allow_bbcode'] && $this->config['allow_post_flash']) ? $this->language->lang('FLASH_IS_ON') : $this->language->lang('FLASH_IS_OFF'),
610 610
 
611 611
 			'L_TITLE'				=> $title,
612 612
 			'L_DIR_DESCRIPTION_EXP'	=> $this->language->lang('DIR_DESCRIPTION_EXP', $this->config['dir_length_describe']),
Please login to merge, or discard this patch.
controller/search.php 1 patch
Spacing   +25 added lines, -25 removed lines patch added patch discarded remove patch
@@ -67,18 +67,18 @@  discard block
 block discarded – undo
67 67
 	*/
68 68
 	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)
69 69
 	{
70
-		$this->db			= $db;
71
-		$this->config		= $config;
70
+		$this->db = $db;
71
+		$this->config = $config;
72 72
 		$this->language		= $language;
73 73
 		$this->template		= $template;
74 74
 		$this->user			= $user;
75
-		$this->helper		= $helper;
76
-		$this->request		= $request;
75
+		$this->helper = $helper;
76
+		$this->request = $request;
77 77
 		$this->auth			= $auth;
78
-		$this->pagination	= $pagination;
79
-		$this->search		= $search;
80
-		$this->categorie	= $categorie;
81
-		$this->link			= $link;
78
+		$this->pagination = $pagination;
79
+		$this->search = $search;
80
+		$this->categorie = $categorie;
81
+		$this->link = $link;
82 82
 
83 83
 		$language->add_lang('directory', 'ernadoo/phpbbdirectory');
84 84
 		$language->add_lang('search');
@@ -103,24 +103,24 @@  discard block
 block discarded – undo
103 103
 			throw new \phpbb\exception\http_exception(403, 'DIR_ERROR_NOT_AUTH');
104 104
 		}
105 105
 
106
-		$cat_id				= $this->request->variable('cat_id', 0);
107
-		$keywords			= $this->request->variable('keywords', '', true);
106
+		$cat_id = $this->request->variable('cat_id', 0);
107
+		$keywords = $this->request->variable('keywords', '', true);
108 108
 		$search_terms		= $this->request->variable('terms', 'all');
109
-		$search_category	= $this->request->variable('cid', array(0));
110
-		$search_fields		= $this->request->variable('sf', 'all');
109
+		$search_category = $this->request->variable('cid', array(0));
110
+		$search_fields = $this->request->variable('sf', 'all');
111 111
 		$search_child		= $this->request->variable('sc', true);
112
-		$sort_days			= $this->request->variable('st', 0);
112
+		$sort_days = $this->request->variable('st', 0);
113 113
 		$sort_key			= $this->request->variable('sk', 't');
114 114
 		$sort_dir			= $this->request->variable('sd', 'd');
115
-		$start				= ($page - 1) * (int) $this->config['dir_show'];
115
+		$start = ($page - 1) * (int) $this->config['dir_show'];
116 116
 
117
-		$default_sort_days	= 0;
117
+		$default_sort_days = 0;
118 118
 		$default_sort_key	= (string) substr($this->config['dir_default_order'], 0, 1);
119 119
 		$default_sort_dir	= (string) substr($this->config['dir_default_order'], 2);
120 120
 
121 121
 		// Categorie ordering options
122 122
 		$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'));
123
-		$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'));
123
+		$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 124
 		$sort_by_sql	= array('a' => 'u.username_clean', 't' => array('l.link_time', 'l.link_id'), 'r' => 'l.link_comment', 's' => 'l.link_name', 'v' => 'l.link_view');
125 125
 
126 126
 		if ($this->config['dir_activ_pagerank'])
@@ -169,12 +169,12 @@  discard block
 block discarded – undo
169 169
 
170 170
 			$u_hilit = urlencode(htmlspecialchars_decode(str_replace('|', ' ', $hilit)));
171 171
 
172
-			($u_hilit) 					? $u_search['keywords']		= urlencode(htmlspecialchars_decode($keywords)) : '';
173
-			($search_terms != 'all') 	? $u_search['terms']		= $search_terms : '';
174
-			($cat_id)					? $u_search['cat_id']		= $cat_id : '';
175
-			($search_category)			? $u_search['cid']			= $search_category : '';
176
-			(!$search_child)			? $u_search['sc']			= 0 : '';
177
-			($search_fields != 'all')	? $u_search['sf'] 			= $search_fields : '';
172
+			($u_hilit) ? $u_search['keywords'] = urlencode(htmlspecialchars_decode($keywords)) : '';
173
+			($search_terms != 'all') ? $u_search['terms'] = $search_terms : '';
174
+			($cat_id) ? $u_search['cat_id'] = $cat_id : '';
175
+			($search_category) ? $u_search['cid'] = $search_category : '';
176
+			(!$search_child) ? $u_search['sc'] = 0 : '';
177
+			($search_fields != 'all') ? $u_search['sf'] = $search_fields : '';
178 178
 
179 179
 			$base_url = array(
180 180
 				'routes'	=> 'ernadoo_phpbbdirectory_search_controller',
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 
249 249
 					foreach ($rowset as $data)
250 250
 					{
251
-						$s_banner	= $this->link->display_bann($data);
251
+						$s_banner = $this->link->display_bann($data);
252 252
 						$s_thumb	= $this->link->display_thumb($data);
253 253
 						$s_flag		= $this->link->display_flag($data);
254 254
 
@@ -269,10 +269,10 @@  discard block
 block discarded – undo
269 269
 							'S_TIME'		=> ($data['link_time'] != 0) ? $this->user->format_date($data['link_time']) : '',
270 270
 							'S_COMMENT'		=> $data['link_comment'],
271 271
 
272
-							'THUMB'			=> '<img src="'.$s_thumb.'" alt="'.$this->language->lang('DIR_THUMB').'" title="'.$data['link_name'].'"/>',
272
+							'THUMB'			=> '<img src="' . $s_thumb . '" alt="' . $this->language->lang('DIR_THUMB') . '" title="' . $data['link_name'] . '"/>',
273 273
 							'IMG_BANNER'	=> $s_banner,
274 274
 							'IMG_FLAG'		=> $s_flag,
275
-							'ON_CLICK' 		=> "onclick=\"window.open('".$this->helper->route('ernadoo_phpbbdirectory_view_controller', array('link_id' => (int) $data['link_id']))."'); return false;\"",
275
+							'ON_CLICK' 		=> "onclick=\"window.open('" . $this->helper->route('ernadoo_phpbbdirectory_view_controller', array('link_id' => (int) $data['link_id'])) . "'); return false;\"",
276 276
 
277 277
 							'L_DIR_SEARCH_NB_CLICKS'	=> $this->language->lang('DIR_SEARCH_NB_CLICKS', (int) $data['link_view']),
278 278
 							'L_DIR_SEARCH_NB_COMMS'		=> $this->language->lang('DIR_SEARCH_NB_COMMS', (int) $data['link_comment']),
Please login to merge, or discard this patch.