Completed
Pull Request — release-2.1 (#4089)
by Sebastiaan
08:14
created
Sources/ScheduledTasks.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -384,7 +384,7 @@
 block discarded – undo
384 384
 	clean_cache();
385 385
 
386 386
 	// If warning decrement is enabled and we have people who have not had a new warning in 24 hours, lower their warning level.
387
-	list (, , $modSettings['warning_decrement']) = explode(',', $modSettings['warning_settings']);
387
+	list (,, $modSettings['warning_decrement']) = explode(',', $modSettings['warning_settings']);
388 388
 	if ($modSettings['warning_decrement'])
389 389
 	{
390 390
 		// Find every member who has a warning level...
Please login to merge, or discard this patch.
Sources/Attachments.php 1 patch
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -76,7 +76,7 @@  discard block
 block discarded – undo
76 76
 		// Just send a generic message.
77 77
 		else
78 78
 			$this->setResponse(array(
79
-				'text' => $this->_sa == 'add' ? 'attach_error_title' :   'attached_file_deleted_error',
79
+				'text' => $this->_sa == 'add' ? 'attach_error_title' : 'attached_file_deleted_error',
80 80
 				'type' => 'error',
81 81
 				'data' => false,
82 82
 			));
@@ -404,7 +404,7 @@  discard block
 block discarded – undo
404 404
 			// Gotta urlencode the filename.
405 405
 			if ($this->_attachResults)
406 406
 				foreach ($this->_attachResults as $k => $v)
407
-					$this->_attachResults[$k]['name'] =  urlencode($this->_attachResults[$k]['name']);
407
+					$this->_attachResults[$k]['name'] = urlencode($this->_attachResults[$k]['name']);
408 408
 
409 409
 			$this->_response = array(
410 410
 				'files' => $this->_attachResults ? $this->_attachResults : false,
@@ -431,7 +431,7 @@  discard block
 block discarded – undo
431 431
 			ob_start();
432 432
 
433 433
 		// Set the header.
434
-		header('Content-Type: application/json; charset='. $context['character_set'] .'');
434
+		header('Content-Type: application/json; charset=' . $context['character_set'] . '');
435 435
 
436 436
 		echo json_encode($this->_response ? $this->_response : array());
437 437
 
Please login to merge, or discard this patch.
Sources/CacheAPI-memcache.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -61,7 +61,7 @@
 block discarded – undo
61 61
 			$server = trim($servers[array_rand($servers)]);
62 62
 
63 63
 			// Normal host names do not contain slashes, while e.g. unix sockets do. Assume alternative transport pipe with port 0.
64
-			if (strpos($server,'/') !== false)
64
+			if (strpos($server, '/') !== false)
65 65
 				$host = $server;
66 66
 			else
67 67
 			{
Please login to merge, or discard this patch.
Sources/Calendar.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -240,8 +240,8 @@
 block discarded – undo
240 240
 		$time_string = str_replace(array('%I', '%H', '%S', '%r', '%R', '%T'), array('%l', '%k', '', '%l:%M %p', '%k:%M', '%l:%M'), $matches[0]);
241 241
 
242 242
 	$js_time_string = str_replace(
243
-		array('%H', '%k', '%I', '%l', '%M', '%p', '%P', '%r',      '%R',  '%S', '%T',    '%X'),
244
-		array('H',  'G',  'h',  'g',  'i',  'A',  'a',  'h:i:s A', 'H:i', 's',  'H:i:s', 'H:i:s'),
243
+		array('%H', '%k', '%I', '%l', '%M', '%p', '%P', '%r', '%R', '%S', '%T', '%X'),
244
+		array('H', 'G', 'h', 'g', 'i', 'A', 'a', 'h:i:s A', 'H:i', 's', 'H:i:s', 'H:i:s'),
245 245
 		$time_string
246 246
 	);
247 247
 
Please login to merge, or discard this patch.
other/install.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -1622,8 +1622,7 @@
 block discarded – undo
1622 1622
 	updateStats('topic');
1623 1623
 
1624 1624
 	// This function is needed to do the updateStats('subject') call.
1625
-	$smcFunc['strtolower'] = $db_character_set != 'utf8' && $txt['lang_character_set'] != 'UTF-8' ? 'strtolower' :
1626
-		function($string){
1625
+	$smcFunc['strtolower'] = $db_character_set != 'utf8' && $txt['lang_character_set'] != 'UTF-8' ? 'strtolower' : function($string) {
1627 1626
 			global $sourcedir;
1628 1627
 			if (function_exists('mb_strtolower'))
1629 1628
 				return mb_strtolower($string, 'UTF-8');
Please login to merge, or discard this patch.
Themes/default/Profile.template.php 1 patch
Spacing   +1 added lines, -2 removed lines patch added patch discarded remove patch
@@ -3031,8 +3031,7 @@
 block discarded – undo
3031 3031
 							<div class="roundframe">
3032 3032
 								<div>
3033 3033
 		', !empty($context['tfa_backup']) ? '
3034
-									<div class="smalltext error">' . $txt['tfa_backup_used_desc'] . '</div>' :
3035
-			($modSettings['tfa_mode'] == 2 ? '
3034
+									<div class="smalltext error">' . $txt['tfa_backup_used_desc'] . '</div>' : ($modSettings['tfa_mode'] == 2 ? '
3036 3035
 									<div class="smalltext"><strong>' . $txt['tfa_forced_desc'] . '</strong></div>' : ''), '
3037 3036
 									<div class="smalltext">', $txt['tfa_desc'], '</div>
3038 3037
 									<div id="basicinfo" style="width: 60%">
Please login to merge, or discard this patch.
Themes/default/Recent.template.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@
 block discarded – undo
21 21
 	<div id="recent" class="main_section">
22 22
 		<div class="cat_bar">
23 23
 			<h3 class="catbg">
24
-				<span class="xx"></span>',$txt['recent_posts'],'
24
+				<span class="xx"></span>',$txt['recent_posts'], '
25 25
 			</h3>
26 26
 		</div>
27 27
 		<div class="pagesection">', $context['page_index'], '</div>';
Please login to merge, or discard this patch.
index.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@
 block discarded – undo
104 104
  *
105 105
  * @param string $class The fully-qualified class name.
106 106
  */
107
-spl_autoload_register(function ($class) use ($sourcedir)
107
+spl_autoload_register(function($class) use ($sourcedir)
108 108
 {
109 109
 	$classMap = array(
110 110
 		'ReCaptcha\\' => 'ReCaptcha/',
Please login to merge, or discard this patch.
Sources/minify/path-converter/src/Converter.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -39,8 +39,8 @@  discard block
 block discarded – undo
39 39
             // when both paths have nothing in common, one of them is probably
40 40
             // absolute while the other is relative
41 41
             $cwd = getcwd();
42
-            $from = strpos($from, $cwd) === 0 ? $from : $cwd.'/'.$from;
43
-            $to = strpos($to, $cwd) === 0 ? $to : $cwd.'/'.$to;
42
+            $from = strpos($from, $cwd) === 0 ? $from : $cwd . '/' . $from;
43
+            $to = strpos($to, $cwd) === 0 ? $to : $cwd . '/' . $to;
44 44
 
45 45
             // or traveling the tree via `..`
46 46
             // attempt to resolve path, or assume it's fine if it doesn't exist
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
         }
148 148
 
149 149
         // normalize paths
150
-        $path = $this->normalize($this->from.'/'.$path);
150
+        $path = $this->normalize($this->from . '/' . $path);
151 151
 
152 152
         // strip shared ancestor paths
153 153
         $shared = $this->shared($path, $this->to);
@@ -157,7 +157,7 @@  discard block
 block discarded – undo
157 157
         // add .. for every directory that needs to be traversed to new path
158 158
         $to = str_repeat('../', mb_substr_count($to, '/'));
159 159
 
160
-        return $to.ltrim($path, '/');
160
+        return $to . ltrim($path, '/');
161 161
     }
162 162
 
163 163
     /**
Please login to merge, or discard this patch.