Completed
Push — master ( 3b018a...3a3d03 )
by mains
02:43
created
index.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -36,8 +36,8 @@  discard block
 block discarded – undo
36 36
 		if(!isset($_COOKIE['JodelDeviceId']))
37 37
 		{
38 38
 			$deviceUid = createAccount();
39
-			setcookie('JodelDeviceId', $deviceUid, time()+60*60*24*365*10);
40
-			error_log('Created account with JodelDeviceId:' . $deviceUid .  ' for [' . $_SERVER ['HTTP_USER_AGENT'] . ']');
39
+			setcookie('JodelDeviceId', $deviceUid, time() + 60 * 60 * 24 * 365 * 10);
40
+			error_log('Created account with JodelDeviceId:' . $deviceUid . ' for [' . $_SERVER ['HTTP_USER_AGENT'] . ']');
41 41
 			
42 42
 		}
43 43
 		else
@@ -57,7 +57,7 @@  discard block
 block discarded – undo
57 57
 	//Set View
58 58
 	if(isset($_GET['view']))
59 59
 	{
60
-		switch ($_GET['view']) {
60
+		switch($_GET['view']) {
61 61
 			case 'comment':
62 62
 				$view = 'comment';
63 63
 				break;
@@ -115,7 +115,7 @@  discard block
 block discarded – undo
115 115
 				else
116 116
 				{
117 117
 					$newPositionStatus = $name;
118
-					error_log('User with JodelDeviceId:' . $deviceUid .  ' [' . $_SERVER['REMOTE_ADDR'] . '][' . $_SERVER ['HTTP_USER_AGENT'] . '] changed to Location: ' . $name);
118
+					error_log('User with JodelDeviceId:' . $deviceUid . ' [' . $_SERVER['REMOTE_ADDR'] . '][' . $_SERVER ['HTTP_USER_AGENT'] . '] changed to Location: ' . $name);
119 119
 				}
120 120
 			}
121 121
 		}
@@ -150,7 +150,7 @@  discard block
 block discarded – undo
150 150
 		if(isset($_POST['color']))
151 151
 		{
152 152
 			$color = $_POST['color'];
153
-			switch ($color) {
153
+			switch($color) {
154 154
 				case '8ABDB0':
155 155
 					$color = '8ABDB0';
156 156
 					break;
@@ -328,13 +328,13 @@  discard block
 block discarded – undo
328 328
 							else
329 329
 							{
330 330
 								$version = 'v2';
331
-								if($view=='comment')
331
+								if($view == 'comment')
332 332
 								{
333 333
 									$url = "/v2/posts/location/discussed/";
334 334
 								}
335 335
 								else
336 336
 								{
337
-									if($view=='upVote')
337
+									if($view == 'upVote')
338 338
 									{
339 339
 										$url = "/v2/posts/location/popular/";
340 340
 									}
@@ -358,7 +358,7 @@  discard block
 block discarded – undo
358 358
 							}
359 359
 							
360 360
 
361
-							for($i = 0; $i<$loops; $i++)
361
+							for($i = 0; $i < $loops; $i++)
362 362
 							{
363 363
 								if(array_key_exists($i, $posts) && array_key_exists('post_id', $posts[$i]) && isset($posts[$i]['post_id']))
364 364
 								{
@@ -402,7 +402,7 @@  discard block
 block discarded – undo
402 402
 								<?php if(isset($_GET['postID']) && isset($_GET['getPostDetails'])) { ?>
403 403
 								<h2>Comment on Jodel</h2>
404 404
 								<form method="POST">				
405
-										<input type="hidden" name="ancestor" value="<?php echo htmlspecialchars($_GET['postID']);?>" />
405
+										<input type="hidden" name="ancestor" value="<?php echo htmlspecialchars($_GET['postID']); ?>" />
406 406
 										<textarea id="message" name="message" placeholder="Send a comment on a Jodel to all students within 10km" required></textarea> 
407 407
 									<br />
408 408
 									<input type="submit" value="SEND" /> 
@@ -439,13 +439,13 @@  discard block
 block discarded – undo
439 439
 				<div class="col-sm-12">
440 440
 					<div class="row">
441 441
 						<div class="col-sm-3">
442
-							<a href="index.php" <?php if($view=='time') echo 'class="active"';?>><i class="fa fa-clock-o fa-3x"></i></a>
442
+							<a href="index.php" <?php if($view == 'time') echo 'class="active"'; ?>><i class="fa fa-clock-o fa-3x"></i></a>
443 443
 						</div>
444 444
 						<div class="col-sm-3">
445
-							<a href="index.php?view=comment" <?php if($view=='comment') echo 'class="active"';?>><i class="fa fa-commenting-o fa-3x"></i></a>
445
+							<a href="index.php?view=comment" <?php if($view == 'comment') echo 'class="active"'; ?>><i class="fa fa-commenting-o fa-3x"></i></a>
446 446
 						</div>
447 447
 						<div class="col-sm-3">
448
-							<a href="index.php?view=upVote" <?php if($view=='upVote') echo 'class="active"';?>><i class="fa fa-angle-up fa-3x"></i></a>
448
+							<a href="index.php?view=upVote" <?php if($view == 'upVote') echo 'class="active"'; ?>><i class="fa fa-angle-up fa-3x"></i></a>
449 449
 						</div>
450 450
 						<div class="col-sm-3">
451 451
 							<nav>
Please login to merge, or discard this patch.