Completed
Push — 3.3.x ( 37d736...41194d )
by Erwan
02:32
created
notification/type/directory_website_approved.php 2 patches
Indentation   +64 added lines, -64 removed lines patch added patch discarded remove patch
@@ -21,32 +21,32 @@  discard block
 block discarded – undo
21 21
 	protected $helper;
22 22
 
23 23
 	/**
24
-	* Set the controller helper
25
-	*
26
-	* @param \phpbb\controller\helper $helper
27
-	* @return null
28
-	*/
24
+	 * Set the controller helper
25
+	 *
26
+	 * @param \phpbb\controller\helper $helper
27
+	 * @return null
28
+	 */
29 29
 	public function set_controller_helper(\phpbb\controller\helper $helper)
30 30
 	{
31 31
 		$this->helper = $helper;
32 32
 	}
33 33
 
34 34
 	/**
35
-	* Get notification type name
36
-	*
37
-	* @return string
38
-	*/
35
+	 * Get notification type name
36
+	 *
37
+	 * @return string
38
+	 */
39 39
 	public function get_type()
40 40
 	{
41 41
 		return 'ernadoo.phpbbdirectory.notification.type.directory_website_approved';
42 42
 	}
43 43
 
44 44
 	/**
45
-	* Notification option data (for outputting to the user)
46
-	*
47
-	* @var bool|array False if the service should use it's default data
48
-	* 					Array of data (including keys 'id', 'lang', and 'group')
49
-	*/
45
+	 * Notification option data (for outputting to the user)
46
+	 *
47
+	 * @var bool|array False if the service should use it's default data
48
+	 * 					Array of data (including keys 'id', 'lang', and 'group')
49
+	 */
50 50
 	public static $notification_option = array(
51 51
 		'id'	=> 'dir_moderation_queue',
52 52
 		'lang'	=> 'NOTIFICATION_TYPE_DIR_UCP_MODERATION_QUEUE',
@@ -54,17 +54,17 @@  discard block
 block discarded – undo
54 54
 	);
55 55
 
56 56
 	/**
57
-	* Permission to check for (in find_users_for_notification)
58
-	*
59
-	* @var string Permission name
60
-	*/
57
+	 * Permission to check for (in find_users_for_notification)
58
+	 *
59
+	 * @var string Permission name
60
+	 */
61 61
 	protected $permission = array('a_', 'm_');
62 62
 
63 63
 	/**
64
-	* Is available
65
-	*
66
-	* @return bool True/False whether or not this is available to the user
67
-	*/
64
+	 * Is available
65
+	 *
66
+	 * @return bool True/False whether or not this is available to the user
67
+	 */
68 68
 	public function is_available()
69 69
 	{
70 70
 		$has_permission = $this->auth->acl_gets($this->permission, true);
@@ -73,21 +73,21 @@  discard block
 block discarded – undo
73 73
 	}
74 74
 
75 75
 	/**
76
-	* Get link id
77
-	*
78
-	* @param array $data The data from the link
79
-	* @return int
80
-	*/
76
+	 * Get link id
77
+	 *
78
+	 * @param array $data The data from the link
79
+	 * @return int
80
+	 */
81 81
 	static public function get_item_id($data)
82 82
 	{
83 83
 		return (int) $data['link_id'];
84 84
 	}
85 85
 
86 86
 	/**
87
-	* Get parent id - it's not used
88
-	*
89
-	* @param array $data The data from the link
90
-	*/
87
+	 * Get parent id - it's not used
88
+	 *
89
+	 * @param array $data The data from the link
90
+	 */
91 91
 	static public function get_item_parent_id($data)
92 92
 	{
93 93
 		// No parent
@@ -95,12 +95,12 @@  discard block
 block discarded – undo
95 95
 	}
96 96
 
97 97
 	/**
98
-	* Find the users who want to receive notifications
99
-	*
100
-	* @param	array	$data		Data from submit link
101
-	* @param	array	$options	Options for finding users for notification
102
-	* @return	array
103
-	*/
98
+	 * Find the users who want to receive notifications
99
+	 *
100
+	 * @param	array	$data		Data from submit link
101
+	 * @param	array	$options	Options for finding users for notification
102
+	 * @return	array
103
+	 */
104 104
 	public function find_users_for_notification($data, $options = array())
