Completed
Pull Request — release-2.1 (#4470)
by Fran
16:42
created
Sources/Post.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -256,8 +256,8 @@  discard block
 block discarded – undo
256 256
 			$time_string = str_replace(array('%I', '%H', '%S', '%r', '%R', '%T'), array('%l', '%k', '', '%l:%M %p', '%k:%M', '%l:%M'), $matches[0]);
257 257
 
258 258
 		$js_time_string = str_replace(
259
-			array('%H', '%k', '%I', '%l', '%M', '%p', '%P', '%r',      '%R',  '%S', '%T',    '%X'),
260
-			array('H',  'G',  'h',  'g',  'i',  'A',  'a',  'h:i:s A', 'H:i', 's',  'H:i:s', 'H:i:s'),
259
+			array('%H', '%k', '%I', '%l', '%M', '%p', '%P', '%r', '%R', '%S', '%T', '%X'),
260
+			array('H', 'G', 'h', 'g', 'i', 'A', 'a', 'h:i:s A', 'H:i', 's', 'H:i:s', 'H:i:s'),
261 261
 			$time_string
262 262
 		);
263 263
 
@@ -1305,14 +1305,14 @@  discard block
 block discarded – undo
1305 1305
 	if (isset($context['name']) && isset($context['email']))
1306 1306
 	{
1307 1307
 		$context['posting_fields']['guestname'] = array(
1308
-			'dt' => '<span id="caption_guestname"' .  (isset($context['post_error']['long_name']) || isset($context['post_error']['no_name']) || isset($context['post_error']['bad_name']) ? ' class="error"' : '') . '>' . $txt['name'] . '</span>',
1308
+			'dt' => '<span id="caption_guestname"' . (isset($context['post_error']['long_name']) || isset($context['post_error']['no_name']) || isset($context['post_error']['bad_name']) ? ' class="error"' : '') . '>' . $txt['name'] . '</span>',
1309 1309
 			'dd' => '<input type="text" name="guestname" size="25" value="' . $context['name'] . '" required>',
1310 1310
 		);
1311 1311
 
1312 1312
 		if (empty($modSettings['guest_post_no_email']))
1313 1313
 		{
1314 1314
 			$context['posting_fields']['email'] = array(
1315
-				'dt' => '<span id="caption_email"' .  (isset($context['post_error']['no_email']) || isset($context['post_error']['bad_email']) ? ' class="error"' : '') . '>' . $txt['email'] . '</span>',
1315
+				'dt' => '<span id="caption_email"' . (isset($context['post_error']['no_email']) || isset($context['post_error']['bad_email']) ? ' class="error"' : '') . '>' . $txt['email'] . '</span>',
1316 1316
 				'dd' => '<input type="email" name="email" size="25" value="' . $context['email'] . '" required>',
1317 1317
 			);
1318 1318
 		}
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]">', $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']);
@@ -1554,7 +1554,7 @@  discard block
 block discarded – undo
1554 1554
 				'action' => $smcFunc['htmlspecialchars'](strtr($action['destination'], array($boarddir => '.')))
1555 1555
 			);
1556 1556
 
1557
-			$file =  $packagesdir . '/temp/' . $base_path . $action['filename'];
1557
+			$file = $packagesdir . '/temp/' . $base_path . $action['filename'];
1558 1558
 			if (isset($action['filename']) && (!file_exists($file) || !is_writable(dirname($action['destination']))))
