Completed
Pull Request — release-2.1 (#3807)
by Martyn
07:18
created
Sources/ManageSettings.php 1 patch
Spacing   +15 added lines, -15 removed lines patch added patch discarded remove patch
@@ -1326,7 +1326,7 @@  discard block
 block discarded – undo
1326 1326
 					'class' => 'centercol',
1327 1327
 				),
1328 1328
 				'data' => array(
1329
-					'function' => function ($rowData)
1329
+					'function' => function($rowData)
1330 1330
 					{
1331 1331
 						$isChecked = $rowData['disabled'] ? '' : ' checked';
1332 1332
 						$onClickHandler = $rowData['can_show_register'] ? sprintf(' onclick="document.getElementById(\'reg_%1$s\').disabled = !this.checked;"', $rowData['id']) : '';
@@ -1342,7 +1342,7 @@  discard block
 block discarded – undo
1342 1342
 					'class' => 'centercol',
1343 1343
 				),
1344 1344
 				'data' => array(
1345
-					'function' => function ($rowData)
1345
+					'function' => function($rowData)
1346 1346
 					{
1347 1347
 						$isChecked = $rowData['on_register'] && !$rowData['disabled'] ? ' checked' : '';
1348 1348
 						$isDisabled = $rowData['can_show_register'] ? '' : ' disabled';
@@ -1389,15 +1389,15 @@  discard block
 block discarded – undo
1389 1389
 					'value' => $txt['custom_profile_fieldorder'],
1390 1390
 				),
1391 1391
 				'data' => array(
1392
-					'function' => function ($rowData) use ($context, $txt, $scripturl)
1392
+					'function' => function($rowData) use ($context, $txt, $scripturl)
1393 1393
 					{
1394
-						$return = '<p class="centertext bold_text">'. $rowData['field_order'] .'<br />';
1394
+						$return = '<p class="centertext bold_text">' . $rowData['field_order'] . '<br />';
1395 1395
 
1396 1396
 						if ($rowData['field_order'] > 1)
1397
-							$return .= '<a href="' . $scripturl . '?action=admin;area=featuresettings;sa=profileedit;fid=' . $rowData['id_field'] . ';move=up"><span class="toggle_up" title="'. $txt['custom_edit_order_move'] .' '. $txt['custom_edit_order_up'] .'"></span></a>';
1397
+							$return .= '<a href="' . $scripturl . '?action=admin;area=featuresettings;sa=profileedit;fid=' . $rowData['id_field'] . ';move=up"><span class="toggle_up" title="' . $txt['custom_edit_order_move'] . ' ' . $txt['custom_edit_order_up'] . '"></span></a>';
1398 1398
 
1399 1399
 						if ($rowData['field_order'] < $context['custFieldsMaxOrder'])
1400
-							$return .= '<a href="' . $scripturl . '?action=admin;area=featuresettings;sa=profileedit;fid=' . $rowData['id_field'] . ';move=down"><span class="toggle_down" title="'. $txt['custom_edit_order_move'] .' '. $txt['custom_edit_order_down'] .'"></span></a>';
1400
+							$return .= '<a href="' . $scripturl . '?action=admin;area=featuresettings;sa=profileedit;fid=' . $rowData['id_field'] . ';move=down"><span class="toggle_down" title="' . $txt['custom_edit_order_move'] . ' ' . $txt['custom_edit_order_down'] . '"></span></a>';
1401 1401
 
1402 1402
 						$return .= '</p>';
1403 1403
 
@@ -1415,7 +1415,7 @@  discard block
 block discarded – undo
1415 1415
 					'value' => $txt['custom_profile_fieldname'],
1416 1416
 				),
1417 1417
 				'data' => array(
1418
-					'function' => function ($rowData) use ($scripturl)
1418
+					'function' => function($rowData) use ($scripturl)
1419 1419
 					{
1420 1420
 						return sprintf('<a href="%1$s?action=admin;area=featuresettings;sa=profileedit;fid=%2$d">%3$s</a><div class="smalltext">%4$s</div>', $scripturl, $rowData['id_field'], $rowData['field_name'], $rowData['field_desc']);
1421 1421
 					},
@@ -1431,7 +1431,7 @@  discard block
 block discarded – undo
1431 1431
 					'value' => $txt['custom_profile_fieldtype'],
1432 1432
 				),
1433 1433
 				'data' => array(
1434
-					'function' => function ($rowData) use ($txt)
1434
+					'function' => function($rowData) use ($txt)
1435 1435
 					{
1436 1436
 						$textKey = sprintf('custom_profile_type_%1$s', $rowData['field_type']);
1437 1437
 						return isset($txt[$textKey]) ? $txt[$textKey] : $textKey;
@@ -1449,7 +1449,7 @@  discard block
 block discarded – undo
1449 1449
 					'value' => $txt['custom_profile_active'],
1450 1450
 				),
1451 1451
 				'data' => array(
1452
-					'function' => function ($rowData) use ($txt)
1452
+					'function' => function($rowData) use ($txt)
1453 1453
 					{
1454 1454
 						return $rowData['active'] ? $txt['yes'] : $txt['no'];
1455 1455
 					},
@@ -1466,7 +1466,7 @@  discard block
 block discarded – undo
1466 1466
 					'value' => $txt['custom_profile_placement'],
1467 1467
 				),
1468 1468
 				'data' => array(
1469
-					'function' => function ($rowData)
1469
+					'function' => function($rowData)
1470 1470
 					{
1471 1471
 						global $txt, $context;
1472 1472
 
@@ -1701,7 +1701,7 @@  discard block
 block discarded – undo
1701 1701
 			redirectexit('action=admin;area=featuresettings;sa=profile'); // @todo implement an error handler
1702 1702
 
1703 1703
 		// All good, proceed.
1704
-		$smcFunc['db_query']('','
1704
+		$smcFunc['db_query']('', '
1705 1705
 			UPDATE {db_prefix}custom_fields
1706 1706
 			SET field_order = {int:old_order}
1707 1707
 			WHERE field_order = {int:new_order}',
@@ -1710,7 +1710,7 @@  discard block
 block discarded – undo
1710 1710
 				'old_order' => $context['field']['order'],
1711 1711
 			)
1712 1712
 		);
1713
-		$smcFunc['db_query']('','
1713
+		$smcFunc['db_query']('', '
1714 1714
 			UPDATE {db_prefix}custom_fields
1715 1715
 			SET field_order = {int:new_order}
1716 1716
 			WHERE id_field = {int:id_field}',
@@ -1812,7 +1812,7 @@  discard block
 block discarded – undo
1812 1812
 			$smcFunc['db_free_result']($request);
1813 1813
 
1814 1814
 			$unique = false;
1815
-			for ($i = 0; !$unique && $i < 9; $i ++)
1815
+			for ($i = 0; !$unique && $i < 9; $i++)
1816 1816
 			{
1817 1817
 				if (!in_array($col_name, $current_fields))
1818 1818
 					$unique = true;
@@ -1985,7 +1985,7 @@  discard block
 block discarded – undo
1985 1985
 		);
1986 1986
 
1987 1987
 		// Re-arrange the order.
1988
-		$smcFunc['db_query']('','
1988
+		$smcFunc['db_query']('', '
1989 1989
 			UPDATE {db_prefix}custom_fields
1990 1990
 			SET field_order = field_order - 1
1991 1991
 			WHERE field_order > {int:current_order}',
@@ -2249,7 +2249,7 @@  discard block
 block discarded – undo
2249 2249
 	$context['token_check'] = 'noti-admin';
2250 2250
 
2251 2251
 	// Specify our action since we'll want to post back here instead of the profile
2252
-	$context['action'] = 'action=admin;area=featuresettings;sa=alerts;'. $context['session_var'] .'='. $context['session_id'];
2252
+	$context['action'] = 'action=admin;area=featuresettings;sa=alerts;' . $context['session_var'] . '=' . $context['session_id'];
2253 2253
 
2254 2254
 	loadTemplate('Profile');
2255 2255
 	loadLanguage('Profile');
Please login to merge, or discard this patch.
Sources/SearchAPI-Fulltext.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -206,12 +206,12 @@  discard block
 block discarded – undo
206 206
 
207 207
 		if (!empty($modSettings['search_simple_fulltext']))
208 208
 		{
209
-			if($smcFunc['db_title'] == "PostgreSQL")
209
+			if ($smcFunc['db_title'] == "PostgreSQL")
210 210
 			{
211 211
 				//we use the default language "default_text_search_config", otherwise we had to assgine the language here
212 212
 				//to_tsvector(body) -> to_tsvector($language,body) to_tsquery(...) -> to_tsquery($language,...)
213 213
 				$language_ftx = 'english';
214
-				$request = $smcFunc['db_query']('','
214
+				$request = $smcFunc['db_query']('', '
215 215
 					SHOW default_text_search_config',
216 216
 					array()
217 217
 				);
@@ -235,7 +235,7 @@  discard block
 block discarded – undo
235 235
 			// remove any indexed words that are used in the complex body search terms
236 236
 			$words['indexed_words'] = array_diff($words['indexed_words'], $words['complex_words']);
237 237
 
238
-			if($smcFunc['db_title'] == "PostgreSQL"){
238
+			if ($smcFunc['db_title'] == "PostgreSQL") {
239 239
 				$row = 0;
240 240
 				foreach ($words['indexed_words'] as $fulltextWord) {
241 241
 					$query_params['boolean_match'] .= ($row <> 0 ? '&' : '');
@@ -251,12 +251,12 @@  discard block
 block discarded – undo
251 251
 
252 252
 			// if we have bool terms to search, add them in
253 253
 			if ($query_params['boolean_match']) {
254
-				if($smcFunc['db_title'] == "PostgreSQL")
254
+				if ($smcFunc['db_title'] == "PostgreSQL")
255 255
 				{
256 256
 					//we use the default language "default_text_search_config", otherwise we had to assgine the language here
257 257
 					//to_tsvector(body) -> to_tsvector($language,body) to_tsquery(...) -> to_tsquery($language,...)
258 258
 					$language_ftx = 'english';
259
-					$request = $smcFunc['db_query']('','
259
+					$request = $smcFunc['db_query']('', '
260 260
 						SHOW default_text_search_config',
261 261
 						array()
262 262
 					);
@@ -275,7 +275,7 @@  discard block
 block discarded – undo
275 275
 
276 276
 		}
277 277
 
278
-		$ignoreRequest = $smcFunc['db_search_query']('insert_into_log_messages_fulltext', ($smcFunc['db_support_ignore'] ? ( '
278
+		$ignoreRequest = $smcFunc['db_search_query']('insert_into_log_messages_fulltext', ($smcFunc['db_support_ignore'] ? ('
279 279
 			INSERT IGNORE INTO {db_prefix}' . $search_data['insert_into'] . '
280 280
 				(' . implode(', ', array_keys($query_select)) . ')') : '') . '
281 281
 			SELECT ' . implode(', ', $query_select) . '
Please login to merge, or discard this patch.
Sources/ManageSmileys.php 1 patch
Spacing   +9 added lines, -9 removed lines patch added patch discarded remove patch
@@ -393,7 +393,7 @@  discard block
 block discarded – undo
393 393
 					'class' => 'centercol',
394 394
 				),
395 395
 				'data' => array(
396
-					'function' => function ($rowData)
396
+					'function' => function($rowData)
397 397
 					{
398 398
 						return $rowData['selected'] ? '<span class="generic_icons valid"></span>' : '';
399 399
 					},
@@ -453,7 +453,7 @@  discard block
 block discarded – undo
453 453
 					'class' => 'centercol',
454 454
 				),
455 455
 				'data' => array(
456
-					'function' => function ($rowData)
456
+					'function' => function($rowData)
457 457
 					{
458 458
 						return $rowData['selected'] ? '' : sprintf('<input type="checkbox" name="smiley_set[%1$d]" class="input_check">', $rowData['id']);
459 459
 					},
@@ -997,7 +997,7 @@  discard block
 block discarded – undo
997 997
 						'value' => $txt['smileys_location'],
998 998
 					),
999 999
 					'data' => array(
1000
-						'function' => function ($rowData) use ($txt)
1000
+						'function' => function($rowData) use ($txt)
1001 1001
 						{
1002 1002
 							if (empty($rowData['hidden']))
1003 1003
 								return $txt['smileys_location_form'];
@@ -1017,7 +1017,7 @@  discard block
 block discarded – undo
1017 1017
 						'value' => $txt['smileys_description'],
1018 1018
 					),
1019 1019
 					'data' => array(
1020
-						'function' => function ($rowData) use ($context, $txt, $modSettings, $smcFunc)
1020
+						'function' => function($rowData) use ($context, $txt, $modSettings, $smcFunc)
1021 1021
 						{
1022 1022
 							if (empty($modSettings['smileys_dir']) || !is_dir($modSettings['smileys_dir']))
1023 1023
 								return $smcFunc['htmlspecialchars']($rowData['description']);
@@ -1557,7 +1557,7 @@  discard block
 block discarded – undo
1557 1557
 				'action' => $smcFunc['htmlspecialchars'](strtr($action['destination'], array($boarddir => '.')))
1558 1558
 			);
1559 1559
 
1560
-			$file =  $packagesdir . '/temp/' . $base_path . $action['filename'];
1560
+			$file = $packagesdir . '/temp/' . $base_path . $action['filename'];
1561 1561
 			if (isset($action['filename']) && (!file_exists($file) || !is_writable(dirname($action['destination']))))
1562 1562
 			{
1563 1563
 				$context['has_failure'] = true;
@@ -1601,7 +1601,7 @@  discard block
 block discarded – undo
1601 1601
 		{
1602 1602
 			updateSettings(array(
1603 1603
 				'smiley_sets_known' => $modSettings['smiley_sets_known'] . ',' . basename($action['action']),
1604
-				'smiley_sets_names' => $modSettings['smiley_sets_names'] . "\n" . $smileyInfo['name'] . (count($context['actions']) > 1 ? ' ' .  (!empty($action['description']) ? $smcFunc['htmlspecialchars']($action['description']) : basename($action['action'])) : ''),
1604
+				'smiley_sets_names' => $modSettings['smiley_sets_names'] . "\n" . $smileyInfo['name'] . (count($context['actions']) > 1 ? ' ' . (!empty($action['description']) ? $smcFunc['htmlspecialchars']($action['description']) : basename($action['action'])) : ''),
1605 1605
 			));
1606 1606
 		}
1607 1607
 
@@ -1613,7 +1613,7 @@  discard block
 block discarded – undo
1613 1613
 			'{db_prefix}log_packages',
1614 1614
 			array(
1615 1615
 				'filename' => 'string', 'name' => 'string', 'package_id' => 'string', 'version' => 'string',
1616
-				'id_member_installed' => 'int', 'member_installed' => 'string','time_installed' => 'int',
1616
+				'id_member_installed' => 'int', 'member_installed' => 'string', 'time_installed' => 'int',
1617 1617
 				'install_state' => 'int', 'failed_steps' => 'string', 'themes_installed' => 'string',
1618 1618
 				'member_removed' => 'int', 'db_changes' => 'string', 'credits' => 'string',
1619 1619
 			),
@@ -1862,7 +1862,7 @@  discard block
 block discarded – undo
1862 1862
 		'columns' => array(
1863 1863
 			'icon' => array(
1864 1864
 				'data' => array(
1865
-					'function' => function ($rowData) use ($settings, $smcFunc)
1865
+					'function' => function($rowData) use ($settings, $smcFunc)
1866 1866
 					{
1867 1867
 						$images_url = $settings[file_exists(sprintf('%1$s/images/post/%2$s.png', $settings['theme_dir'], $rowData['filename'])) ? 'actual_images_url' : 'default_images_url'];
1868 1868
 						return sprintf('<img src="%1$s/post/%2$s.png" alt="%3$s">', $images_url, $rowData['filename'], $smcFunc['htmlspecialchars']($rowData['title']));
@@ -1896,7 +1896,7 @@  discard block
 block discarded – undo
1896 1896
 					'value' => $txt['icons_board'],
1897 1897
 				),
1898 1898
 				'data' => array(
1899
-					'function' => function ($rowData) use ($txt)
1899
+					'function' => function($rowData) use ($txt)
1900 1900
 					{
1901 1901
 						return empty($rowData['board_name']) ? $txt['icons_edit_icons_all_boards'] : $rowData['board_name'];
1902 1902
 					},
Please login to merge, or discard this patch.
Sources/ManageCalendar.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -136,7 +136,7 @@  discard block
 block discarded – undo
136 136
 					'value' => $txt['date'],
137 137
 				),
138 138
 				'data' => array(
139
-					'function' => function ($rowData) use ($txt)
139
+					'function' => function($rowData) use ($txt)
140 140
 					{
141 141
 						// Recurring every year or just a single year?
142 142
 						$year = $rowData['year'] == '0004' ? sprintf('(%1$s)', $txt['every_year']) : $rowData['year'];
@@ -218,7 +218,7 @@  discard block
 block discarded – undo
218 218
 		checkSession();
219 219
 
220 220
 		// Not too long good sir?
221
-		$_REQUEST['title'] =  $smcFunc['substr']($_REQUEST['title'], 0, 60);
221
+		$_REQUEST['title'] = $smcFunc['substr']($_REQUEST['title'], 0, 60);
222 222
 		$_REQUEST['holiday'] = isset($_REQUEST['holiday']) ? (int) $_REQUEST['holiday'] : 0;
223 223
 
224 224
 		if (isset($_REQUEST['delete']))
Please login to merge, or discard this patch.
Sources/Subs-Members.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -586,7 +586,7 @@  discard block
 block discarded – undo
586 586
 		'member_name' => $regOptions['username'],
587 587
 		'email_address' => $regOptions['email'],
588 588
 		'passwd' => hash_password($regOptions['username'], $regOptions['password']),
589
-		'password_salt' => substr(md5(mt_rand()), 0, 4) ,
589
+		'password_salt' => substr(md5(mt_rand()), 0, 4),
590 590
 		'posts' => 0,
591 591
 		'date_registered' => time(),
592 592
 		'member_ip' => $regOptions['interface'] == 'admin' ? '127.0.0.1' : $user_info['ip'],
@@ -676,7 +676,7 @@  discard block
 block discarded – undo
676 676
 		'time_offset',
677 677
 	);
678 678
 	$knownInets = array(
679
-		'member_ip','member_ip2',
679
+		'member_ip', 'member_ip2',
680 680
 	);
681 681
 
682 682
 	// Call an optional function to validate the users' input.
@@ -904,7 +904,7 @@  discard block
 block discarded – undo
904 904
 	$checkName = strtr($name, array('_' => '\\_', '%' => '\\%'));
905 905
 
906 906
 	//when we got no wildcard we can use equal -> fast
907
-	$operator = (strpos($checkName, '%') || strpos($checkName, '_') ? 'LIKE' : '=' );
907
+	$operator = (strpos($checkName, '%') || strpos($checkName, '_') ? 'LIKE' : '=');
908 908
 
909 909
 	// Make sure they don't want someone else's name.
910 910
 	$request = $smcFunc['db_query']('', '
@@ -1273,7 +1273,7 @@  discard block
 block discarded – undo
1273 1273
 		$user_info['buddies'][] = $userReceiver;
1274 1274
 
1275 1275
 		// And add a nice alert. Don't abuse though!
1276
-		if ((cache_get_data('Buddy-sent-'. $user_info['id'] .'-'. $userReceiver, 86400)) == null)
1276
+		if ((cache_get_data('Buddy-sent-' . $user_info['id'] . '-' . $userReceiver, 86400)) == null)
1277 1277
 		{
1278 1278
 			$smcFunc['db_insert']('insert',
1279 1279
 				'{db_prefix}background_tasks',
@@ -1288,7 +1288,7 @@  discard block
 block discarded – undo
1288 1288
 			);
1289 1289
 
1290 1290
 			// Store this in a cache entry to avoid creating multiple alerts. Give it a long life cycle.
1291
-			cache_put_data('Buddy-sent-'. $user_info['id'] .'-'. $userReceiver, '1', 86400);
1291
+			cache_put_data('Buddy-sent-' . $user_info['id'] . '-' . $userReceiver, '1', 86400);
1292 1292
 		}
1293 1293
 	}
1294 1294
 
Please login to merge, or discard this patch.
Sources/Logging.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -175,7 +175,7 @@  discard block
 block discarded – undo
175 175
 	if (filemtime($boarddir . '/db_last_error.php') === $last_db_error_change)
176 176
 	{
177 177
 		// Write the change
178
-		$write_db_change =  '<' . '?' . "php\n" . '$db_last_error = ' . time() . ';' . "\n" . '?' . '>';
178
+		$write_db_change = '<' . '?' . "php\n" . '$db_last_error = ' . time() . ';' . "\n" . '?' . '>';
179 179
 		$written_bytes = file_put_contents($boarddir . '/db_last_error.php', $write_db_change, LOCK_EX);
180 180
 
181 181
 		// survey says ...
@@ -248,7 +248,7 @@  discard block
 block discarded – undo
248 248
 	', $txt['debug_language_files'], count($context['debug']['language_files']), ': <em>', implode('</em>, <em>', $context['debug']['language_files']), '</em>.<br>
249 249
 	', $txt['debug_stylesheets'], count($context['debug']['sheets']), ': <em>', implode('</em>, <em>', $context['debug']['sheets']), '</em>.<br>
250 250
 	', $txt['debug_hooks'], empty($context['debug']['hooks']) ? 0 : count($context['debug']['hooks']) . ' (<a href="javascript:void(0);" onclick="document.getElementById(\'debug_hooks\').style.display = \'inline\'; this.style.display = \'none\'; return false;">', $txt['debug_show'], '</a><span id="debug_hooks" style="display: none;"><em>' . implode('</em>, <em>', $context['debug']['hooks']), '</em></span>)', '<br>
251
-	',(isset($context['debug']['instances']) ? ($txt['debug_instances'] . (empty($context['debug']['instances']) ? 0 : count($context['debug']['instances'])) . ' (<a href="javascript:void(0);" onclick="document.getElementById(\'debug_instances\').style.display = \'inline\'; this.style.display = \'none\'; return false;">'. $txt['debug_show'] .'</a><span id="debug_instances" style="display: none;"><em>'. implode('</em>, <em>', array_keys($context['debug']['instances'])) .'</em></span>)'. '<br>') : ''),'
251
+	',(isset($context['debug']['instances']) ? ($txt['debug_instances'] . (empty($context['debug']['instances']) ? 0 : count($context['debug']['instances'])) . ' (<a href="javascript:void(0);" onclick="document.getElementById(\'debug_instances\').style.display = \'inline\'; this.style.display = \'none\'; return false;">' . $txt['debug_show'] . '</a><span id="debug_instances" style="display: none;"><em>' . implode('</em>, <em>', array_keys($context['debug']['instances'])) . '</em></span>)' . '<br>') : ''), '
252 252
 	', $txt['debug_files_included'], count($files), ' - ', round($total_size / 1024), $txt['debug_kb'], ' (<a href="javascript:void(0);" onclick="document.getElementById(\'debug_include_info\').style.display = \'inline\'; this.style.display = \'none\'; return false;">', $txt['debug_show'], '</a><span id="debug_include_info" style="display: none;"><em>', implode('</em>, <em>', $files), '</em></span>)<br>';
253 253
 
254 254
 	if (function_exists('memory_get_peak_usage'))
Please login to merge, or discard this patch.
Sources/Recent.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -237,7 +237,7 @@  discard block
 block discarded – undo
237 237
 	else
238 238
 	{
239 239
 		$query_this_board = '{query_wanna_see_board}' . (!empty($modSettings['recycle_enable']) && $modSettings['recycle_board'] > 0 ? '
240
-					AND b.id_board != {int:recycle_board}' : ''). '
240
+					AND b.id_board != {int:recycle_board}' : '') . '
241 241
 					AND m.id_msg >= {int:max_id_msg}';
242 242
 		$query_parameters['max_id_msg'] = max(0, $modSettings['maxMsgID'] - 100 - $_REQUEST['start'] * 6);
243 243
 		$query_parameters['recycle_board'] = $modSettings['recycle_board'];
@@ -1124,7 +1124,7 @@  discard block
 block discarded – undo
1124 1124
 			);
1125 1125
 		else
1126 1126
 			$request = $smcFunc['db_query']('', '
1127
-				SELECT DISTINCT t.id_topic,'.$_REQUEST['sort'].'
1127
+				SELECT DISTINCT t.id_topic,'.$_REQUEST['sort'] . '
1128 1128
 				FROM {db_prefix}topics AS t
1129 1129
 					INNER JOIN {db_prefix}messages AS m ON (m.id_topic = t.id_topic AND m.id_member = {int:current_member})' . (strpos($_REQUEST['sort'], 'ms.') === false ? '' : '
1130 1130
 					INNER JOIN {db_prefix}messages AS ms ON (ms.id_msg = t.id_first_msg)') . (strpos($_REQUEST['sort'], 'mems.') === false ? '' : '
@@ -1391,7 +1391,7 @@  discard block
 block discarded – undo
1391 1391
 	if ($is_topics)
1392 1392
 	{
1393 1393
 		$context['recent_buttons'] = array(
1394
-			'markread' => array('text' => !empty($context['no_board_limits']) ? 'mark_as_read' : 'mark_read_short', 'image' => 'markread.png', 'custom' => 'data-confirm="'.  $txt['are_sure_mark_read'] .'"', 'class' => 'you_sure', 'url' => $scripturl . '?action=markasread;sa=' . (!empty($context['no_board_limits']) ? 'all' : 'board' . $context['querystring_board_limits']) . ';' . $context['session_var'] . '=' . $context['session_id']),
1394
+			'markread' => array('text' => !empty($context['no_board_limits']) ? 'mark_as_read' : 'mark_read_short', 'image' => 'markread.png', 'custom' => 'data-confirm="' . $txt['are_sure_mark_read'] . '"', 'class' => 'you_sure', 'url' => $scripturl . '?action=markasread;sa=' . (!empty($context['no_board_limits']) ? 'all' : 'board' . $context['querystring_board_limits']) . ';' . $context['session_var'] . '=' . $context['session_id']),
1395 1395
 		);
1396 1396
 
1397 1397
 		if ($context['showCheckboxes'])
@@ -1407,7 +1407,7 @@  discard block
 block discarded – undo
1407 1407
 	elseif (!$is_topics && isset($context['topics_to_mark']))
1408 1408
 	{
1409 1409
 		$context['recent_buttons'] = array(
1410
-			'markread' => array('text' => 'mark_as_read', 'image' => 'markread.png', 'custom' => 'data-confirm="'. $txt['are_sure_mark_read']  .'"', 'class' => 'you_sure', 'url' => $scripturl . '?action=markasread;sa=unreadreplies;topics=' . $context['topics_to_mark'] . ';' . $context['session_var'] . '=' . $context['session_id']),
1410
+			'markread' => array('text' => 'mark_as_read', 'image' => 'markread.png', 'custom' => 'data-confirm="' . $txt['are_sure_mark_read'] . '"', 'class' => 'you_sure', 'url' => $scripturl . '?action=markasread;sa=unreadreplies;topics=' . $context['topics_to_mark'] . ';' . $context['session_var'] . '=' . $context['session_id']),
1411 1411
 		);
1412 1412
 
1413 1413
 		if ($context['showCheckboxes'])
Please login to merge, or discard this patch.
Sources/Modlog.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -256,7 +256,7 @@  discard block
 block discarded – undo
256 256
 					'class' => 'centercol',
257 257
 				),
258 258
 				'data' => array(
259
-					'function' => function ($entry)
259
+					'function' => function($entry)
260 260
 					{
261 261
 						return '<input type="checkbox" class="input_check" name="delete[]" value="' . $entry['id'] . '"' . ($entry['editable'] ? '' : ' disabled') . '>';
262 262
 					},
@@ -638,7 +638,7 @@  discard block
 block discarded – undo
638 638
 		if (empty($entries[$k]['action_text']))
639 639
 			$entries[$k]['action_text'] = isset($txt['modlog_ac_' . $entry['action']]) ? $txt['modlog_ac_' . $entry['action']] : $entry['action'];
640 640
 		$entries[$k]['action_text'] = preg_replace_callback('~\{([A-Za-z\d_]+)\}~i',
641
-			function ($matches) use ($entries, $k)
641
+			function($matches) use ($entries, $k)
642 642
 			{
643 643
 				return isset($entries[$k]['extra'][$matches[1]]) ? $entries[$k]['extra'][$matches[1]] : '';
644 644
 			}, $entries[$k]['action_text']);
Please login to merge, or discard this patch.
Sources/DbSearch-postgresql.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -37,12 +37,12 @@  discard block
 block discarded – undo
37 37
 	$version = $smcFunc['db_get_version']();
38 38
 	// if we got a Beta Version
39 39
 	if (stripos($version, 'beta') !== false)
40
-		$version = substr($version, 0, stripos($version, 'beta')).'.0';
40
+		$version = substr($version, 0, stripos($version, 'beta')) . '.0';
41 41
 	// or RC
42 42
 	if (stripos($version, 'rc') !== false)
43
-		$version = substr($version, 0, stripos($version, 'rc')).'.0';
43
+		$version = substr($version, 0, stripos($version, 'rc')) . '.0';
44 44
 
45
-	if (version_compare($version,'9.5.0','>='))
45
+	if (version_compare($version, '9.5.0', '>='))
46 46
 		$smcFunc['db_support_ignore'] = true;
47 47
 }
48 48
 
@@ -54,7 +54,7 @@  discard block
 block discarded – undo
54 54
  */
55 55
 function smf_db_search_support($search_type)
56 56
 {
57
-	$supported_types = array('custom','fulltext');
57
+	$supported_types = array('custom', 'fulltext');
58 58
 
59 59
 	return in_array($search_type, $supported_types);
60 60
 }
@@ -108,9 +108,9 @@  discard block
 block discarded – undo
108 108
 	if (preg_match('~^\s*INSERT\sIGNORE~i', $db_string) != 0)
109 109
 	{
110 110
 		$db_string = preg_replace('~^\s*INSERT\sIGNORE~i', 'INSERT', $db_string);
111
-		if ($smcFunc['db_support_ignore']){
111
+		if ($smcFunc['db_support_ignore']) {
112 112
 			//pg style "INSERT INTO.... ON CONFLICT DO NOTHING"
113
-			$db_string = $db_string.' ON CONFLICT DO NOTHING';
113
+			$db_string = $db_string . ' ON CONFLICT DO NOTHING';
114 114
 		}
115 115
 		else
116 116
 		{
Please login to merge, or discard this patch.