105 105
 	{
106 106
 		$options = array_merge(array(
@@ -116,10 +116,10 @@  discard block
 block discarded – undo
116 116
 	}
117 117
 
118 118
 	/**
119
-	* Get the HTML formatted title of this notification
120
-	*
121
-	* @return string
122
-	*/
119
+	 * Get the HTML formatted title of this notification
120
+	 *
121
+	 * @return string
122
+	 */
123 123
 	public function get_title()
124 124
 	{
125 125
 		$link_name = $this->get_data('link_name');
@@ -129,20 +129,20 @@  discard block
 block discarded – undo
129 129
 	}
130 130
 
131 131
 	/**
132
-	* Get email template
133
-	*
134
-	* @return string
135
-	*/
132
+	 * Get email template
133
+	 *
134
+	 * @return string
135
+	 */
136 136
 	public function get_email_template()
137 137
 	{
138 138
 		return '@ernadoo_phpbbdirectory/directory_website_approved';
139 139
 	}
140 140
 
141 141
 	/**
142
-	* Get email template variables
143
-	*
144
-	* @return array
145
-	*/
142
+	 * Get email template variables
143
+	 *
144
+	 * @return array
145
+	 */
146 146
 	public function get_email_template_variables()
147 147
 	{
148 148
 		return array(
@@ -151,33 +151,33 @@  discard block
 block discarded – undo
151 151
 	}
152 152
 
153 153
 	/**
154
-	* Get the url to this item
155
-	*
156
-	* @return string URL
157
-	*/
154
+	 * Get the url to this item
155
+	 *
156
+	 * @return string URL
157
+	 */
158 158
 	public function get_url()
159 159
 	{
160 160
 		return $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $this->get_data('cat_id'));
161 161
 	}
162 162
 
163 163
 	/**
164
-	* Users needed to query before this notification can be displayed
165
-	*
166
-	* @return array Array of user_ids
167
-	*/
164
+	 * Users needed to query before this notification can be displayed
165
+	 *
166
+	 * @return array Array of user_ids
167
+	 */
168 168
 	public function users_to_query()
169 169
 	{
170 170
 		return array();
171 171
 	}
172 172
 
173 173
 	/**
174
-	* Function for preparing the data for insertion in an SQL query
175
-	* (The service handles insertion)
176
-	*
177
-	* @param	array	$data				Data from submit link
178
-	* @param	array	$pre_create_data	Data from pre_create_insert_array()
179
-	* @return	array						Array of data ready to be inserted into the database
180
-	*/
174
+	 * Function for preparing the data for insertion in an SQL query
175
+	 * (The service handles insertion)
176
+	 *
177
+	 * @param	array	$data				Data from submit link
178
+	 * @param	array	$pre_create_data	Data from pre_create_insert_array()
179
+	 * @return	array						Array of data ready to be inserted into the database
180
+	 */
181 181
 	public function create_insert_array($data, $pre_create_data = array())
182 182
 	{
183 183
 		$this->set_data('link_name', $data['link_name']);
Please login to merge, or discard this patch.
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -157,7 +157,7 @@
 block discarded – undo
157 157
 	*/
158 158
 	public function get_url()
159 159
 	{
160
-		return $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $this->get_data('cat_id'));
160
+		return $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$this->get_data('cat_id'));
161 161
 	}
162 162
 
163 163
 	/**
Please login to merge, or discard this patch.
notification/type/directory_website.php 2 patches
Indentation   +62 added lines, -62 removed lines patch added patch discarded remove patch
@@ -24,11 +24,11 @@  discard block
 block discarded – undo
24 24
 	protected $watch_table;
25 25
 
26 26
 	/**
27
-	* Set the controller helper
28
-	*
29
-	* @param \phpbb\controller\helper $helper
30
-	* @return null
31
-	*/
27
+	 * Set the controller helper
28
+	 *
29
+	 * @param \phpbb\controller\helper $helper
30
+	 * @return null
31
+	 */
32 32
 	public function set_controller_helper(\phpbb\controller\helper $helper)
33 33
 	{
34 34
 		$this->helper = $helper;
@@ -46,21 +46,21 @@  discard block
 block discarded – undo
46 46
 	}
47 47
 
48 48
 	/**
49
-	* Get notification type name
50
-	*
51
-	* @return string
52
-	*/
49
+	 * Get notification type name
50
+	 *
51
+	 * @return string
52
+	 */
53 53
 	public function get_type()
54 54
 	{
55 55
 		return 'ernadoo.phpbbdirectory.notification.type.directory_website';
56 56
 	}
57 57
 
58 58
 	/**
59
-	* Notification option data (for outputting to the user)
60
-	*
61
-	* @var bool|array False if the service should use it's default data
62
-	* 					Array of data (including keys 'id', 'lang', and 'group')
63
-	*/
59
+	 * Notification option data (for outputting to the user)
60
+	 *
61
+	 * @var bool|array False if the service should use it's default data
62
+	 * 					Array of data (including keys 'id', 'lang', and 'group')
63
+	 */
64 64
 	public static $notification_option = array(
65 65
 		'lang'	=> 'NOTIFICATION_TYPE_DIR_UCP_WEBSITE',
66 66
 		'group'	=> 'NOTIFICATION_DIR_UCP',
@@ -75,31 +75,31 @@  discard block
 block discarded – undo
75 75
 	}
76 76
 
77 77
 	/**
78
-	* Is available
79
-	*
80
-	* @return bool True/False whether or not this is available to the user
81
-	*/
78
+	 * Is available
79
+	 *
80
+	 * @return bool True/False whether or not this is available to the user
81
+	 */
82 82
 	public function is_available()
83 83
 	{
84 84
 		return true;
85 85
 	}
86 86
 
87 87
 	/**
88
-	* Get link id
89
-	*
90
-	* @param array $data The data from the link
91
-	* @return int
92
-	*/
88
+	 * Get link id
89
+	 *
90
+	 * @param array $data The data from the link
91
+	 * @return int
92
+	 */
93 93
 	static public function get_item_id($data)
94 94
 	{
95 95
 		return (int) $data['link_id'];
96 96
 	}
97 97
 
98 98
 	/**
99
-	* Get parent id - it's not used
100
-	*
101
-	* @param array $data The data from the link
102
-	*/
99
+	 * Get parent id - it's not used
100
+	 *
101
+	 * @param array $data The data from the link
102
+	 */
103 103
 	static public function get_item_parent_id($data)
104 104
 	{
105 105
 		// No parent
@@ -107,12 +107,12 @@  discard block
 block discarded – undo
107 107
 	}
108 108
 
109 109
 	/**
110
-	* Find the users who want to receive notifications
111
-	*
112
-	* @param	array	$data		Data from submit link
113
-	* @param	array	$options	Options for finding users for notification
114
-	* @return	array
115
-	*/
110
+	 * Find the users who want to receive notifications
111
+	 *
112
+	 * @param	array	$data		Data from submit link
113
+	 * @param	array	$options	Options for finding users for notification
114
+	 * @return	array
115
+	 */
116 116
 	public function find_users_for_notification($data, $options = array())
117 117
 	{
118 118
 		$options = array_merge(array(
@@ -144,8 +144,8 @@  discard block
 block discarded – undo
144 144
 	}
145 145
 
146 146
 	/**
147
-	* Get the user's avatar
148
-	*/
147
+	 * Get the user's avatar
148
+	 */
149 149
 	public function get_avatar()
150 150
 	{
151 151
 		return $this->user_loader->get_avatar($this->get_data('user_from'), false, true);
@@ -153,10 +153,10 @@  discard block
 block discarded – undo
153 153
 
154 154
 
155 155
 	/**
156
-	* Get the HTML formatted title of this notification
157
-	*
158
-	* @return string
159
-	*/
156
+	 * Get the HTML formatted title of this notification
157
+	 *
158
+	 * @return string
159
+	 */
160 160
 
161 161
 	public function get_title()
162 162
 	{
@@ -169,20 +169,20 @@  discard block
 block discarded – undo
169 169
 
170 170
 
171 171
 	/**
172
-	* Get email template
173
-	*
174
-	* @return string
175
-	*/
172
+	 * Get email template
173
+	 *
174
+	 * @return string
175
+	 */
176 176
 	public function get_email_template()
177 177
 	{
178 178
 		return '@ernadoo_phpbbdirectory/directory_website';
179 179
 	}
180 180
 
181 181
 	/**
182
-	* Get email template variables
183
-	*
184
-	* @return array
185
-	*/
182
+	 * Get email template variables
183
+	 *
184
+	 * @return array
185
+	 */
186 186
 	public function get_email_template_variables()
187 187
 	{
188 188
 		return array(
@@ -194,33 +194,33 @@  discard block
 block discarded – undo
194 194
 	}
195 195
 
196 196
 	/**
197
-	* Get the url to this item
198
-	*
199
-	* @return string URL
200
-	*/
197
+	 * Get the url to this item
198
+	 *
199
+	 * @return string URL
200
+	 */
201 201
 	public function get_url()
202 202
 	{
203 203
 		return $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $this->get_data('cat_id'));
204 204
 	}
205 205
 
206 206
 	/**
207
-	* Users needed to query before this notification can be displayed
208
-	*
209
-	* @return array Array of user_ids
210
-	*/
207
+	 * Users needed to query before this notification can be displayed
208
+	 *
209
+	 * @return array Array of user_ids
210
+	 */
211 211
 	public function users_to_query()
212 212
 	{
213 213
 		return array($this->get_data('user_from'));
214 214
 	}
215 215
 
216 216
 	/**
217
-	* Function for preparing the data for insertion in an SQL query
218
-	* (The service handles insertion)
219
-	*
220
-	* @param	array	$data				Data from submit link
221
-	* @param	array	$pre_create_data	Data from pre_create_insert_array()
222
-	* @return	array						Array of data ready to be inserted into the database
223
-	*/
217
+	 * Function for preparing the data for insertion in an SQL query
218
+	 * (The service handles insertion)
219
+	 *
220
+	 * @param	array	$data				Data from submit link
221
+	 * @param	array	$pre_create_data	Data from pre_create_insert_array()
222
+	 * @return	array						Array of data ready to be inserted into the database
223
+	 */
224 224
 	public function create_insert_array($data, $pre_create_data = array())
225 225
 	{
226 226
 		$this->set_data('link_name', $data['link_name']);
Please login to merge, or discard this patch.
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -122,9 +122,9 @@  discard block
 block discarded – undo
122 122
 		$users = array();
123 123
 
124 124
 		$sql = 'SELECT user_id
125
-			FROM ' . $this->watch_table . '
126
-			WHERE cat_id = ' . (int) $data['cat_id'] . '
127
-				AND notify_status = ' . NOTIFY_YES . '
125
+			FROM ' . $this->watch_table.'
126
+			WHERE cat_id = ' . (int) $data['cat_id'].'
127
+				AND notify_status = ' . NOTIFY_YES.'
128 128
 				AND user_id <> ' . (int) $data['user_from'];
129 129
 		$result = $this->db->sql_query($sql);
130 130
 		while ($row = $this->db->sql_fetchrow($result))
@@ -200,7 +200,7 @@  discard block
 block discarded – undo
200 200
 	*/
201 201
 	public function get_url()
202 202
 	{
203
-		return $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $this->get_data('cat_id'));
203
+		return $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$this->get_data('cat_id'));
204 204
 	}
205 205
 
206 206
 	/**
Please login to merge, or discard this patch.
controller/acp/cat.php 2 patches
Indentation   +111 added lines, -111 removed lines patch added patch discarded remove patch
@@ -69,19 +69,19 @@  discard block
 block discarded – undo
69 69
 	private $update;
70 70
 
71 71
 	/**
72
-	* Constructor
73
-	*
74
-	* @param \phpbb\cache\service								$cache				Cache object
75
-	* @param \phpbb\db\driver\driver_interface 					$db					Database object
76
-	* @param \phpbb\controller\helper							$helper				Helper object
77
-	* @param \phpbb\language\language							$language			Language object
78
-	* @param \phpbb\log\log										$log				Log object
79
-	* @param \phpbb\request\request								$request			Request object
80
-	* @param \phpbb\template\template							$template			Template object
81
-	* @param \phpbb\user										$user				User object
82
-	* @param \ernadoo\phpbbdirectory\core\categorie				$categorie			PhpBB Directory extension categorie object
83
-	* @param \ernadoo\phpbbdirectory\core\nestedset_category	$nestedset_category	PhpBB Directory extension nestedset object
84
-	*/
72
+	 * Constructor
73
+	 *
74
+	 * @param \phpbb\cache\service								$cache				Cache object
75
+	 * @param \phpbb\db\driver\driver_interface 					$db					Database object
76
+	 * @param \phpbb\controller\helper							$helper				Helper object
77
+	 * @param \phpbb\language\language							$language			Language object
78
+	 * @param \phpbb\log\log										$log				Log object
79
+	 * @param \phpbb\request\request								$request			Request object
80
+	 * @param \phpbb\template\template							$template			Template object
81
+	 * @param \phpbb\user										$user				User object
82
+	 * @param \ernadoo\phpbbdirectory\core\categorie				$categorie			PhpBB Directory extension categorie object
83
+	 * @param \ernadoo\phpbbdirectory\core\nestedset_category	$nestedset_category	PhpBB Directory extension nestedset object
84
+	 */
85 85
 	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\nestedset_category $nestedset_category)
86 86
 	{
87 87
 		$this->cache				= $cache;
@@ -105,10 +105,10 @@  discard block
 block discarded – undo
105 105
 	}
106 106
 
107 107
 	/**
108
-	* Initialize defaults data for add page
109
-	*
110
-	* @return null
111
-	*/
108
+	 * Initialize defaults data for add page
109
+	 *
110
+	 * @return null
111
+	 */
112 112
 	public function action_add()
113 113
 	{
114 114
 		$this->cat_id = $this->parent_id;
@@ -143,10 +143,10 @@  discard block
 block discarded – undo
143 143
 	}
144 144
 
145 145
 	/**
146
-	* Display deleting page
147
-	*
148
-	* @return null
149
-	*/
146
+	 * Display deleting page
147
+	 *
148
+	 * @return null
149
+	 */
150 150
 	public function action_delete()
151 151
 	{
152 152
 		if (!$this->cat_id)
@@ -197,10 +197,10 @@  discard block
 block discarded – undo
197 197
 	}
198 198
 
199 199
 	/**
200
-	* Initialize data for edit page
201
-	*
202
-	* @return null
203
-	*/
200
+	 * Initialize data for edit page
201
+	 *
202
+	 * @return null
203
+	 */
204 204
 	public function action_edit()
205 205
 	{
206 206
 		$row = $this->_get_cat_info($this->cat_id);
@@ -227,10 +227,10 @@  discard block
 block discarded – undo
227 227
 	}
228 228
 
229 229
 	/**
230
-	* Move order categories
231
-	*
232
-	* @return null
233
-	*/
230
+	 * Move order categories
231
+	 *
232
+	 * @return null
233
+	 */
234 234
 	public function action_move()
235 235
 	{
236 236
 		if (!$this->cat_id)
@@ -273,10 +273,10 @@  discard block
 block discarded – undo
273 273
 	}
274 274
 
275 275
 	/**
276
-	* Display progress bar for syncinc categories
277
-	*
278
-	* @return null
279
-	*/
276
+	 * Display progress bar for syncinc categories
277
+	 *
278
+	 * @return null
279
+	 */
280 280
 	public function action_progress_bar()
281 281
 	{
282 282
 		$start = $this->request->variable('start', 0);
@@ -297,10 +297,10 @@  discard block
 block discarded – undo
297 297
 	}
298 298
 
299 299
 	/**
300
-	* Get link's ID interval for _sync_dir_links()
301
-	*
302
-	* @return null
303
-	*/
300
+	 * Get link's ID interval for _sync_dir_links()
301
+	 *
302
+	 * @return null
303
+	 */
304 304
 	public function action_sync()
305 305
 	{
306 306
 		if (!$this->cat_id)
@@ -382,10 +382,10 @@  discard block
 block discarded – undo
382 382
 	}
383 383
 
384 384
 	/**
385
-	* Sync category data
386
-	*
387
-	* @return null
388
-	*/
385
+	 * Sync category data
386
+	 *
387
+	 * @return null
388
+	 */
389 389
 	public function action_sync_cat()
390 390
 	{
391 391
 		$sql = 'SELECT cat_name
@@ -409,10 +409,10 @@  discard block
 block discarded – undo
409 409
 	}
410 410
 
411 411
 	/**
412
-	* Display categories page
413
-	*
414
-	* @return null
415
-	*/
412
+	 * Display categories page
413
+	 *
414
+	 * @return null
415
+	 */
416 416
 	public function display_cats()
417 417
 	{
418 418
 		// Default management page
@@ -506,22 +506,22 @@  discard block
 block discarded – undo
506 506
 	}
507 507
 
508 508
 	/**
509
-	* Set page url
510
-	*
511
-	* @param	string $u_action Custom form action
512
-	* @return	null
513
-	* @access	public
514
-	*/
509
+	 * Set page url
510
+	 *
511
+	 * @param	string $u_action Custom form action
512
+	 * @return	null
513
+	 * @access	public
514
+	 */
515 515
 	public function set_page_url($u_action)
516 516
 	{
517 517
 		$this->u_action = $u_action;
518 518
 	}
519 519
 
520 520
 	/**
521
-	* Update cat table
522
-	*
523
-	* @return null
524
-	*/
521
+	 * Update cat table
522
+	 *
523
+	 * @return null
524
+	 */
525 525
 	public function update()
526 526
 	{
527 527
 		if (!check_form_key($this->form_key))
@@ -619,13 +619,13 @@  discard block
 block discarded – undo
619 619
 	}
620 620
 
621 621
 	/**
622
-	* Check route
623
-	*
624
-	* @param string $route Route text
625
-	* @return null
626
-	* @access public
627
-	* @throws \phpbb\pages\exception\unexpected_value
628
-	*/
622
+	 * Check route
623
+	 *
624
+	 * @param string $route Route text
625
+	 * @return null
626
+	 * @access public
627
+	 * @throws \phpbb\pages\exception\unexpected_value
628
+	 */
629 629
 	private function _check_route($route)
630 630
 	{
631 631
 		// Route is a required field
@@ -656,11 +656,11 @@  discard block
 block discarded – undo
656 656
 	}
657 657
 
658 658
 	/**
659
-	* Display form
660
-	*
661
-	* @param	string $parents_list	Drop-down list
662
-	* @return	null
663
-	*/
659
+	 * Display form
660
+	 *
661
+	 * @param	string $parents_list	Drop-down list
662
+	 * @return	null
663
+	 */
664 664
 	private function _display_cat_form($parents_list)
665 665
 	{
666 666
 		$dir_cat_desc_data = array(
@@ -732,11 +732,11 @@  discard block
 block discarded – undo
732 732
 	}
733 733
 
734 734
 	/**
735
-	* Get category details
736
-	*
737
-	* @param	int		$cat_id	The category ID
738
-	* @return 	array
739
-	*/
735
+	 * Get category details
736
+	 *
737
+	 * @param	int		$cat_id	The category ID
738
+	 * @return 	array
739
+	 */
740 740
 	private function _get_cat_info($cat_id)
741 741
 	{
742 742
 		$sql = 'SELECT cat_id, parent_id, right_id, left_id, cat_desc, cat_desc_uid, cat_desc_options, cat_icon, cat_name, cat_route, display_subcat_list, cat_allow_comments, cat_allow_votes, cat_must_describe, cat_count_all, cat_validate, cat_cron_freq, cat_cron_nb_check, cat_link_back, cat_cron_enable, cat_cron_next
@@ -755,10 +755,10 @@  discard block
 block discarded – undo
755 755
 	}
756 756
 
757 757
 	/**
758
-	* Update category data
759
-	*
760
-	* @return array
761
-	*/
758
+	 * Update category data
759
+	 *
760
+	 * @return array
761
+	 */
762 762
 	private function _update_cat_data()
763 763
 	{
764 764
 		if (!$this->cat_data['cat_name'])
@@ -854,14 +854,14 @@  discard block
 block discarded – undo
854 854
 	}
855 855
 
856 856
 	/**
857
-	* Remove complete category
858
-	*
859
-	* @param	string	$action_links	Action for categories links
860
-	* @param	string	$action_subcats	Action for sub-categories
861
-	* @param	int		$links_to_id	New category ID for links
862
-	* @param	int		$subcats_to_id	New category ID for sub-categories
863
-	* @return 	array
864
-	*/
857
+	 * Remove complete category
858
+	 *
859
+	 * @param	string	$action_links	Action for categories links
860
+	 * @param	string	$action_subcats	Action for sub-categories
861
+	 * @param	int		$links_to_id	New category ID for links
862
+	 * @param	int		$subcats_to_id	New category ID for sub-categories
863
+	 * @return 	array
864
+	 */
865 865
 	private function _delete_cat($action_links = 'delete', $action_subcats = 'delete', $links_to_id = 0, $subcats_to_id = 0)
866 866
 	{
867 867
 		$this->cat_data = $this->_get_cat_info($this->cat_id);
@@ -978,12 +978,12 @@  discard block
 block discarded – undo
978 978
 	}
979 979
 
980 980
 	/**
981
-	* Move category content from one to another forum
982
-	*
983
-	* @param	int	$from_id
984
-	* @param	int	$to_id
985
-	* @return	null
986
-	*/
981
+	 * Move category content from one to another forum
982
+	 *
983
+	 * @param	int	$from_id
984
+	 * @param	int	$to_id
985
+	 * @return	null
986
+	 */
987 987
 	private function _move_cat_content($from_id, $to_id)
988 988
 	{
989 989
 		$sql = 'UPDATE ' . $this->links_table . '
@@ -999,10 +999,10 @@  discard block
 block discarded – undo
999 999
 	}
1000 1000
 
1001 1001
 	/**
1002
-	* Delete category content
1003
-	*
1004
-	* @return array
1005
-	*/
1002
+	 * Delete category content
1003
+	 *
1004
+	 * @return array
1005
+	 */
1006 1006
 	private function _delete_cat_content()
1007 1007
 	{
1008 1008
 		$this->db->sql_transaction('begin');
@@ -1061,11 +1061,11 @@  discard block
 block discarded – undo
1061 1061
 	}
1062 1062
 
1063 1063
 	/**
1064
-	* Update links counter
1065
-	*
1066
-	* @param	int $cat_id	The category ID
1067
-	* @return	null
1068
-	*/
1064
+	 * Update links counter
1065
+	 *
1066
+	 * @param	int $cat_id	The category ID
1067
+	 * @return	null
1068
+	 */
1069 1069
 	private function _sync_dir_cat($cat_id)
1070 1070
 	{
1071 1071
 		$sql = 'SELECT COUNT(link_id) AS num_links
@@ -1083,12 +1083,12 @@  discard block
 block discarded – undo
1083 1083
 	}
1084 1084
 
1085 1085
 	/**
1086
-	* Update link data (note, vote, comment)
1087
-	*
1088
-	* @param	int	$start
1089
-	* @param	int	$stop
1090
-	* @return	null
1091
-	*/
1086
+	 * Update link data (note, vote, comment)
1087
+	 *
1088
+	 * @param	int	$start
1089
+	 * @param	int	$stop
1090
+	 * @return	null
1091
+	 */
1092 1092
 	private function _sync_dir_links($start, $stop)
1093 1093
 	{
1094 1094
 		$sql_ary = array(
@@ -1131,12 +1131,12 @@  discard block
 block discarded – undo
1131 1131
 	}
1132 1132
 
1133 1133
 	/**
1134
-	* Display icons drop-down list
1135
-	*
1136
-	* @param	string	$icons_path
1137
-	* @param	string	$img_selected
1138
-	* @return	string
1139
-	*/
1134
+	 * Display icons drop-down list
1135
+	 *
1136
+	 * @param	string	$icons_path
1137
+	 * @param	string	$img_selected
1138
+	 * @return	string
1139
+	 */
1140 1140
 	private function _get_dir_icon_list($icons_path, $img_selected)
1141 1141
 	{
1142 1142
 		$imglist = filelist($icons_path, '');
Please login to merge, or discard this patch.
Spacing   +90 added lines, -90 removed lines patch added patch discarded remove patch
@@ -84,23 +84,23 @@  discard block
 block discarded – undo
84 84
 	*/
85 85
 	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\nestedset_category $nestedset_category)
86 86
 	{
87
-		$this->cache				= $cache;
88
-		$this->db					= $db;
89
-		$this->helper				= $helper;
87
+		$this->cache = $cache;
88
+		$this->db = $db;
89
+		$this->helper = $helper;
90 90
 		$this->language				= $language;
91 91
 		$this->phpbb_log			= $log;
92
-		$this->request				= $request;
92
+		$this->request = $request;
93 93
 		$this->template				= $template;
94
-		$this->user					= $user;
94
+		$this->user = $user;
95 95
 		$this->categorie			= $categorie;
96
-		$this->nestedset_category	= $nestedset_category;
96
+		$this->nestedset_category = $nestedset_category;
97 97
 
98 98
 		$this->form_key = 'acp_dir_cat';
99 99
 		add_form_key($this->form_key);
100 100
 
101 101
 		$this->action		= $this->request->variable('action', '');
102 102
 		$this->cat_id		= $request->variable('c', 0);
103
-		$this->parent_id	= $request->variable('parent_id', 0);
103
+		$this->parent_id = $request->variable('parent_id', 0);
104 104
 		$this->update		= ($this->request->is_set_post('update')) ? true : false;
105 105
 	}
106 106
 
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 	{
152 152
 		if (!$this->cat_id)
153 153
 		{
154
-			trigger_error($this->language->lang('DIR_NO_CAT') . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
154
+			trigger_error($this->language->lang('DIR_NO_CAT').adm_back_link($this->u_action.'&amp;parent_id='.$this->parent_id), E_USER_WARNING);
155 155
 		}
156 156
 
157 157
 		$this->cat_data = $this->_get_cat_info($this->cat_id);
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 		$cat_list = $this->categorie->make_cat_select((int) $this->cat_data['parent_id'], $subcats_id);
168 168
 
169 169
 		$sql = 'SELECT cat_id
170
-			FROM ' . $this->categories_table . '
170
+			FROM ' . $this->categories_table.'
171 171
 			WHERE cat_id <> ' . (int) $this->cat_id;
172 172
 		$result = $this->db->sql_query_limit($sql, 1);
173 173
 
@@ -183,8 +183,8 @@  discard block
 block discarded – undo
183 183
 
184 184
 		$this->template->assign_vars(array(
185 185
 			'S_DELETE_DIR_CAT'		=> true,
186
-			'U_ACTION'				=> $this->u_action . "&amp;parent_id={$parent_id}&amp;action=delete&amp;c=$this->cat_id",
187
-			'U_BACK'				=> $this->u_action . '&amp;parent_id=' . $this->parent_id,
186
+			'U_ACTION'				=> $this->u_action."&amp;parent_id={$parent_id}&amp;action=delete&amp;c=$this->cat_id",
187
+			'U_BACK'				=> $this->u_action.'&amp;parent_id='.$this->parent_id,
188 188
 
189 189
 			'DIR_CAT_NAME'			=> $this->cat_data['cat_name'],
190 190
 			'S_HAS_SUBCATS'			=> ($this->cat_data['right_id'] - $this->cat_data['left_id'] > 1) ? true : false,
@@ -235,11 +235,11 @@  discard block
 block discarded – undo
235 235
 	{
236 236
 		if (!$this->cat_id)
237 237
 		{
238
-			trigger_error($this->language->lang('DIR_NO_CAT') . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
238
+			trigger_error($this->language->lang('DIR_NO_CAT').adm_back_link($this->u_action.'&amp;parent_id='.$this->parent_id), E_USER_WARNING);
239 239
 		}
240 240
 
241 241
 		$sql = 'SELECT cat_id, cat_name, parent_id, left_id, right_id
242
-			FROM ' . $this->categories_table . '
242
+			FROM ' . $this->categories_table.'
243 243
 			WHERE cat_id = ' . (int) $this->cat_id;
244 244
 		$result = $this->db->sql_query($sql);
245 245
 		$row = $this->db->sql_fetchrow($result);
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 
248 248
 		if (!$row)
249 249
 		{
250
-			trigger_error($this->language->lang('DIR_NO_CAT') . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
250
+			trigger_error($this->language->lang('DIR_NO_CAT').adm_back_link($this->u_action.'&amp;parent_id='.$this->parent_id), E_USER_WARNING);
251 251
 		}
252 252
 
253 253
 		try
@@ -261,7 +261,7 @@  discard block
 block discarded – undo
261 261
 
262 262
 		if ($move_cat_name !== false)
263 263
 		{
264
-			$this->phpbb_log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_DIR_CAT_' . strtoupper($this->action), time(), array($row['cat_name'], $move_cat_name));
264
+			$this->phpbb_log->add('admin', $this->user->data['user_id'], $this->user->ip, 'LOG_DIR_CAT_'.strtoupper($this->action), time(), array($row['cat_name'], $move_cat_name));
265 265
 			$this->cache->destroy('sql', $this->categories_table);
266 266
 		}
267 267
 
@@ -305,13 +305,13 @@  discard block
 block discarded – undo
305 305
 	{
306 306
 		if (!$this->cat_id)
307 307
 		{
308
-			trigger_error($this->language->lang('DIR_NO_CAT') . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
308
+			trigger_error($this->language->lang('DIR_NO_CAT').adm_back_link($this->u_action.'&amp;parent_id='.$this->parent_id), E_USER_WARNING);
309 309
 		}
310 310
 
311 311
 		@set_time_limit(0);
312 312
 
313 313
 		$sql = 'SELECT cat_name, cat_links
314
-			FROM ' . $this->categories_table . '
314
+			FROM ' . $this->categories_table.'
315 315
 			WHERE cat_id = ' . (int) $this->cat_id;
316 316
 		$result = $this->db->sql_query($sql);
317 317
 		$row = $this->db->sql_fetchrow($result);
@@ -319,12 +319,12 @@  discard block
 block discarded – undo
319 319
 
320 320
 		if (!$row)
321 321
 		{
322
-			trigger_error($this->language->lang('DIR_NO_CAT') . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
322
+			trigger_error($this->language->lang('DIR_NO_CAT').adm_back_link($this->u_action.'&amp;parent_id='.$this->parent_id), E_USER_WARNING);
323 323
 		}
324 324
 
325 325
 		$sql = 'SELECT MIN(link_id) as min_link_id, MAX(link_id) as max_link_id
326
-			FROM ' . $this->links_table . '
327
-			WHERE link_cat = ' . (int) $this->cat_id . '
326
+			FROM ' . $this->links_table.'
327
+			WHERE link_cat = ' . (int) $this->cat_id.'
328 328
 				AND link_active = 1';
329 329
 		$result = $this->db->sql_query($sql);
330 330
 		$row2 = $this->db->sql_fetchrow($result);
@@ -346,22 +346,22 @@  discard block
 block discarded – undo
346 346
 		{
347 347
 			// We really need to find a way of showing statistics... no progress here
348 348
 			$sql = 'SELECT COUNT(link_id) as num_links
349
-				FROM ' . $this->links_table . '
350
-				WHERE link_cat = ' . (int) $this->cat_id . '
349
+				FROM ' . $this->links_table.'
350
+				WHERE link_cat = ' . (int) $this->cat_id.'
351 351
 						AND link_active = 1
352
-						AND link_id BETWEEN ' . $start . ' AND ' . $end;
352
+						AND link_id BETWEEN ' . $start.' AND '.$end;
353 353
 			$result = $this->db->sql_query($sql);
354 354
 			$links_done = $this->request->variable('links_done', 0) + (int) $this->db->sql_fetchfield('num_links');
355 355
 			$this->db->sql_freeresult($result);
356 356
 
357 357
 			$start += $batch_size;
358 358
 
359
-			$url = $this->u_action . "&amp;parent_id={$this->parent_id}&amp;c=$this->cat_id&amp;action=sync&amp;start=$start&amp;links_done=$links_done&amp;total={$row['cat_links']}";
359
+			$url = $this->u_action."&amp;parent_id={$this->parent_id}&amp;c=$this->cat_id&amp;action=sync&amp;start=$start&amp;links_done=$links_done&amp;total={$row['cat_links']}";
360 360
 
361 361
 			meta_refresh(0, $url);
362 362
 
363 363
 			$this->template->assign_vars(array(
364
-				'UA_PROGRESS_BAR'		=> $this->u_action . "&amp;action=progress_bar&amp;start=$links_done&amp;total={$row['cat_links']}",
364
+				'UA_PROGRESS_BAR'		=> $this->u_action."&amp;action=progress_bar&amp;start=$links_done&amp;total={$row['cat_links']}",
365 365
 				'S_CONTINUE_SYNC'		=> true,
366 366
 				'L_PROGRESS_EXPLAIN'	=> $this->language->lang('SYNC_IN_PROGRESS_EXPLAIN', $links_done, $row['cat_links']))
367 367
 			);
@@ -369,11 +369,11 @@  discard block
 block discarded – undo
369 369
 			return;
370 370
 		}
371 371
 
372
-		$url = $this->u_action . "&amp;parent_id={$this->parent_id}&amp;c=$this->cat_id&amp;action=sync_cat";
372
+		$url = $this->u_action."&amp;parent_id={$this->parent_id}&amp;c=$this->cat_id&amp;action=sync_cat";
373 373
 		meta_refresh(0, $url);
374 374
 
375 375
 		$this->template->assign_vars(array(
376
-			'UA_PROGRESS_BAR'		=> $this->u_action . '&amp;action=progress_bar',
376
+			'UA_PROGRESS_BAR'		=> $this->u_action.'&amp;action=progress_bar',
377 377
 			'S_CONTINUE_SYNC'		=> true,
378 378
 			'L_PROGRESS_EXPLAIN'	=> $this->language->lang('SYNC_IN_PROGRESS_EXPLAIN', 0, $row['cat_links']))
379 379
 		);
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
 	public function action_sync_cat()
390 390
 	{
391 391
 		$sql = 'SELECT cat_name
392
-			FROM ' . $this->categories_table . '
392
+			FROM ' . $this->categories_table.'
393 393
 			WHERE cat_id = ' . (int) $this->cat_id;
394 394
 		$result = $this->db->sql_query($sql);
395 395
 		$row = $this->db->sql_fetchrow($result);
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
 
398 398
 		if (!$row)
399 399
 		{
400
-			trigger_error($this->language->lang('DIR_NO_CAT') . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id), E_USER_WARNING);
400
+			trigger_error($this->language->lang('DIR_NO_CAT').adm_back_link($this->u_action.'&amp;parent_id='.$this->parent_id), E_USER_WARNING);
401 401
 		}
402 402
 
403 403
 		$this->_sync_dir_cat($this->cat_id);
@@ -422,7 +422,7 @@  discard block
 block discarded – undo
422 422
 		}
423 423
 		else
424 424
 		{
425
-			$navigation = '<a href="' . $this->u_action . '">' . $this->language->lang('DIR_INDEX') . '</a>';
425
+			$navigation = '<a href="'.$this->u_action.'">'.$this->language->lang('DIR_INDEX').'</a>';
426 426
 
427 427
 			$cats_nav = $this->nestedset_category->get_path_data($this->parent_id);
428 428
 
@@ -430,11 +430,11 @@  discard block
 block discarded – undo
430 430
 			{
431 431
 				if ($row['cat_id'] == $this->parent_id)
432 432
 				{
433
-					$navigation .= ' -&gt; ' . $row['cat_name'];
433
+					$navigation .= ' -&gt; '.$row['cat_name'];
434 434
 				}
435 435
 				else
436 436
 				{
437
-					$navigation .= ' -&gt; <a href="' . $this->u_action . '&amp;parent_id=' . $row['cat_id'] . '">' . $row['cat_name'] . '</a>';
437
+					$navigation .= ' -&gt; <a href="'.$this->u_action.'&amp;parent_id='.$row['cat_id'].'">'.$row['cat_name'].'</a>';
438 438
 				}
439 439
 			}
440 440
 		}
@@ -448,8 +448,8 @@  discard block
 block discarded – undo
448 448
 		}
449 449
 
450 450
 		$sql = 'SELECT cat_id, parent_id, right_id, left_id, cat_name, cat_icon, cat_desc_uid, cat_desc_bitfield, cat_desc, cat_desc_options, cat_links
451
-			FROM ' . $this->categories_table . '
452
-			WHERE parent_id = ' . (int) $this->parent_id . '
451
+			FROM ' . $this->categories_table.'
452
+			WHERE parent_id = ' . (int) $this->parent_id.'
453 453
 			ORDER BY left_id';
454 454
 		$result = $this->db->sql_query($sql);
455 455
 
@@ -457,23 +457,23 @@  discard block
 block discarded – undo
457 457
 		{
458 458
 			do
459 459
 			{
460
-				$folder_image = ($row['left_id'] + 1 != $row['right_id']) ? '<img src="images/icon_subfolder.gif" alt="' . $this->language->lang('DIR_SUBCAT') . '" />' : '<img src="images/icon_folder.gif" alt="' . $this->language->lang('FOLDER') . '" />';
460
+				$folder_image = ($row['left_id'] + 1 != $row['right_id']) ? '<img src="images/icon_subfolder.gif" alt="'.$this->language->lang('DIR_SUBCAT').'" />' : '<img src="images/icon_folder.gif" alt="'.$this->language->lang('FOLDER').'" />';
461 461
 
462
-				$url = $this->u_action . "&amp;parent_id=$this->parent_id&amp;c={$row['cat_id']}";
462
+				$url = $this->u_action."&amp;parent_id=$this->parent_id&amp;c={$row['cat_id']}";
463 463
 
464 464
 				$this->template->assign_block_vars('cats', array(
465 465
 					'FOLDER_IMAGE'		=> $folder_image,
466
-					'CAT_IMAGE'			=> ($row['cat_icon']) ? '<img src="' . $this->get_img_path('icons', $row['cat_icon']) . '" alt="" />' : '',
466
+					'CAT_IMAGE'			=> ($row['cat_icon']) ? '<img src="'.$this->get_img_path('icons', $row['cat_icon']).'" alt="" />' : '',
467 467
 					'CAT_NAME'			=> $row['cat_name'],
468 468
 					'CAT_DESCRIPTION'	=> generate_text_for_display($row['cat_desc'], $row['cat_desc_uid'], $row['cat_desc_bitfield'], $row['cat_desc_options']),
469 469
 					'CAT_LINKS'			=> $row['cat_links'],
470 470
 
471
-					'U_CAT'				=> $this->u_action . '&amp;parent_id=' . $row['cat_id'],
472
-					'U_MOVE_UP'			=> $url . '&amp;action=move_up',
473
-					'U_MOVE_DOWN'		=> $url . '&amp;action=move_down',
474
-					'U_EDIT'			=> $url . '&amp;action=edit',
475
-					'U_DELETE'			=> $url . '&amp;action=delete',
476
-					'U_SYNC'			=> $url . '&amp;action=sync')
471
+					'U_CAT'				=> $this->u_action.'&amp;parent_id='.$row['cat_id'],
472
+					'U_MOVE_UP'			=> $url.'&amp;action=move_up',
473
+					'U_MOVE_DOWN'		=> $url.'&amp;action=move_down',
474
+					'U_EDIT'			=> $url.'&amp;action=edit',
475
+					'U_DELETE'			=> $url.'&amp;action=delete',
476
+					'U_SYNC'			=> $url.'&amp;action=sync')
477 477
 				);
478 478
 			}
479 479
 			while ($row = $this->db->sql_fetchrow($result));
@@ -482,14 +482,14 @@  discard block
 block discarded – undo
482 482
 		{
483 483
 			$row = $this->_get_cat_info($this->parent_id);
484 484
 
485
-			$url = $this->u_action . '&amp;parent_id=' . $this->parent_id . '&amp;c=' . $row['cat_id'];
485
+			$url = $this->u_action.'&amp;parent_id='.$this->parent_id.'&amp;c='.$row['cat_id'];
486 486
 
487 487
 			$this->template->assign_vars(array(
488 488
 				'S_NO_CATS'			=> true,
489 489
 
490
-				'U_EDIT'			=> $url . '&amp;action=edit',
491
-				'U_DELETE'			=> $url . '&amp;action=delete',
492
-				'U_SYNC'			=> $url . '&amp;action=sync')
490
+				'U_EDIT'			=> $url.'&amp;action=edit',
491
+				'U_DELETE'			=> $url.'&amp;action=delete',
492
+				'U_SYNC'			=> $url.'&amp;action=sync')
493 493
 			);
494 494
 		}
495 495
 		$this->db->sql_freeresult($result);
@@ -499,9 +499,9 @@  discard block
 block discarded – undo
499 499
 			'NAVIGATION'	=> $navigation,
500 500
 			'CAT_BOX'		=> $cat_box,
501 501
 			'U_SEL_ACTION'	=> $this->u_action,
502
-			'U_ACTION'		=> $this->u_action . '&amp;parent_id=' . $this->parent_id,
502
+			'U_ACTION'		=> $this->u_action.'&amp;parent_id='.$this->parent_id,
503 503
 
504
-			'UA_PROGRESS_BAR'	=> $this->u_action . '&amp;action=progress_bar',
504
+			'UA_PROGRESS_BAR'	=> $this->u_action.'&amp;action=progress_bar',
505 505
 		));
506 506
 	}
507 507
 
@@ -533,10 +533,10 @@  discard block
 block discarded – undo
533 533
 		switch ($this->action)
534 534
 		{
535 535
 			case 'delete':
536
-				$action_subcats	= $this->request->variable('action_subcats', '');
537
-				$subcats_to_id	= $this->request->variable('subcats_to_id', 0);
538
-				$action_links	= $this->request->variable('action_links', '');
539
-				$links_to_id	= $this->request->variable('links_to_id', 0);
536
+				$action_subcats = $this->request->variable('action_subcats', '');
537
+				$subcats_to_id = $this->request->variable('subcats_to_id', 0);
538
+				$action_links = $this->request->variable('action_links', '');
539
+				$links_to_id = $this->request->variable('links_to_id', 0);
540 540
 
541 541
 				try
542 542
 				{
@@ -554,7 +554,7 @@  discard block
 block discarded – undo
554 554
 
555 555
 				$this->cache->destroy('sql', $this->categories_table);
556 556
 
557
-				trigger_error($this->language->lang('DIR_CAT_DELETED') . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
557
+				trigger_error($this->language->lang('DIR_CAT_DELETED').adm_back_link($this->u_action.'&amp;parent_id='.$this->parent_id));
558 558
 
559 559
 				break;
560 560
 
@@ -608,7 +608,7 @@  discard block
 block discarded – undo
608 608
 
609 609
 					$message = ($this->action == 'add') ? $this->language->lang('DIR_CAT_CREATED') : $this->language->lang('DIR_CAT_UPDATED');
610 610
 
611
-					trigger_error($message . adm_back_link($this->u_action . '&amp;parent_id=' . $this->parent_id));
611
+					trigger_error($message.adm_back_link($this->u_action.'&amp;parent_id='.$this->parent_id));
612 612
 				}
613 613
 
614 614
 			break;
@@ -642,8 +642,8 @@  discard block
 block discarded – undo
642 642
 		}
643 643
 
644 644
 		$sql = 'SELECT cat_route
645
-			FROM ' . $this->categories_table  . "
646
-			WHERE cat_route = '" . $this->db->sql_escape($route) . "'
645
+			FROM ' . $this->categories_table."
646
+			WHERE cat_route = '" . $this->db->sql_escape($route)."'
647 647
 				AND cat_id <> " . $this->cat_id;
648 648
 		$result = $this->db->sql_query_limit($sql, 1);
649 649
 		$row = $this->db->sql_fetchrow($result);
@@ -693,10 +693,10 @@  discard block
 block discarded – undo
693 693
 			'S_CAT_PARENT_ID'	=> $this->cat_data['parent_id'],
694 694
 			'S_ADD_ACTION'		=> ($this->action == 'add') ? true : false,
695 695
 
696
-			'U_BACK'			=> $this->u_action . '&amp;parent_id=' . $this->parent_id,
697
-			'U_EDIT_ACTION'		=> $this->u_action . "&amp;parent_id={$this->parent_id}&amp;action=$this->action&amp;c=$this->cat_id",
696
+			'U_BACK'			=> $this->u_action.'&amp;parent_id='.$this->parent_id,
697
+			'U_EDIT_ACTION'		=> $this->u_action."&amp;parent_id={$this->parent_id}&amp;action=$this->action&amp;c=$this->cat_id",
698 698
 
699
-			'L_TITLE'					=> $this->language->lang('DIR_' . strtoupper($this->action) . '_CAT'),
699
+			'L_TITLE'					=> $this->language->lang('DIR_'.strtoupper($this->action).'_CAT'),
700 700
 			'ERROR_MSG'					=> (sizeof($this->errors)) ? implode('<br />', $this->errors) : '',
701 701
 			'ICON_IMAGE'				=> ($this->cat_data['cat_icon']) ? $this->get_img_path('icons', $this->cat_data['cat_icon']) : 'images/spacer.gif',
702 702
 
@@ -740,7 +740,7 @@  discard block
 block discarded – undo
740 740
 	private function _get_cat_info($cat_id)
741 741
 	{
742 742
 		$sql = 'SELECT cat_id, parent_id, right_id, left_id, cat_desc, cat_desc_uid, cat_desc_options, cat_icon, cat_name, cat_route, display_subcat_list, cat_allow_comments, cat_allow_votes, cat_must_describe, cat_count_all, cat_validate, cat_cron_freq, cat_cron_nb_check, cat_link_back, cat_cron_enable, cat_cron_next
743
-			FROM ' . $this->categories_table . '
743
+			FROM ' . $this->categories_table.'
744 744
 			WHERE cat_id = ' . (int) $cat_id;
745 745
 		$result = $this->db->sql_query($sql);
746 746
 		$row = $this->db->sql_fetchrow($result);
@@ -805,7 +805,7 @@  discard block
 block discarded – undo
805 805
 		{
806 806
 			if ($cat_data_sql['cat_cron_enable'])
807 807
 			{
808
-				$cat_data_sql['cat_cron_next'] = time() + $cat_data_sql['cat_cron_freq']*86400;
808
+				$cat_data_sql['cat_cron_next'] = time() + $cat_data_sql['cat_cron_freq'] * 86400;
809 809
 			}
810 810
 
811 811
 			$this->cat_data = $this->nestedset_category->insert($cat_data_sql);
@@ -828,13 +828,13 @@  discard block
 block discarded – undo
828 828
 
829 829
 			if ($cat_data_sql['cat_cron_enable'] && ($row['cat_cron_freq'] != $cat_data_sql['cat_cron_freq'] || !$row['cat_cron_enable']))
830 830
 			{
831
-				$cat_data_sql['cat_cron_next'] = time() + $cat_data_sql['cat_cron_freq']*86400;
831
+				$cat_data_sql['cat_cron_next'] = time() + $cat_data_sql['cat_cron_freq'] * 86400;
832 832
 			}
833 833
 
834 834
 			if ($row['cat_name'] != $cat_data_sql['cat_name'])
835 835
 			{
836 836
 				// the cat name has changed, clear the parents list of all categories (for safety)
837
-				$sql = 'UPDATE ' . $this->categories_table . "
837
+				$sql = 'UPDATE '.$this->categories_table."
838 838
 					SET cat_parents = ''";
839 839
 				$this->db->sql_query($sql);
840 840
 			}
@@ -842,8 +842,8 @@  discard block
 block discarded – undo
842 842
 			// Setting the cat id to the categorie id is not really received well by some dbs. ;)
843 843
 			unset($cat_data_sql['cat_id']);
844 844
 
845
-			$sql = 'UPDATE ' . $this->categories_table . '
846
-				SET ' . $this->db->sql_build_array('UPDATE', $cat_data_sql) . '
845
+			$sql = 'UPDATE '.$this->categories_table.'
846
+				SET ' . $this->db->sql_build_array('UPDATE', $cat_data_sql).'
847 847
 				WHERE cat_id = ' . (int) $this->cat_id;
848 848
 			$this->db->sql_query($sql);
849 849
 
@@ -884,7 +884,7 @@  discard block
 block discarded – undo
884 884
 				$log_action_links = 'MOVE_LINKS';
885 885
 
886 886
 				$sql = 'SELECT cat_name
887
-					FROM ' . $this->categories_table . '
887
+					FROM ' . $this->categories_table.'
888 888
 					WHERE cat_id = ' . (int) $links_to_id;
889 889
 				$result = $this->db->sql_query($sql);
890 890
 				$row = $this->db->sql_fetchrow($result);
@@ -986,12 +986,12 @@  discard block
 block discarded – undo
986 986
 	*/
987 987
 	private function _move_cat_content($from_id, $to_id)
988 988
 	{
989
-		$sql = 'UPDATE ' . $this->links_table . '
990
-			SET link_cat = ' . (int) $to_id . '
989
+		$sql = 'UPDATE '.$this->links_table.'
990
+			SET link_cat = ' . (int) $to_id.'
991 991
 			WHERE link_cat = ' . (int) $from_id;
992 992
 		$this->db->sql_query($sql);
993 993
 
994
-		$sql = 'DELETE FROM ' . $this->watch_table . '
994
+		$sql = 'DELETE FROM '.$this->watch_table.'
995 995
 			WHERE cat_id = ' . (int) $from_id;
996 996
 		$this->db->sql_query($sql);
997 997
 
@@ -1009,7 +1009,7 @@  discard block
 block discarded – undo
1009 1009
 
1010 1010
 		// Before we remove anything we make sure we are able to adjust the post counts later. ;)
1011 1011
 		$sql = 'SELECT link_id, link_banner
1012
-			FROM ' . $this->links_table . '
1012
+			FROM ' . $this->links_table.'
1013 1013
 			WHERE link_cat = ' . (int) $this->cat_id;
1014 1014
 		$result = $this->db->sql_query($sql);
1015 1015
 
@@ -1040,7 +1040,7 @@  discard block
 block discarded – undo
1040 1040
 
1041 1041
 			foreach ($link_datas_ary as $table => $field)
1042 1042
 			{
1043
-				$this->db->sql_query("DELETE FROM $table WHERE " . $this->db->sql_in_set($field, $link_ids));
1043
+				$this->db->sql_query("DELETE FROM $table WHERE ".$this->db->sql_in_set($field, $link_ids));
1044 1044
 			}
1045 1045
 		}
1046 1046
 
@@ -1052,7 +1052,7 @@  discard block
 block discarded – undo
1052 1052
 
1053 1053
 		foreach ($cat_datas_ary as $table => $field)
1054 1054
 		{
1055
-			$this->db->sql_query("DELETE FROM $table WHERE $field = " . (int) $this->cat_id);
1055
+			$this->db->sql_query("DELETE FROM $table WHERE $field = ".(int) $this->cat_id);
1056 1056
 		}
1057 1057
 
1058 1058
 		$this->db->sql_transaction('commit');
@@ -1069,15 +1069,15 @@  discard block
 block discarded – undo
1069 1069
 	private function _sync_dir_cat($cat_id)
1070 1070
 	{
1071 1071
 		$sql = 'SELECT COUNT(link_id) AS num_links
1072
-			FROM ' . $this->links_table . '
1073
-			WHERE link_cat = ' . (int) $cat_id . '
1072
+			FROM ' . $this->links_table.'
1073
+			WHERE link_cat = ' . (int) $cat_id.'
1074 1074
 				AND link_active = 1';
1075 1075
 		$result = $this->db->sql_query($sql);
1076 1076
 		$total_links = (int) $this->db->sql_fetchfield('num_links');
1077 1077
 		$this->db->sql_freeresult($result);
1078 1078
 
1079
-		$sql = 'UPDATE ' . $this->categories_table . '
1080
-			SET cat_links = ' . $total_links . '
1079
+		$sql = 'UPDATE '.$this->categories_table.'
1080
+			SET cat_links = ' . $total_links.'
1081 1081
 			WHERE cat_id = ' . (int) $cat_id;
1082 1082
 		$this->db->sql_query($sql);
1083 1083
 	}
@@ -1097,33 +1097,33 @@  discard block
 block discarded – undo
1097 1097
 			'link_vote'		=> 0,
1098 1098
 		);
1099 1099
 
1100
-		$sql = 'UPDATE ' . $this->links_table . '
1101
-			SET ' . $this->db->sql_build_array('UPDATE', $sql_ary) . '
1102
-			WHERE link_id BETWEEN ' . (int) $start . ' AND ' . (int) $stop;
1100
+		$sql = 'UPDATE '.$this->links_table.'
1101
+			SET ' . $this->db->sql_build_array('UPDATE', $sql_ary).'
1102
+			WHERE link_id BETWEEN ' . (int) $start.' AND '.(int) $stop;
1103 1103
 		$this->db->sql_query($sql);
1104 1104
 
1105
-		$sql = 'SELECT vote_link_id, COUNT(vote_note) AS nb_vote, SUM(vote_note) AS total FROM ' . $this->votes_table . '
1106
-			WHERE vote_link_id BETWEEN ' . (int) $start . ' AND ' . (int) $stop . '
1105
+		$sql = 'SELECT vote_link_id, COUNT(vote_note) AS nb_vote, SUM(vote_note) AS total FROM '.$this->votes_table.'
1106
+			WHERE vote_link_id BETWEEN ' . (int) $start.' AND '.(int) $stop.'
1107 1107
 			GROUP BY vote_link_id';
1108 1108
 		$result = $this->db->sql_query($sql);
1109 1109
 		while ($tmp = $this->db->sql_fetchrow($result))
1110 1110
 		{
1111
-			$sql = 'UPDATE ' . $this->links_table . '
1112
-				SET link_note = ' . (int) $tmp['total'] . ', link_vote = ' . (int) $tmp['nb_vote'] . '
1111
+			$sql = 'UPDATE '.$this->links_table.'
1112
+				SET link_note = ' . (int) $tmp['total'].', link_vote = '.(int) $tmp['nb_vote'].'
1113 1113
 				WHERE link_id = ' . (int) $tmp['vote_link_id'];
1114 1114
 			$this->db->sql_query($sql);
1115 1115
 		}
1116 1116
 		$this->db->sql_freeresult($result);
1117 1117
 
1118 1118
 		$sql = 'SELECT 	comment_link_id, COUNT(comment_id) AS nb_comment
1119
-			FROM ' . $this->comments_table . '
1120
-			WHERE comment_link_id BETWEEN ' . (int) $start . ' AND ' . (int) $stop . '
1119
+			FROM ' . $this->comments_table.'
1120
+			WHERE comment_link_id BETWEEN ' . (int) $start.' AND '.(int) $stop.'
1121 1121
 			GROUP BY comment_link_id';
1122 1122
 		$result = $this->db->sql_query($sql);
1123 1123
 		while ($tmp = $this->db->sql_fetchrow($result))
1124 1124
 		{
1125
-			$sql = 'UPDATE ' . $this->links_table . '
1126
-				SET link_comment = ' . (int) $tmp['nb_comment'] . '
1125
+			$sql = 'UPDATE '.$this->links_table.'
1126
+				SET link_comment = ' . (int) $tmp['nb_comment'].'
1127 1127
 				WHERE link_id = ' . (int) $tmp['comment_link_id'];
1128 1128
 			$this->db->sql_query($sql);
1129 1129
 		}
@@ -1148,7 +1148,7 @@  discard block
 block discarded – undo
1148 1148
 
1149 1149
 			foreach ($img_ary as $img)
1150 1150
 			{
1151
-				$img = $path . $img;
1151
+				$img = $path.$img;
1152 1152
 				$selected = '';
1153 1153
 
1154 1154
 				if (strlen($img) > 255)
@@ -1161,7 +1161,7 @@  discard block
 block discarded – undo
1161 1161
 					$selected = ' selected="selected"';
1162 1162
 				}
1163 1163
 
1164
-				$filename_list .= '<option value="' . htmlspecialchars($img) . '"' . $selected . '>' . $img . '</option>';
1164
+				$filename_list .= '<option value="'.htmlspecialchars($img).'"'.$selected.'>'.$img.'</option>';
1165 1165
 			}
1166 1166
 		}
1167 1167
 
Please login to merge, or discard this patch.
controller/links.php 1 patch
Spacing   +43 added lines, -43 removed lines patch added patch discarded remove patch
@@ -87,19 +87,19 @@  discard block
 block discarded – undo
87 87
 	*/
88 88
 	public function __construct(\phpbb\db\driver\driver_interface $db, \phpbb\config\config $config, \phpbb\language\language $language, \phpbb\template\template $template, \phpbb\user $user, \phpbb\controller\helper $helper, \phpbb\request\request $request, \phpbb\auth\auth $auth, \phpbb\captcha\factory $captcha_factory, \ernadoo\phpbbdirectory\core\categorie $categorie, \ernadoo\phpbbdirectory\core\link $link, $root_path, $php_ext)
89 89
 	{
90
-		$this->db				= $db;
91
-		$this->config			= $config;
90
+		$this->db = $db;
91
+		$this->config = $config;
92 92
 		$this->language			= $language;
93 93
 		$this->template			= $template;
94 94
 		$this->user				= $user;
95
-		$this->helper			= $helper;
96
-		$this->request			= $request;
95
+		$this->helper = $helper;
96
+		$this->request = $request;
97 97
 		$this->auth				= $auth;
98
-		$this->captcha_factory 	= $captcha_factory;
98
+		$this->captcha_factory = $captcha_factory;
99 99
 		$this->categorie		= $categorie;
100 100
 		$this->link				= $link;
101 101
 		$this->root_path		= $root_path;
102
-		$this->php_ext			= $php_ext;
102
+		$this->php_ext = $php_ext;
103 103
 
104 104
 		$language->add_lang('directory', 'ernadoo/phpbbdirectory');
105 105
 
@@ -119,12 +119,12 @@  discard block
 block discarded – undo
119 119
 	{
120 120
 		if ($this->request->is_set_post('cancel'))
121 121
 		{
122
-			$redirect = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $cat_id);
122
+			$redirect = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$cat_id);
123 123
 			redirect($redirect);
124 124
 		}
125 125
 
126 126
 		$sql = 'SELECT link_user_id
127
-			FROM ' . $this->links_table . '
127
+			FROM ' . $this->links_table.'
128 128
 			WHERE link_id = ' . (int) $link_id;
129 129
 		$result = $this->db->sql_query($sql);
130 130
 		$link_data = $this->db->sql_fetchrow($result);
@@ -145,9 +145,9 @@  discard block
 block discarded – undo
145 145
 		{
146 146
 			$this->link->del($cat_id, $link_id);
147 147
 
148
-			$meta_info = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $cat_id);
148
+			$meta_info = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$cat_id);
149 149
 			meta_refresh(3, $meta_info);
150
-			$message = $this->language->lang('DIR_DELETE_OK') . '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_DIR', '<a href="' . $this->helper->route('ernadoo_phpbbdirectory_base_controller') . '">', '</a>') . '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="' . $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $cat_id) . '">', '</a>');
150
+			$message = $this->language->lang('DIR_DELETE_OK').'<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_DIR', '<a href="'.$this->helper->route('ernadoo_phpbbdirectory_base_controller').'">', '</a>').'<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="'.$this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$cat_id).'">', '</a>');
151 151
 			return $this->helper->message($message);
152 152
 		}
153 153
 		else
@@ -167,7 +167,7 @@  discard block
 block discarded – undo
167 167
 	public function edit_link($cat_id, $link_id)
168 168
 	{
169 169
 		$sql = 'SELECT link_user_id
170
-			FROM ' . $this->links_table . '
170
+			FROM ' . $this->links_table.'
171 171
 			WHERE link_id = ' . (int) $link_id;
172 172
 		$result = $this->db->sql_query($sql);
173 173
 		$link_data = $this->db->sql_fetchrow($result);
@@ -183,7 +183,7 @@  discard block
 block discarded – undo
183 183
 		$cat_id		= $this->request->variable('id', $cat_id);
184 184
 		$submit		= $this->request->is_set_post('submit') ? true : false;
185 185
 		$refresh	= $this->request->is_set_post('refresh_vc') ? true : false;
186
-		$title		= $this->language->lang('DIR_EDIT_SITE');
186
+		$title = $this->language->lang('DIR_EDIT_SITE');
187 187
 
188 188
 		$this->template->assign_block_vars('dir_navlinks', array(
189 189
 			'FORUM_NAME'	=> $title,
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 		else
204 204
 		{
205 205
 			$sql = 'SELECT link_id, link_uid, link_flags, link_bitfield, link_cat, link_url, link_description, link_guest_email, link_name, link_rss, link_back, link_banner, link_flag, link_cat, link_time
206
-				FROM ' . $this->links_table . '
206
+				FROM ' . $this->links_table.'
207 207
 				WHERE link_id = ' . (int) $link_id;
208 208
 			$result = $this->db->sql_query($sql);
209 209
 
@@ -219,15 +219,15 @@  discard block
 block discarded – undo
219 219
 				'old_banner'	=> $site['link_banner'],
220 220
 			);
221 221
 
222
-			$site_description		= generate_text_for_edit($site['link_description'], $site['link_uid'], $site['link_flags']);
223
-			$site['link_banner'] 	= (preg_match('/^(http:\/\/|https:\/\/|ftp:\/\/|ftps:\/\/|www\.).+/si', $site['link_banner'])) ? $site['link_banner'] : '';
222
+			$site_description = generate_text_for_edit($site['link_description'], $site['link_uid'], $site['link_flags']);
223
+			$site['link_banner'] = (preg_match('/^(http:\/\/|https:\/\/|ftp:\/\/|ftps:\/\/|www\.).+/si', $site['link_banner'])) ? $site['link_banner'] : '';
224 224
 
225
-			$this->url			= $site['link_url'];
226
-			$this->site_name	= $site['link_name'];
225
+			$this->url = $site['link_url'];
226
+			$this->site_name = $site['link_name'];
227 227
 			$this->description	= $site_description['text'];
228 228
 			$this->guest_email	= $site['link_guest_email'];
229
-			$this->rss			= $site['link_rss'];
230
-			$this->banner 		= $site['link_banner'];
229
+			$this->rss = $site['link_rss'];
230
+			$this->banner = $site['link_banner'];
231 231
 			$this->back			= $site['link_back'];
232 232
 			$this->flag 		= $site['link_flag'];
233 233
 		}
@@ -254,7 +254,7 @@  discard block
 block discarded – undo
254 254
 		$cat_id		= $this->request->variable('id', $cat_id);
255 255
 		$submit		= $this->request->is_set_post('submit') ? true : false;
256 256
 		$refresh	= $this->request->is_set_post('refresh_vc') ? true : false;
257
-		$title		= $this->language->lang('DIR_NEW_SITE');
257
+		$title = $this->language->lang('DIR_NEW_SITE');
258 258
 
259 259
 		$this->template->assign_block_vars('dir_navlinks', array(
260 260
 			'FORUM_NAME'	=> $title,
@@ -318,7 +318,7 @@  discard block
 block discarded – undo
318 318
 
319 319
 		// We check if user had already vot for this website.
320 320
 		$sql = 'SELECT vote_link_id
321
-			FROM ' . $this->votes_table . '
321
+			FROM ' . $this->votes_table.'
322 322
 			WHERE ' . $this->db->sql_build_array('SELECT', $data);
323 323
 		$result = $this->db->sql_query($sql);
324 324
 		$data = $this->db->sql_fetchrow($result);
@@ -330,9 +330,9 @@  discard block
 block discarded – undo
330 330
 
331 331
 		$this->link->add_vote($link_id);
332 332
 
333
-		$meta_info = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $cat_id);
333
+		$meta_info = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$cat_id);
334 334
 		meta_refresh(3, $meta_info);
335
-		$message = $this->language->lang('DIR_VOTE_OK') . '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="' . $meta_info . '">', '</a>');
335
+		$message = $this->language->lang('DIR_VOTE_OK').'<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="'.$meta_info.'">', '</a>');
336 336
 		return $this->helper->message($message);
337 337
 	}
