Completed
Pull Request — release-2.1 (#3785)
by Fran
08:32
created
Sources/minify/src/Minify.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -316,7 +316,7 @@  discard block
 block discarded – undo
316 316
     {
317 317
         // PHP only supports $this inside anonymous functions since 5.4
318 318
         $minifier = $this;
319
-        $callback = function ($match) use ($minifier) {
319
+        $callback = function($match) use ($minifier) {
320 320
             // check the second index here, because the first always contains a quote
321 321
             if (!$match[2]) {
322 322
                 /*
@@ -329,8 +329,8 @@  discard block
 block discarded – undo
329 329
             }
330 330
 
331 331
             $count = count($minifier->extracted);
332
-            $placeholder = $match[1].$count.$match[1];
333
-            $minifier->extracted[$placeholder] = $match[1].$match[2].$match[1];
332
+            $placeholder = $match[1] . $count . $match[1];
333
+            $minifier->extracted[$placeholder] = $match[1] . $match[2] . $match[1];
334 334
 
335 335
             return $placeholder;
336 336
         };
@@ -347,7 +347,7 @@  discard block
 block discarded – undo
347 347
          * considered as escape-char (times 2) and to get it in the regex,
348 348
          * escaped (times 2)
349 349
          */
350
-        $this->registerPattern('/(['.$chars.'])(.*?(?<!\\\\)(\\\\\\\\)*+)\\1/s', $callback);
350
+        $this->registerPattern('/([' . $chars . '])(.*?(?<!\\\\)(\\\\\\\\)*+)\\1/s', $callback);
351 351
     }
352 352
 
353 353
     /**
@@ -397,7 +397,7 @@  discard block
 block discarded – undo
397 397
     protected function openFileForWriting($path)
398 398
     {
399 399
         if (($handler = @fopen($path, 'w')) === false) {
400
-            throw new IOException('The file "'.$path.'" could not be opened for writing. Check if PHP has enough permissions.');
400
+            throw new IOException('The file "' . $path . '" could not be opened for writing. Check if PHP has enough permissions.');
401 401
         }
402 402
 
403 403
         return $handler;
@@ -415,7 +415,7 @@  discard block
 block discarded – undo
415 415
     protected function writeToFile($handler, $content, $path = '')
416 416
     {
417 417
         if (($result = @fwrite($handler, $content)) === false || ($result < strlen($content))) {
418
-            throw new IOException('The file "'.$path.'" could not be written to. Check your disk space and file permissions.');
418
+            throw new IOException('The file "' . $path . '" could not be written to. Check your disk space and file permissions.');
419 419
         }
420 420
     }
421 421
 }
Please login to merge, or discard this patch.
Sources/Search.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -659,7 +659,7 @@  discard block
 block discarded – undo
659 659
 
660 660
 	// Remove the phrase parts and extract the words.
661 661
 	$wordArray = preg_replace('~(?:^|\s)(?:[-]?)"(?:[^"]+)"(?:$|\s)~' . ($context['utf8'] ? 'u' : ''), ' ', $search_params['search']);
662
-	$wordArray = explode(' ',  $smcFunc['htmlspecialchars'](un_htmlspecialchars($wordArray), ENT_QUOTES));
662
+	$wordArray = explode(' ', $smcFunc['htmlspecialchars'](un_htmlspecialchars($wordArray), ENT_QUOTES));
663 663
 
664 664
 	// A minus sign in front of a word excludes the word.... so...
665 665
 	$excludedWords = array();
@@ -1104,7 +1104,7 @@  discard block
 block discarded – undo
1104 1104
 						SELECT
1105 1105
 							{int:id_search},
1106 1106
 							t.id_topic,
1107
-							' . $relevance. ',
1107
+							' . $relevance . ',
1108 1108
 							' . (empty($userQuery) ? 't.id_first_msg' : 'm.id_msg') . ',
1109 1109
 							1
1110 1110
 						FROM ' . $subject_query['from'] . (empty($subject_query['inner_join']) ? '' : '
@@ -1339,7 +1339,7 @@  discard block
 block discarded – undo
1339 1339
 						if (empty($subject_query['where']))
1340 1340
 							continue;
1341 1341
 
1342
-						$ignoreRequest = $smcFunc['db_search_query']('insert_log_search_topics', ($smcFunc['db_support_ignore'] ? ( '
1342
+						$ignoreRequest = $smcFunc['db_search_query']('insert_log_search_topics', ($smcFunc['db_support_ignore'] ? ('
1343 1343
 							INSERT IGNORE INTO {db_prefix}' . ($createTemporary ? 'tmp_' : '') . 'log_search_topics
1344 1344
 								(' . ($createTemporary ? '' : 'id_search, ') . 'id_topic)') : '') . '
1345 1345
 							SELECT ' . ($createTemporary ? '' : $_SESSION['search_cache']['id_search'] . ', ') . 't.id_topic
@@ -1568,7 +1568,7 @@  discard block
 block discarded – undo
1568 1568
 					}
1569 1569
 					$main_query['select']['relevance'] = substr($relevance, 0, -3) . ') / ' . $new_weight_total . ' AS relevance';
1570 1570
 
1571
-					$ignoreRequest = $smcFunc['db_search_query']('insert_log_search_results_no_index', ($smcFunc['db_support_ignore'] ? ( '
1571
+					$ignoreRequest = $smcFunc['db_search_query']('insert_log_search_results_no_index', ($smcFunc['db_support_ignore'] ? ('
1572 1572
 						INSERT IGNORE INTO ' . '{db_prefix}log_search_results
1573 1573
 							(' . implode(', ', array_keys($main_query['select'])) . ')') : '') . '
1574 1574
 						SELECT
@@ -1636,7 +1636,7 @@  discard block
 block discarded – undo
1636 1636
 					$relevance = substr($relevance, 0, -3) . ') / ' . $weight_total . ' AS relevance';
1637 1637
 
1638 1638
 					$usedIDs = array_flip(empty($inserts) ? array() : array_keys($inserts));
1639
-					$ignoreRequest = $smcFunc['db_search_query']('insert_log_search_results_sub_only', ($smcFunc['db_support_ignore'] ? ( '
1639
+					$ignoreRequest = $smcFunc['db_search_query']('insert_log_search_results_sub_only', ($smcFunc['db_support_ignore'] ? ('
1640 1640
 						INSERT IGNORE INTO {db_prefix}log_search_results
1641 1641
 							(id_search, id_topic, relevance, id_msg, num_matches)') : '') . '
1642 1642
 						SELECT
@@ -2102,7 +2102,7 @@  discard block
 block discarded – undo
2102 2102
 		$query = trim($query, "\*+");
2103 2103
 		$query = strtr($smcFunc['htmlspecialchars']($query), array('\\\'' => '\''));
2104 2104
 
2105
-		$body_highlighted = preg_replace_callback('/((<[^>]*)|' . preg_quote(strtr($query, array('\'' => '&#039;')), '/') . ')/i' . ($context['utf8'] ? 'u' : ''), function ($m)
2105
+		$body_highlighted = preg_replace_callback('/((<[^>]*)|' . preg_quote(strtr($query, array('\'' => '&#039;')), '/') . ')/i' . ($context['utf8'] ? 'u' : ''), function($m)
2106 2106
 		{
2107 2107
 			return isset($m[2]) && "$m[2]" == "$m[1]" ? stripslashes("$m[1]") : "<strong class=\"highlight\">$m[1]</strong>";
2108 2108
 		}, $body_highlighted);
Please login to merge, or discard this patch.
Sources/DbExtra-postgresql.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -91,7 +91,7 @@  discard block
 block discarded – undo
91 91
 
92 92
 	$table = str_replace('{db_prefix}', $db_prefix, $table);
93 93
 
94
-	$pg_tables = array('pg_catalog','information_schema');
94
+	$pg_tables = array('pg_catalog', 'information_schema');
95 95
 
96 96
 	$request = $smcFunc['db_query']('', '
97 97
 		SELECT pg_relation_size(C.oid) AS "size"
@@ -289,7 +289,7 @@  discard block
 block discarded – undo
289 289
 {
290 290
 	static $ver;
291 291
 
292
-	if(!empty($ver))
292
+	if (!empty($ver))
293 293
 		return $ver;
294 294
 
295 295
 	global $smcFunc;
Please login to merge, or discard this patch.
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.