1559 1559
 			{
1560 1560
 				$context['has_failure'] = true;
@@ -1599,7 +1599,7 @@  discard block
 block discarded – undo
1599 1599
 		{
1600 1600
 			updateSettings(array(
1601 1601
 				'smiley_sets_known' => $modSettings['smiley_sets_known'] . ',' . basename($action['action']),
1602
-				'smiley_sets_names' => $modSettings['smiley_sets_names'] . "\n" . $smileyInfo['name'] . (count($context['actions']) > 1 ? ' ' .  (!empty($action['description']) ? $smcFunc['htmlspecialchars']($action['description']) : basename($action['action'])) : ''),
1602
+				'smiley_sets_names' => $modSettings['smiley_sets_names'] . "\n" . $smileyInfo['name'] . (count($context['actions']) > 1 ? ' ' . (!empty($action['description']) ? $smcFunc['htmlspecialchars']($action['description']) : basename($action['action'])) : ''),
1603 1603
 			));
1604 1604
 		}
1605 1605
 
@@ -1611,7 +1611,7 @@  discard block
 block discarded – undo
1611 1611
 			'{db_prefix}log_packages',
1612 1612
 			array(
1613 1613
 				'filename' => 'string', 'name' => 'string', 'package_id' => 'string', 'version' => 'string',
1614
-				'id_member_installed' => 'int', 'member_installed' => 'string','time_installed' => 'int',
1614
+				'id_member_installed' => 'int', 'member_installed' => 'string', 'time_installed' => 'int',
1615 1615
 				'install_state' => 'int', 'failed_steps' => 'string', 'themes_installed' => 'string',
1616 1616
 				'member_removed' => 'int', 'db_changes' => 'string', 'credits' => 'string',
1617 1617
 			),
@@ -1860,7 +1860,7 @@  discard block
 block discarded – undo
1860 1860
 		'columns' => array(
1861 1861
 			'icon' => array(
1862 1862
 				'data' => array(
1863
-					'function' => function ($rowData) use ($settings, $smcFunc)
1863
+					'function' => function($rowData) use ($settings, $smcFunc)
1864 1864
 					{
1865 1865
 						$images_url = $settings[file_exists(sprintf('%1$s/images/post/%2$s.png', $settings['theme_dir'], $rowData['filename'])) ? 'actual_images_url' : 'default_images_url'];
1866 1866
 						return sprintf('<img src="%1$s/post/%2$s.png" alt="%3$s">', $images_url, $rowData['filename'], $smcFunc['htmlspecialchars']($rowData['title']));
@@ -1894,7 +1894,7 @@  discard block
 block discarded – undo
1894 1894
 					'value' => $txt['icons_board'],
1895 1895
 				),
1896 1896
 				'data' => array(
1897
-					'function' => function ($rowData) use ($txt)
1897
+					'function' => function($rowData) use ($txt)
1898 1898
 					{
1899 1899
 						return empty($rowData['board_name']) ? $txt['icons_edit_icons_all_boards'] : $rowData['board_name'];
1900 1900
 					},
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" 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/Profile-View.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -247,7 +247,7 @@
 block discarded – undo
247 247
 	}
248 248
 	$smcFunc['db_free_result']($request);
249 249
 
250
-	if($withSender)
250
+	if ($withSender)
251 251
 	{
252 252
 		$senders = loadMemberData($senders);
253 253
 		foreach ($senders as $member)
Please login to merge, or discard this patch.
Themes/default/BoardIndex.template.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -72,7 +72,7 @@  discard block
 block discarded – undo
72 72
 
73 73
 		echo '
74 74
 		<div class="main_container">
75
-			<div class="cat_bar ', $category['is_collapsed'] ? 'collapsed' : '','" id="category_', $category['id'], '">
75
+			<div class="cat_bar ', $category['is_collapsed'] ? 'collapsed' : '', '" id="category_', $category['id'], '">
76 76
 				<h3 class="catbg">';
77 77
 
78 78
 		// If this category even can collapse, show a link to collapse it.
@@ -247,7 +247,7 @@  discard block
 block discarded – undo
247 247
 		foreach ($board['children'] as $child)
248 248
 		{
249 249
 			if (!$child['is_redirect'])
250
-				$child['link'] = ''. ($child['new'] ? '<a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><span class="new_posts">' . $txt['new'] . '</span></a>' : '') . '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="board_new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . '</a>';
250
+				$child['link'] = '' . ($child['new'] ? '<a href="' . $scripturl . '?action=unread;board=' . $child['id'] . '" title="' . $txt['new_posts'] . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')"><span class="new_posts">' . $txt['new'] . '</span></a>' : '') . '<a href="' . $child['href'] . '" ' . ($child['new'] ? 'class="board_new_posts" ' : '') . 'title="' . ($child['new'] ? $txt['new_posts'] : $txt['old_posts']) . ' (' . $txt['board_topics'] . ': ' . comma_format($child['topics']) . ', ' . $txt['posts'] . ': ' . comma_format($child['posts']) . ')">' . $child['name'] . '</a>';
251 251
 			else
252 252
 				$child['link'] = '<a href="' . $child['href'] . '" title="' . comma_format($child['posts']) . ' ' . $txt['redirects'] . ' - ' . $child['short_description'] . '">' . $child['name'] . '</a>';
253 253
 
Please login to merge, or discard this patch.
Sources/Load.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -1719,7 +1719,7 @@
 block discarded – undo
1719 1719
 		$id_theme = $modSettings['theme_guests'];
1720 1720
 
1721 1721
 	// We already load the basic stuff?
1722
-	if (empty($settings['theme_id']) || $settings['theme_id'] != $id_theme )
1722
+	if (empty($settings['theme_id']) || $settings['theme_id'] != $id_theme)
1723 1723
 	{
1724 1724
 		// Verify the id_theme... no foul play.
1725 1725
 		// Always allow the board specific theme, if they are overriding.
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"
@@ -290,7 +290,7 @@  discard block
 block discarded – undo
290 290
 	global $db_connection;
291 291
 	static $ver;
292 292
 
293
-	if(!empty($ver))
293
+	if (!empty($ver))
294 294
 		return $ver;
295 295
 
296 296
 	$ver = pg_version($db_connection)['server'];
Please login to merge, or discard this patch.
Sources/DbPackages-mysql.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -126,9 +126,9 @@  discard block
 block discarded – undo
126 126
 		{
127 127
 			$smcFunc['db_transaction']('begin');
128 128
 			$db_trans = true;
129
-			$smcFunc['db_drop_table']($table_name.'_old');
130
-			$smcFunc['db_query']('','
131
-				RENAME TABLE '. $table_name .' TO ' . $table_name . '_old',
129
+			$smcFunc['db_drop_table']($table_name . '_old');
130
+			$smcFunc['db_query']('', '
131
+				RENAME TABLE '. $table_name . ' TO ' . $table_name . '_old',
132 132
 				array(
133 133
 					'security_override' => true,
134 134
 				)
@@ -202,15 +202,15 @@  discard block
 block discarded – undo
202 202
 	{	
203 203
 		$same_col = array();
204 204
 
205
-		$request = $smcFunc['db_query']('','
205
+		$request = $smcFunc['db_query']('', '
206 206
 			SELECT count(*), column_name
207 207
 			FROM information_schema.columns
208 208
 			WHERE table_name in ({string:table1},{string:table2}) AND table_schema = {string:schema}
209 209
 			GROUP BY column_name
210 210
 			HAVING count(*) > 1',
211
-			array (
211
+			array(
212 212
 				'table1' => $table_name,
213
-				'table2' => $table_name.'_old',
213
+				'table2' => $table_name . '_old',
214 214
 				'schema' => $db_name,
215 215
 			)
216 216
 		);
@@ -220,8 +220,8 @@  discard block
 block discarded – undo
220 220
 			$same_col[] = $row['column_name'];
221 221
 		}
222 222
 
223
-		$smcFunc['db_query']('','
224
-			INSERT INTO ' . $table_name .'('
223
+		$smcFunc['db_query']('', '
224
+			INSERT INTO ' . $table_name . '('
225 225
 			. implode($same_col, ',') .
226 226
 			')
227 227
 			SELECT '. implode($same_col, ',') . '
Please login to merge, or discard this patch.
Sources/DbPackages-postgresql.php 1 patch
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -122,11 +122,11 @@  discard block
 block discarded – undo
122 122
 			$smcFunc['db_drop_table']($table_name);
123 123
 		else if ($if_exists == 'update')
124 124
 		{
125
-			$smcFunc['db_drop_table']($table_name.'_old');
125
+			$smcFunc['db_drop_table']($table_name . '_old');
126 126
 			$smcFunc['db_transaction']('begin');
127 127
 			$db_trans = true;
128
-			$smcFunc['db_query']('','
129
-				ALTER TABLE '. $table_name .' RENAME TO ' . $table_name . '_old',
128
+			$smcFunc['db_query']('', '
129
+				ALTER TABLE '. $table_name . ' RENAME TO ' . $table_name . '_old',
130 130
 				array(
131 131
 					'security_override' => true,
132 132
 				)
@@ -213,15 +213,15 @@  discard block
 block discarded – undo
213 213
 	{
214 214
 		$same_col = array();
215 215
 
216
-		$request = $smcFunc['db_query']('','
216
+		$request = $smcFunc['db_query']('', '
217 217
 			SELECT count(*), column_name
218 218
 			FROM information_schema.columns
219 219
 			WHERE table_name in ({string:table1},{string:table2}) AND table_schema = {string:schema}
220 220
 			GROUP BY column_name
221 221
 			HAVING count(*) > 1',
222
-			array (
222
+			array(
223 223
 				'table1' => $table_name,
224
-				'table2' => $table_name.'_old',
224
+				'table2' => $table_name . '_old',
225 225
 				'schema' => 'public',
226 226
 			)
227 227
 		);
@@ -231,8 +231,8 @@  discard block
 block discarded – undo
231 231
 			$same_col[] = $row['column_name'];
232 232
 		}
233 233
 
234
-		$smcFunc['db_query']('','
235
-			INSERT INTO ' . $table_name .'('
234
+		$smcFunc['db_query']('', '
235
+			INSERT INTO ' . $table_name . '('
236 236
 			. implode($same_col, ',') .
237 237
 			')
238 238
 			SELECT '. implode($same_col, ',') . '
Please login to merge, or discard this patch.