338 338
 
@@ -357,18 +357,18 @@  discard block
 block discarded – undo
357 357
 			return $this->helper->message('FORM_INVALID');
358 358
 		}
359 359
 
360
-		$this->url			= $this->request->variable('url', '');
361
-		$this->site_name	= $this->request->variable('site_name', '', true);
360
+		$this->url = $this->request->variable('url', '');
361
+		$this->site_name = $this->request->variable('site_name', '', true);
362 362
 		$this->description	= $this->request->variable('description', '', true);
363 363
 		$this->guest_email	= $this->request->variable('guest_email', '');
364
-		$this->rss			= $this->request->variable('rss', '');
365
-		$this->banner 		= $this->request->variable('banner', '');
364
+		$this->rss = $this->request->variable('rss', '');
365
+		$this->banner = $this->request->variable('banner', '');
366 366
 		$this->back			= $this->request->variable('back', '');
367 367
 		$this->flag 		= $this->request->variable('flag', '');
368 368
 
369 369
 		if (!function_exists('validate_data'))
370 370
 		{
371
-			include($this->root_path . 'includes/functions_user.' . $this->php_ext);
371
+			include($this->root_path.'includes/functions_user.'.$this->php_ext);
372 372
 		}
373 373
 
374 374
 		// We define variables to check
@@ -391,17 +391,17 @@  discard block
 block discarded – undo
391 391
 			'site_name' =>			array(
392 392
 				array('string', false, 1, 100)),
393 393
 			'website'		=>		array(
394
-				array('string',	false, 12, 255),
395
-				array('match',	true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')),
394
+				array('string', false, 12, 255),
395
+				array('match', true, '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')),
396 396
 			'description'	=>		array(
397 397
 				array('string', !$this->categorie->data['cat_must_describe'], 1, $this->config['dir_length_describe'])),
398 398
 			'rss'			=>		array(
399 399
 				array('string', true, 12, 255),
400
-				array('match',	empty($this->rss), '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')),
400
+				array('match', empty($this->rss), '#^http[s]?://(.*?\.)*?[a-z0-9\-]+\.[a-z]{2,4}#i')),
401 401
 			'banner'		=>		array(
402 402
 				array('string', true, 5, 255)),
403 403
 			'back'			=>		array(
404
-				array('string',	!$this->categorie->data['cat_link_back'], 12, 255),
404
+				array('string', !$this->categorie->data['cat_link_back'], 12, 255),
405 405
 				array(array($this->link, 'link_back'), true)),
406 406
 			'cat'			=>		array(
407 407
 				array('num', '', 1))
@@ -450,8 +450,8 @@  discard block
 block discarded – undo
450 450
 		// Still no errors?? So let's go!
451 451
 		if (!$error)
452 452
 		{
453
-			$this->banner	= (!$this->banner && !$this->request->is_set_post('delete_banner')) ? $this->request->variable('old_banner', '') : $this->banner;
454
-			$this->url		= $this->link->clean_url($this->url);
453
+			$this->banner = (!$this->banner && !$this->request->is_set_post('delete_banner')) ? $this->request->variable('old_banner', '') : $this->banner;
454
+			$this->url = $this->link->clean_url($this->url);
455 455
 
456 456
 			$data_edit = array(
457 457
 				'link_user_id'		=> $this->link_user_id,
@@ -497,10 +497,10 @@  discard block
 block discarded – undo
497 497
 				$this->link->add($data_add, $need_approval);
498 498
 			}
499 499
 
500
-			$meta_info = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $cat_id);
500
+			$meta_info = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$cat_id);
501 501
 			meta_refresh(3, $meta_info);
502 502
 			$message	= ($need_approval) ? $this->language->lang('DIR_'.strtoupper($mode).'_SITE_ACTIVE') : $this->language->lang('DIR_'.strtoupper($mode).'_SITE_OK');
503
-			$message	= $message . '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_DIR', '<a href="' . $this->helper->route('ernadoo_phpbbdirectory_base_controller') . '">', '</a>') . '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="' . $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $cat_id) . '">', '</a>');
503
+			$message	= $message.'<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_DIR', '<a href="'.$this->helper->route('ernadoo_phpbbdirectory_base_controller').'">', '</a>').'<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="'.$this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$cat_id).'">', '</a>');
504 504
 			return $this->helper->message($message);
505 505
 		}
506 506
 		else
@@ -529,7 +529,7 @@  discard block
 block discarded – undo
529 529
 	{
530 530
 		if (!function_exists('file_gc'))
531 531
 		{
532
-			include($this->root_path . 'includes/functions_download.' . $this->php_ext);
532
+			include($this->root_path.'includes/functions_download.'.$this->php_ext);
533 533
 		}
534 534
 
535 535
 		$file_path = $this->get_banner_path($banner_img);
@@ -584,7 +584,7 @@  discard block
 block discarded – undo
584 584
 
585 585
 		if (!function_exists('display_custom_bbcodes'))
586 586
 		{
587
-			include($this->root_path . 'includes/functions_display.' . $this->php_ext);
587
+			include($this->root_path.'includes/functions_display.'.$this->php_ext);
588 588
 		}
589 589
 		display_custom_bbcodes();
590 590
 		add_form_key('dir_form');
@@ -593,17 +593,17 @@  discard block
 block discarded – undo
593 593
 		$flag_path = $ext_path.'images/flags/';
594 594
 
595 595
 		$s_guest	= (!$this->user->data['is_registered'] || !empty($this->guest_email));
596
-		$s_rss		= $this->config['dir_activ_rss'];
597
-		$s_banner	= $this->config['dir_activ_banner'];
596
+		$s_rss = $this->config['dir_activ_rss'];
597
+		$s_banner = $this->config['dir_activ_banner'];
598 598
 		$s_back		= $this->categorie->data['cat_link_back'];
599 599
 		$s_flag		= $this->config['dir_activ_flag'];
600 600
 
601 601
 		$this->template->assign_vars(array(
602
-			'BBCODE_STATUS'			=> ($this->config['allow_bbcode']) 	? $this->language->lang('BBCODE_IS_ON', '<a href="' . append_sid($this->root_path."faq.$this->php_ext", 'mode=bbcode') . '">', '</a>') : $this->language->lang('BBCODE_IS_OFF', '<a href="' . append_sid($this->root_path."faq.$this->php_ext", 'mode=bbcode') . '">', '</a>'),
603
-			'IMG_STATUS'			=> ($this->config['allow_bbcode'])	? $this->language->lang('IMAGES_ARE_ON') : $this->language->lang('IMAGES_ARE_OFF'),
602
+			'BBCODE_STATUS'			=> ($this->config['allow_bbcode']) ? $this->language->lang('BBCODE_IS_ON', '<a href="'.append_sid($this->root_path."faq.$this->php_ext", 'mode=bbcode').'">', '</a>') : $this->language->lang('BBCODE_IS_OFF', '<a href="'.append_sid($this->root_path."faq.$this->php_ext", 'mode=bbcode').'">', '</a>'),
603
+			'IMG_STATUS'			=> ($this->config['allow_bbcode']) ? $this->language->lang('IMAGES_ARE_ON') : $this->language->lang('IMAGES_ARE_OFF'),
604 604
 			'SMILIES_STATUS'		=> ($this->config['allow_smilies']) ? $this->language->lang('SMILIES_ARE_ON') : $this->language->lang('SMILIES_ARE_OFF'),
605 605
 			'URL_STATUS'			=> ($this->config['allow_post_links']) ? $this->language->lang('URL_IS_ON') : $this->language->lang('URL_IS_OFF'),
606
-			'FLASH_STATUS'			=> ($this->config['allow_bbcode'] && $this->config['allow_post_flash'])	? $this->language->lang('FLASH_IS_ON') : $this->language->lang('FLASH_IS_OFF'),
606
+			'FLASH_STATUS'			=> ($this->config['allow_bbcode'] && $this->config['allow_post_flash']) ? $this->language->lang('FLASH_IS_ON') : $this->language->lang('FLASH_IS_OFF'),
607 607
 
608 608
 			'L_TITLE'				=> $title,
609 609
 			'L_DIR_DESCRIPTION_EXP'	=> $this->language->lang('DIR_DESCRIPTION_EXP', $this->config['dir_length_describe']),
Please login to merge, or discard this patch.
core/categorie.php 1 patch
Spacing   +33 added lines, -33 removed lines patch added patch discarded remove patch
@@ -60,13 +60,13 @@  discard block
 block discarded – undo
60 60
 	*/
61 61
 	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\cron\manager $cron)
62 62
 	{
63
-		$this->db			= $db;
64
-		$this->config		= $config;
63
+		$this->db = $db;
64
+		$this->config = $config;
65 65
 		$this->language		= $language;
66 66
 		$this->template		= $template;
67 67
 		$this->user			= $user;
68
-		$this->helper		= $helper;
69
-		$this->request		= $request;
68
+		$this->helper = $helper;
69
+		$this->request = $request;
70 70
 		$this->auth			= $auth;
71 71
 		$this->cron 		= $cron;
72 72
 	}
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 	public function make_cat_jumpbox()
91 91
 	{
92 92
 		$sql = 'SELECT cat_id, cat_name, parent_id, left_id, right_id
93
-			FROM ' . $this->categories_table . '
93
+			FROM ' . $this->categories_table.'
94 94
 			ORDER BY left_id ASC';
95 95
 		$result = $this->db->sql_query($sql, 600);
96 96
 
@@ -119,7 +119,7 @@  discard block
 block discarded – undo
119 119
 				'FORUM_ID'		=> $row['cat_id'],
120 120
 				'FORUM_NAME'	=> $row['cat_name'],
121 121
 				'S_FORUM_COUNT'	=> $iteration,
122
-				'LINK'			=> $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $row['cat_id']),
122
+				'LINK'			=> $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$row['cat_id']),
123 123
 			));
124 124
 
125 125
 			for ($i = 0; $i < $padding; $i++)
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
 
152 152
 		// This query is identical to the jumpbox one
153 153
 		$sql = 'SELECT cat_id, cat_name, parent_id, left_id, right_id
154
-			FROM ' . $this->categories_table . '
154
+			FROM ' . $this->categories_table.'
155 155
 			ORDER BY left_id ASC';
156 156
 		$result = $this->db->sql_query($sql, 600);
157 157
 
@@ -181,7 +181,7 @@  discard block
 block discarded – undo
181 181
 			}
182 182
 
183 183
 			$selected = (($row['cat_id'] == $select_id) ? ' selected="selected"' : '');
184
-			$cat_list .= '<option value="' . $row['cat_id'] . '"' . (($disabled) ? ' disabled="disabled" class="disabled-option"' : $selected) . '>' . $padding . $row['cat_name'] . '</option>';
184
+			$cat_list .= '<option value="'.$row['cat_id'].'"'.(($disabled) ? ' disabled="disabled" class="disabled-option"' : $selected).'>'.$padding.$row['cat_name'].'</option>';
185 185
 		}
186 186
 		$this->db->sql_freeresult($result);
187 187
 		unset($padding_store);
@@ -196,7 +196,7 @@  discard block
 block discarded – undo
196 196
 	*/
197 197
 	public function display()
198 198
 	{
199
-		$cat_rows	= $subcats = array();
199
+		$cat_rows = $subcats = array();
200 200
 		$parent_id	= $visible_cats = 0;
201 201
 
202 202
 		$sql_array = array(
@@ -214,7 +214,7 @@  discard block
 block discarded – undo
214 214
 		else
215 215
 		{
216 216
 			$root_data = $this->data;
217
-			$sql_where = 'left_id > ' . $root_data['left_id'] . ' AND left_id < ' . $root_data['right_id'];
217
+			$sql_where = 'left_id > '.$root_data['left_id'].' AND left_id < '.$root_data['right_id'];
218 218
 		}
219 219
 
220 220
 		$sql = $this->db->sql_build_query('SELECT', array(
@@ -261,12 +261,12 @@  discard block
 block discarded – undo
261 261
 			{
262 262
 				foreach ($subcats[$dir_cat_id] as $subcat_id => $subcat_row)
263 263
 				{
264
-					$row['cat_links'] = ($row['cat_count_all']) ? ($row['cat_links']+$subcat_row['links']) : $row['cat_links'];
264
+					$row['cat_links'] = ($row['cat_count_all']) ? ($row['cat_links'] + $subcat_row['links']) : $row['cat_links'];
265 265
 
266 266
 					if ($subcat_row['display'] && $subcat_row['parent_id'] == $dir_cat_id)
267 267
 					{
268 268
 						$subcats_list[] = array(
269
-							'link'		=> $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $subcat_id),
269
+							'link'		=> $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$subcat_id),
270 270
 							'name'		=> $subcat_row['name'],
271 271
 							'links'		=> $subcat_row['links']
272 272
 						);
@@ -284,7 +284,7 @@  discard block
 block discarded – undo
284 284
 				'CAT_LINKS'				=> $row['cat_links'],
285 285
 				'CAT_IMG'				=> $this->get_img_path('icons', $row['cat_icon']),
286 286
 
287
-				'U_CAT'					=> $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $row['cat_id']),
287
+				'U_CAT'					=> $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$row['cat_id']),
288 288
 			));
289 289
 
290 290
 			// Assign subcats loop for style authors
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
 			if ($task->is_ready())
317 317
 			{
318 318
 				$url = $task->get_url();
319
-				$this->template->assign_var('RUN_CRON_TASK', '<img src="' . $url . '" width="1" height="1" alt="" />');
319
+				$this->template->assign_var('RUN_CRON_TASK', '<img src="'.$url.'" width="1" height="1" alt="" />');
320 320
 			}
321 321
 		}
322 322
 	}
@@ -338,10 +338,10 @@  discard block
 block discarded – undo
338 338
 				'LEFT_JOIN'	=> array(
339 339
 						array(
340 340
 							'FROM'	=> array($this->watch_table	=> 'w'),
341
-							'ON'	=> 'c.cat_id = w.cat_id AND w.user_id = ' . (int) $this->user->data['user_id']
341
+							'ON'	=> 'c.cat_id = w.cat_id AND w.user_id = '.(int) $this->user->data['user_id']
342 342
 						),
343 343
 				),
344
-				'WHERE'		=> 'c.cat_id = ' . (int) $cat_id
344
+				'WHERE'		=> 'c.cat_id = '.(int) $cat_id
345 345
 			);
346 346
 			$sql = $this->db->sql_build_query('SELECT', $sql_array);
347 347
 			$result = $this->db->sql_query($sql);
@@ -378,8 +378,8 @@  discard block
 block discarded – undo
378 378
 				$this->template->assign_block_vars('dir_navlinks', array(
379 379
 					'FORUM_NAME'	=> $parent_data['cat_name'],
380 380
 					'FORUM_ID'		=> $parent_cat_id,
381
-					'MICRODATA'		=> $microdata_attr . '="' . $parent_cat_id . '"',
382
-					'U_VIEW_FORUM'	=> $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $parent_cat_id),
381
+					'MICRODATA'		=> $microdata_attr.'="'.$parent_cat_id.'"',
382
+					'U_VIEW_FORUM'	=> $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$parent_cat_id),
383 383
 				));
384 384
 			}
385 385
 		}
@@ -387,8 +387,8 @@  discard block
 block discarded – undo
387 387
 		$this->template->assign_block_vars('dir_navlinks', array(
388 388
 			'FORUM_NAME'	=> $dir_cat_data['cat_name'],
389 389
 			'FORUM_ID'		=> $dir_cat_data['cat_id'],
390
-			'MICRODATA'		=> $microdata_attr . '="' . $dir_cat_data['cat_id'] . '"',
391
-			'U_VIEW_FORUM'	=> $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $dir_cat_data['cat_id']),
390
+			'MICRODATA'		=> $microdata_attr.'="'.$dir_cat_data['cat_id'].'"',
391
+			'U_VIEW_FORUM'	=> $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$dir_cat_data['cat_id']),
392 392
 		));
393 393
 
394 394
 		return;
@@ -444,17 +444,17 @@  discard block
 block discarded – undo
444 444
 			{
445 445
 				if ($mode == 'unwatch')
446 446
 				{
447
-					$sql = 'DELETE FROM ' . $this->watch_table . "
447
+					$sql = 'DELETE FROM '.$this->watch_table."
448 448
 						WHERE cat_id = $cat_id
449 449
 							AND user_id = $user_id";
450 450
 					$this->db->sql_query($sql);
451 451
 
452
-					$redirect_url = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $cat_id);
452
+					$redirect_url = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$cat_id);
453 453
 					$message = $this->language->lang('DIR_NOT_WATCHING_CAT');
454 454
 
455 455
 					if (!$this->request->is_ajax())
456 456
 					{
457
-						$message .= '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="' . $redirect_url . '">', '</a>');
457
+						$message .= '<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="'.$redirect_url.'">', '</a>');
458 458
 					}
459 459
 
460 460
 					meta_refresh(3, $redirect_url);
@@ -466,8 +466,8 @@  discard block
 block discarded – undo
466 466
 
467 467
 					if ($notify_status != NOTIFY_YES)
468 468
 					{
469
-						$sql = 'UPDATE ' . $this->watch_table . '
470
-							SET notify_status = ' . NOTIFY_YES . "
469
+						$sql = 'UPDATE '.$this->watch_table.'
470
+							SET notify_status = ' . NOTIFY_YES."
471 471
 							WHERE cat_id = $cat_id
472 472
 								AND user_id = $user_id";
473 473
 						$this->db->sql_query($sql);
@@ -478,16 +478,16 @@  discard block
 block discarded – undo
478 478
 			{
479 479
 				if ($mode == 'watch')
480 480
 				{
481
-					$sql = 'INSERT INTO ' . $this->watch_table . " (user_id, cat_id, notify_status)
482
-						VALUES ($user_id, $cat_id, " . NOTIFY_YES . ')';
481
+					$sql = 'INSERT INTO '.$this->watch_table." (user_id, cat_id, notify_status)
482
+						VALUES ($user_id, $cat_id, ".NOTIFY_YES.')';
483 483
 					$this->db->sql_query($sql);
484 484
 
485
-					$redirect_url = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_' . $cat_id);
485
+					$redirect_url = $this->helper->route('ernadoo_phpbbdirectory_dynamic_route_'.$cat_id);
486 486
 					$message = $this->language->lang('DIR_ARE_WATCHING_CAT');
487 487
 
488 488
 					if (!$this->request->is_ajax())
489 489
 					{
490
-						$message .= '<br /><br />' . $this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="' . $redirect_url . '">', '</a>');
490
+						$message .= '<br /><br />'.$this->language->lang('DIR_CLICK_RETURN_CAT', '<a href="'.$redirect_url.'">', '</a>');
491 491
 					}
492 492
 
493 493
 					meta_refresh(3, $redirect_url);
@@ -507,10 +507,10 @@  discard block
 block discarded – undo
507 507
 
508 508
 		if ($can_watch)
509 509
 		{
510
-			$s_watching['link'] 		= $this->helper->route('ernadoo_phpbbdirectory_suscribe_controller', array('cat_id' => $cat_id, 'mode' => (($is_watching) ? 'unwatch' : 'watch')));
510
+			$s_watching['link'] = $this->helper->route('ernadoo_phpbbdirectory_suscribe_controller', array('cat_id' => $cat_id, 'mode' => (($is_watching) ? 'unwatch' : 'watch')));
511 511
 			$s_watching['link_toggle'] 	= $this->helper->route('ernadoo_phpbbdirectory_suscribe_controller', array('cat_id' => $cat_id, 'mode' => ((!$is_watching) ? 'unwatch' : 'watch')));
512
-			$s_watching['title'] 		= $this->language->lang((($is_watching) ? 'DIR_STOP' : 'DIR_START') . '_WATCHING_CAT');
513
-			$s_watching['title_toggle'] = $this->language->lang(((!$is_watching) ? 'DIR_STOP' : 'DIR_START') . '_WATCHING_CAT');
512
+			$s_watching['title'] = $this->language->lang((($is_watching) ? 'DIR_STOP' : 'DIR_START').'_WATCHING_CAT');
513
+			$s_watching['title_toggle'] = $this->language->lang(((!$is_watching) ? 'DIR_STOP' : 'DIR_START').'_WATCHING_CAT');
514 514
 			$s_watching['is_watching'] 	= $is_watching;
515 515
 		}
516 516
 
@@ -530,7 +530,7 @@  discard block
 block discarded – undo
530 530
 		$categories_table = $phpbb_container->getParameter('tables.dir.categories');
531 531
 
532 532
 		$sql = 'SELECT cat_name
533
-			FROM ' . $categories_table . '
533
+			FROM ' . $categories_table.'
534 534
 			WHERE cat_id = ' . (int) $cat_id;
535 535
 		$result = $db->sql_query($sql);
536 536
 		$row = $db->sql_fetchrow($result);
Please login to merge, or discard this patch.
migrations/v20x/add_cat_route_field.php 2 patches
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -28,7 +28,7 @@  discard block
 block discarded – undo
28 28
 	{
29 29
 		return array(
30 30
 			'add_columns'	=> array(
31
-				$this->table_prefix . 'directory_cats' => array(
31
+				$this->table_prefix.'directory_cats' => array(
32 32
 					'cat_route'	=> array('VCHAR', '', 'after' => 'cat_name'),
33 33
 				)
34 34
 			),
@@ -52,7 +52,7 @@  discard block
 block discarded – undo
52 52
 	{
53 53
 		return array(
54 54
 			'drop_columns'	=> array(
55
-				$this->table_prefix . 'directory_cats' => array(
55
+				$this->table_prefix.'directory_cats' => array(
56 56
 					'cat_route',
57 57
 				),
58 58
 			),
@@ -63,13 +63,13 @@  discard block
 block discarded – undo
63 63
 	{
64 64
 		$slug = new \E1379\SpeakingUrl\SpeakingUrl();
65 65
 
66
-		$sql = 'SELECT cat_id, cat_name FROM ' . $this->table_prefix . 'directory_cats';
66
+		$sql = 'SELECT cat_id, cat_name FROM '.$this->table_prefix.'directory_cats';
67 67
 		$result = $this->db->sql_query($sql);
68 68
 
69 69
 		while ($row = $this->db->sql_fetchrow($result))
70 70
 		{
71
-			$sql = 'UPDATE ' . $this->table_prefix . 'directory_cats' . '
72
-				SET cat_route = "' . (string) $slug->getSlug($row['cat_name'], array('lang' => $this->config['default_lang'], 'symbols' => true)). '"
71
+			$sql = 'UPDATE '.$this->table_prefix.'directory_cats'.'
72
+				SET cat_route = "' . (string) $slug->getSlug($row['cat_name'], array('lang' => $this->config['default_lang'], 'symbols' => true)).'"
73 73
 				WHERE cat_id = ' . (int) $row['cat_id'];
74 74
 			$this->db->sql_query($sql);
75 75
 		}
Please login to merge, or discard this patch.
Indentation   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -20,8 +20,8 @@  discard block
 block discarded – undo
20 20
 	}
21 21
 
22 22
 	/**
23
-	* @inheritDoc
24
-	*/
23
+	 * @inheritDoc
24
+	 */
25 25
 	public function update_schema()
26 26
 	{
27 27
 		return array(
@@ -34,8 +34,8 @@  discard block
 block discarded – undo
34 34
 	}
35 35
 
36 36
 	/**
37
-	* @inheritDoc
38
-	*/
37
+	 * @inheritDoc
38
+	 */
39 39
 	public function update_data()
40 40
 	{
41 41
 		return array(
@@ -44,8 +44,8 @@  discard block
 block discarded – undo
44 44
 	}
45 45
 
46 46
 	/**
47
-	* @inheritDoc
48
-	*/
47
+	 * @inheritDoc
48
+	 */
49 49
 	public function revert_schema()
50 50
 	{
51 51
 		return array(
Please login to merge, or discard this patch.
ext.php 2 patches
Indentation   +30 added lines, -30 removed lines patch added patch discarded remove patch
@@ -17,11 +17,11 @@  discard block
 block discarded – undo
17 17
 class ext extends \phpbb\extension\base
18 18
 {
19 19
 	/**
20
-	* Enable extension if requirements are met
21
-	*
22
-	* @return bool
23
-	* @aceess public
24
-	*/
20
+	 * Enable extension if requirements are met
21
+	 *
22
+	 * @return bool
23
+	 * @aceess public
24
+	 */
25 25
 	public function is_enableable()
26 26
 	{
27 27
 		$php_ini = $this->container->get('php_ini');
@@ -42,11 +42,11 @@  discard block
 block discarded – undo
42 42
 	}
43 43
 
44 44
 	/**
45
-	* Single enable step that installs any included migrations
46
-	*
47
-	* @param mixed $old_state State returned by previous call of this method
48
-	* @return mixed Returns false after last step, otherwise temporary state
49
-	*/
45
+	 * Single enable step that installs any included migrations
46
+	 *
47
+	 * @param mixed $old_state State returned by previous call of this method
48
+	 * @return mixed Returns false after last step, otherwise temporary state
49
+	 */
50 50
 	public function enable_step($old_state)
51 51
 	{
52 52
 		switch ($old_state)
@@ -80,11 +80,11 @@  discard block
 block discarded – undo
80 80
 	}
81 81
 
82 82
 	/**
83
-	* Single disable step that does nothing
84
-	*
85
-	* @param mixed $old_state State returned by previous call of this method
86
-	* @return mixed Returns false after last step, otherwise temporary state
87
-	*/
83
+	 * Single disable step that does nothing
84
+	 *
85
+	 * @param mixed $old_state State returned by previous call of this method
86
+	 * @return mixed Returns false after last step, otherwise temporary state
87
+	 */
88 88
 	public function disable_step($old_state)
89 89
 	{
90 90
 		switch ($old_state)
@@ -112,11 +112,11 @@  discard block
 block discarded – undo
112 112
 	}
113 113
 
114 114
 	/**
115
-	* Single purge step that reverts any included and installed migrations
116
-	*
117
-	* @param mixed $old_state State returned by previous call of this method
118
-	* @return mixed Returns false after last step, otherwise temporary state
119
-	*/
115
+	 * Single purge step that reverts any included and installed migrations
116
+	 *
117
+	 * @param mixed $old_state State returned by previous call of this method
118
+	 * @return mixed Returns false after last step, otherwise temporary state
119
+	 */
120 120
 	public function purge_step($old_state)
121 121
 	{
122 122
 		switch ($old_state)
@@ -144,16 +144,16 @@  discard block
 block discarded – undo
144 144
 	}
145 145
 
146 146
 	/**
147
-	* Notification handler to call notification enable/disable/purge steps
148
-	*
149
-	* @author VSEphpbb (Matt Friedman)
150
-	* @copyright (c) 2014 phpBB Limited <https://www.phpbb.com>
151
-	* @license GNU General Public License, version 2 (GPL-2.0)
152
-	* @param string $step The step (enable, disable, purge)
153
-	* @param array $notification_types The notification type names
154
-	* @return string Return notifications as temporary state
155
-	* @access protected
156
-	*/
147
+	 * Notification handler to call notification enable/disable/purge steps
148
+	 *
149
+	 * @author VSEphpbb (Matt Friedman)
150
+	 * @copyright (c) 2014 phpBB Limited <https://www.phpbb.com>
151
+	 * @license GNU General Public License, version 2 (GPL-2.0)
152
+	 * @param string $step The step (enable, disable, purge)
153
+	 * @param array $notification_types The notification type names
154
+	 * @return string Return notifications as temporary state
155
+	 * @access protected
156
+	 */
157 157
 	protected function notification_handler($step, $notification_types)
158 158
 	{
159 159
 		$phpbb_notifications = $this->container->get('notification_manager');
Please login to merge, or discard this patch.
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -32,7 +32,7 @@  discard block
 block discarded – undo
32 32
 			return false;
33 33
 		}
34 34
 
35
-		if (!file_exists($this->extension_path. 'vendor/autoload.php'))
35
+		if (!file_exists($this->extension_path.'vendor/autoload.php'))
36 36
 		{
37 37
 			return false;
38 38
 		}
@@ -69,7 +69,7 @@  discard block
 block discarded – undo
69 69
 				if (!class_exists('\E1379\SpeakingUrl\SpeakingUrl'))
70 70
 				{
71 71
 					// When migration is executed, phpBB doesn't know yet extension dependencies, so we need to manually include autoload file
72
-					require($this->extension_path. 'vendor/autoload.php');
72
+					require($this->extension_path.'vendor/autoload.php');
73 73
 				}
74 74
 
75 75
 				// Run parent enable step method
@@ -160,7 +160,7 @@  discard block
 block discarded – undo
160 160
 
161 161
 		foreach ($notification_types as $notification_type)
162 162
 		{
163
-			call_user_func(array($phpbb_notifications, $step . '_notifications'), $notification_type);
163
+			call_user_func(array($phpbb_notifications, $step.'_notifications'), $notification_type);
164 164
 		}
165 165
 
166 166
 		return 'notifications';
Please login to merge, or discard this patch.
controller/acp/settings.php 1 patch
Spacing   +36 added lines, -36 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
 	}
@@ -95,7 +95,7 @@  discard block
 block discarded – undo
95 95
 			}
96 96
 			else if ($vars['explain'])
97 97
 			{
98
-				$l_explain = $this->language->lang($vars['lang'] . '_EXPLAIN');
98
+				$l_explain = $this->language->lang($vars['lang'].'_EXPLAIN');
99 99
 			}
100 100
 
101 101
 			$this->template->assign_block_vars('options', array(
@@ -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;
@@ -158,12 +158,12 @@  discard block
 block discarded – undo
158 158
 		{
159 159
 			$this->log->add('admin', $this->user->data['user_id'], $this->user->ip, 'DIR_CONFIG_SETTINGS');
160 160
 
161
-			trigger_error($this->language->lang('CONFIG_UPDATED') . adm_back_link($this->u_action));
161
+			trigger_error($this->language->lang('CONFIG_UPDATED').adm_back_link($this->u_action));
162 162
 		}
163 163
 
164 164
 		$this->template->assign_vars(array(
165 165
 			'L_TITLE'			=> $this->language->lang($this->display_vars['title']),
166
-			'L_TITLE_EXPLAIN'	=> $this->language->lang($this->display_vars['title'] . '_EXPLAIN'),
166
+			'L_TITLE_EXPLAIN'	=> $this->language->lang($this->display_vars['title'].'_EXPLAIN'),
167 167
 
168 168
 			'S_ERROR'			=> (sizeof($error)) ? true : false,
169 169
 			'ERROR_MSG'			=> implode('<br />', $error),
@@ -199,44 +199,44 @@  discard block
 block discarded – undo
199 199
 				'dir_banner_width'					=> '',
200 200
 				'dir_banner_height'					=> '',
201 201
 
202
-				'dir_mail'							=> array('lang' => 'DIR_MAIL_VALIDATION',	'validate' => 'bool',		'type' => 'radio:yes_no',	'explain' => false),
203
-				'dir_activ_checkurl'				=> array('lang' => 'DIR_ACTIVE_CHECK',		'validate' => 'bool',		'type' => 'radio:yes_no',	'explain' => true),
204
-				'dir_activ_flag'					=> array('lang' => 'DIR_ACTIV_FLAG',		'validate' => 'bool',		'type' => 'radio:yes_no',	'explain' => false),
205
-				'dir_activ_rss'						=> array('lang' => 'DIR_ACTIV_RSS',			'validate' => 'bool',		'type' => 'radio:yes_no',	'explain' => true),
206
-				'dir_show'							=> array('lang' => 'DIR_SHOW',				'validate' => 'int:1:9999', 'type' => 'number:1:9999',	'explain' => false),
207
-				'dir_length_describe'				=> array('lang' => 'DIR_MAX_DESC',			'validate' => 'int:1:999',	'type' => 'number:1:999',	'explain' => false),
208
-				'dir_new_time'						=> array('lang' => 'DIR_NEW_TIME',			'validate' => 'int:1:999', 	'type' => 'number:1:999',	'explain' => true),
209
-				'dir_default_order'					=> array('lang' => 'DIR_DEFAULT_ORDER',		'validate' => 'string', 	'type' => 'select',			'explain' => false, 'method' => 'get_order_list', 'params' => array('{CONFIG_VALUE}')),
202
+				'dir_mail'							=> array('lang' => 'DIR_MAIL_VALIDATION', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
203
+				'dir_activ_checkurl'				=> array('lang' => 'DIR_ACTIVE_CHECK', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
204
+				'dir_activ_flag'					=> array('lang' => 'DIR_ACTIV_FLAG', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
205
+				'dir_activ_rss'						=> array('lang' => 'DIR_ACTIV_RSS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
206
+				'dir_show'							=> array('lang' => 'DIR_SHOW', 'validate' => 'int:1:9999', 'type' => 'number:1:9999', 'explain' => false),
207
+				'dir_length_describe'				=> array('lang' => 'DIR_MAX_DESC', 'validate' => 'int:1:999', 'type' => 'number:1:999', 'explain' => false),
208
+				'dir_new_time'						=> array('lang' => 'DIR_NEW_TIME', 'validate' => 'int:1:999', 'type' => 'number:1:999', 'explain' => true),
209
+				'dir_default_order'					=> array('lang' => 'DIR_DEFAULT_ORDER', 'validate' => 'string', 'type' => 'select', 'explain' => false, 'method' => 'get_order_list', 'params' => array('{CONFIG_VALUE}')),
210 210
 
211 211
 				'legend2'							=> 'DIR_RECENT_GUEST',
212
-				'dir_recent_block'					=> array('lang' => 'DIR_RECENT_ENABLE',		'validate' => 'bool',		'type' => 'radio:yes_no',	'explain' => true),
213
-				'dir_recent_rows'					=> array('lang' => 'DIR_RECENT_ROWS',		'validate' => 'int:1:999',	'type' => 'number:1:999',	'explain' => false),
214
-				'dir_recent_columns'				=> array('lang' => 'DIR_RECENT_COLUMNS',	'validate' => 'int:1:999',	'type' => 'number:1:999',	'explain' => false),
215
-				'dir_recent_exclude'				=> array('lang' => 'DIR_RECENT_EXCLUDE',	'validate' => 'string',		'type' => 'text:6:99',		'explain' => true),
212
+				'dir_recent_block'					=> array('lang' => 'DIR_RECENT_ENABLE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
213
+				'dir_recent_rows'					=> array('lang' => 'DIR_RECENT_ROWS', 'validate' => 'int:1:999', 'type' => 'number:1:999', 'explain' => false),
214
+				'dir_recent_columns'				=> array('lang' => 'DIR_RECENT_COLUMNS', 'validate' => 'int:1:999', 'type' => 'number:1:999', 'explain' => false),
215
+				'dir_recent_exclude'				=> array('lang' => 'DIR_RECENT_EXCLUDE', 'validate' => 'string', 'type' => 'text:6:99', 'explain' => true),
216 216
 
217 217
 				'legend3'							=> 'DIR_ADD_GUEST',
218
-				'dir_visual_confirm'				=> array('lang' => 'DIR_VISUAL_CONFIRM',	'validate' => 'bool',		'type' => 'radio:yes_no',	'explain' => true),
219
-				'dir_visual_confirm_max_attempts'	=> array('lang' => 'DIR_MAX_ADD_ATTEMPTS',	'validate' => 'int:0:9999',	'type' => 'number:0:9999',	'explain' => true),
218
+				'dir_visual_confirm'				=> array('lang' => 'DIR_VISUAL_CONFIRM', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
219
+				'dir_visual_confirm_max_attempts'	=> array('lang' => 'DIR_MAX_ADD_ATTEMPTS', 'validate' => 'int:0:9999', 'type' => 'number:0:9999', 'explain' => true),
220 220
 
221 221
 				'legend4'							=> 'DIR_THUMB_PARAM',
222
-				'dir_activ_thumb'					=> array('lang' => 'DIR_ACTIVE_THUMB',			'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => false),
223
-				'dir_activ_thumb_remote'			=> array('lang' => 'DIR_ACTIVE_THUMB_REMOTE',	'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => true),
224
-				'dir_thumb_service'					=> array('lang' => 'DIR_THUMB_SERVICE',			'validate' => 'string', 'type' => 'select',			'explain' => true, 'method' => 'get_thumb_service_list', 'params' => array('{CONFIG_VALUE}')),
225
-				'dir_thumb_service_reverse'			=> array('lang' => 'DIR_THUMB_SERVICE_REVERSE',	'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => true),
222
+				'dir_activ_thumb'					=> array('lang' => 'DIR_ACTIVE_THUMB', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
223
+				'dir_activ_thumb_remote'			=> array('lang' => 'DIR_ACTIVE_THUMB_REMOTE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
224
+				'dir_thumb_service'					=> array('lang' => 'DIR_THUMB_SERVICE', 'validate' => 'string', 'type' => 'select', 'explain' => true, 'method' => 'get_thumb_service_list', 'params' => array('{CONFIG_VALUE}')),
225
+				'dir_thumb_service_reverse'			=> array('lang' => 'DIR_THUMB_SERVICE_REVERSE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
226 226
 
227 227
 				'legend5'							=> 'DIR_COMM_PARAM',
228
-				'dir_allow_bbcode'					=> array('lang' => 'DIR_ALLOW_BBCODE',		'validate' => 'bool',		'type' => 'radio:yes_no',	'explain' => false),
229
-				'dir_allow_flash'					=> array('lang' => 'DIR_ALLOW_FLASH',		'validate' => 'bool',		'type' => 'radio:yes_no',	'explain' => false),
230
-				'dir_allow_links'					=> array('lang' => 'DIR_ALLOW_LINKS',		'validate' => 'bool',		'type' => 'radio:yes_no',	'explain' => false),
231
-				'dir_allow_smilies'					=> array('lang' => 'DIR_ALLOW_SMILIES',		'validate' => 'bool',		'type' => 'radio:yes_no',	'explain' => false),
232
-				'dir_length_comments'				=> array('lang' => 'DIR_LENGTH_COMMENTS',	'validate' => 'int:1:999',	'type' => 'number:1:999',	'explain' => true),
233
-				'dir_comments_per_page'				=> array('lang' => 'DIR_COMM_PER_PAGE',		'validate' => 'int:1:9999',	'type' => 'number:1:9999',	'explain' => false),
228
+				'dir_allow_bbcode'					=> array('lang' => 'DIR_ALLOW_BBCODE', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
229
+				'dir_allow_flash'					=> array('lang' => 'DIR_ALLOW_FLASH', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
230
+				'dir_allow_links'					=> array('lang' => 'DIR_ALLOW_LINKS', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
231
+				'dir_allow_smilies'					=> array('lang' => 'DIR_ALLOW_SMILIES', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
232
+				'dir_length_comments'				=> array('lang' => 'DIR_LENGTH_COMMENTS', 'validate' => 'int:1:999', 'type' => 'number:1:999', 'explain' => true),
233
+				'dir_comments_per_page'				=> array('lang' => 'DIR_COMM_PER_PAGE', 'validate' => 'int:1:9999', 'type' => 'number:1:9999', 'explain' => false),
234 234
 
235 235
 				'legend6'							=> 'DIR_BANN_PARAM',
236
-				'dir_activ_banner'					=> array('lang' => 'DIR_ACTIV_BANNER',		'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => false),
237
-				'dir_banner'						=> array('lang' => 'DIR_MAX_BANN',			'validate' => 'int:0',	'type' => 'dimension:0',	'explain' => true, 'append' => ' ' . $this->user->lang['PIXEL']),
238
-				'dir_banner_filesize'				=> array('lang' => 'DIR_MAX_SIZE',			'validate' => 'string',	'type' => 'custom', 'method' => 'max_filesize', 'explain' => true),
239
-				'dir_storage_banner'				=> array('lang' => 'DIR_STORAGE_BANNER',	'validate' => 'bool',	'type' => 'radio:yes_no',	'explain' => true),
236
+				'dir_activ_banner'					=> array('lang' => 'DIR_ACTIV_BANNER', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => false),
237
+				'dir_banner'						=> array('lang' => 'DIR_MAX_BANN', 'validate' => 'int:0', 'type' => 'dimension:0', 'explain' => true, 'append' => ' '.$this->user->lang['PIXEL']),
238
+				'dir_banner_filesize'				=> array('lang' => 'DIR_MAX_SIZE', 'validate' => 'string', 'type' => 'custom', 'method' => 'max_filesize', 'explain' => true),
239
+				'dir_storage_banner'				=> array('lang' => 'DIR_STORAGE_BANNER', 'validate' => 'bool', 'type' => 'radio:yes_no', 'explain' => true),
240 240
 			)
241 241
 		);
242 242
 	}
Please login to merge, or discard this patch.
migrations/v20x/remove_pagerank_conf.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 	{
38 38
 		return array(
39 39
 			'drop_columns' => array(
40
-				$this->table_prefix . 'directory_links'	=> array(
40
+				$this->table_prefix.'directory_links'	=> array(
41 41
 					'link_pagerank',
42 42
 				),
43 43
 			),
@@ -48,7 +48,7 @@  discard block
 block discarded – undo
48 48
 	{
49 49
 		return array(
50 50
 			'add_columns' => array(
51
-				$this->table_prefix . 'directory_links'	=> array(
51
+				$this->table_prefix.'directory_links'	=> array(
52 52
 					'link_pagerank' => array('CHAR:2', ''),
53 53
 				),
54 54
 			),
Please login to merge, or discard this patch.