Completed
Push — master ( b445b3...10c7a1 )
by mains
15:03
created
vote-ajax.php 2 patches
Indentation   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -6,8 +6,8 @@
 block discarded – undo
6 6
 {
7 7
 	error_log('test');
8 8
 	header('Content-Type: application/json');
9
-    echo json_encode($jodelAccountForKarma->votePostId($_GET['postId'], $_GET['vote']));
10
-    die();
9
+	echo json_encode($jodelAccountForKarma->votePostId($_GET['postId'], $_GET['vote']));
10
+	die();
11 11
 }
12 12
 
13 13
 if(isset($_GET['solution']) && isset($_POST['deviceUid']))
Please login to merge, or discard this patch.
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -21,7 +21,7 @@  discard block
 block discarded – undo
21 21
 if((!isset($_GET['pw']) || $config['pw'] != $_GET['pw']) && !isUserAdmin())
22 22
 {
23 23
 	error_log($_SERVER['REMOTE_ADDR']  . ' used a wrong password on vote-ajax.php');
24
-	$respone = array("message" => $_SERVER['REMOTE_ADDR']  . ' used a wrong password on vote-ajax.php',"success" => false);
24
+	$respone = array("message" => $_SERVER['REMOTE_ADDR']  . ' used a wrong password on vote-ajax.php',"success" => FALSE);
25 25
 	echo json_encode($response);
26 26
 	die();
27 27
 }
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 {
30 30
 
31 31
 $message = "";
32
-$success = true;
32
+$success = TRUE;
33 33
 $token = "";
34 34
 	if(isset($_POST['vote']) && isset($_POST['postId']))
35 35
 	{
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 					$response = array("success" => $jodelAccount->verifyCaptcha());
98 98
 					echo json_encode($response);
99 99
 					die();
100
-				$success = false;
100
+				$success = FALSE;
101 101
 			}
102 102
 			else
103 103
 			{
@@ -107,7 +107,7 @@  discard block
 block discarded – undo
107 107
 		else
108 108
 		{
109 109
 			$message = 'There is no account available for this jodel. Please create at least one new account to vote this jodel.';
110
-			$success = false;
110
+			$success = FALSE;
111 111
 		}
112 112
 	}
113 113
 
Please login to merge, or discard this patch.
templates/footer.php 1 patch
Spacing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 			  crossorigin="anonymous"></script>
6 6
 	    <script src="https://cdnjs.cloudflare.com/ajax/libs/tether/1.4.0/js/tether.min.js" integrity="sha384-DztdAPBWPRXSA/3eYEEUWrWCy7G5KFbe8fFjk5JAIxUYHKkDx6Qin1DkWx51bBrb" crossorigin="anonymous"></script>
7 7
 	    <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/js/bootstrap.min.js" integrity="sha384-vBWWzlZJ8ea9aCX4pEW3rVHjgjt7zpkNpZk+02D9phzyeVkE+jo0ieGizqPLForn" crossorigin="anonymous"></script>
8
-	    <script src="<?php echo $baseUrl;?>js/jQueryEmoji.js"></script>
8
+	    <script src="<?php echo $baseUrl; ?>js/jQueryEmoji.js"></script>
9 9
 	    <script src="https://cdnjs.cloudflare.com/ajax/libs/ekko-lightbox/5.1.1/ekko-lightbox.min.js" integrity="sha256-1odJPEl+KoMUaA1T7QNMGSSU/r5LCKCRC6SL8P0r2gY=" crossorigin="anonymous"></script>
10 10
 
11 11
 		<script>
@@ -37,7 +37,7 @@  discard block
 block discarded – undo
37 37
 			console.log(solution);
38 38
 			$.ajax({
39 39
 			  type: "POST",
40
-			  url: "<?php echo $baseUrl;?>vote-ajax.php?solution=" + solution + "&key="+key,
40
+			  url: "<?php echo $baseUrl; ?>vote-ajax.php?solution=" + solution + "&key="+key,
41 41
 			  data: {"deviceUid" : deviceUid},
42 42
 			  success: function(result){
43 43
 				  	var response = JSON.parse(result);
@@ -61,12 +61,12 @@  discard block
 block discarded – undo
61 61
 			{
62 62
 				window.history.back();
63 63
 			}
64
-		<?php if(isset($includeEmojiAndAjax)){ ?>
64
+		<?php if(isset($includeEmojiAndAjax)) { ?>
65 65
 
66 66
 			function vote(postId, vote, obj)
67 67
 			{
68 68
 				$.ajax({
69
-					url: '<?php echo $baseUrl;?>vote-ajax.php?postId=' + postId + '&vote=' + vote,
69
+					url: '<?php echo $baseUrl; ?>vote-ajax.php?postId=' + postId + '&vote=' + vote,
70 70
 					dataType: 'json',
71 71
 					async: true,
72 72
 					success: function(json)
@@ -120,7 +120,7 @@  discard block
 block discarded – undo
120 120
 				function getMorePosts(lastPostId, view, hashtag, old_lastPostId)
121 121
 				{
122 122
 					$.ajax({
123
-						url: '<?php echo $baseUrl;?>get-posts-ajax.php?lastPostId=' + lastPostId + '&view=' + view + '&hashtag=' + encodeURIComponent(hashtag),
123
+						url: '<?php echo $baseUrl; ?>get-posts-ajax.php?lastPostId=' + lastPostId + '&view=' + view + '&hashtag=' + encodeURIComponent(hashtag),
124 124
 						dataType: 'html',
125 125
 						async: false,
126 126
 						success: function(html) {
Please login to merge, or discard this patch.
templates/captcha.php 1 patch
Spacing   +2 added lines, -2 removed lines patch added patch discarded remove patch
@@ -5,7 +5,7 @@  discard block
 block discarded – undo
5 5
 ?>
6 6
 <div id="captchaWrapper">
7 7
 	<p>Check all images with Coons on it (Coons look like <img style="height: 1.0em; width: unset;" src="img/coon.png">).</p>
8
-	<img src="<?php echo $captcha['image_url'];?>">
8
+	<img src="<?php echo $captcha['image_url']; ?>">
9 9
 	<div class='captchaWrapper'>
10 10
 		<input id='box_0' type='checkbox'>
11 11
 		<input id='box_1' type='checkbox'>
@@ -17,5 +17,5 @@  discard block
 block discarded – undo
17 17
 		<input id='box_7' type='checkbox'>
18 18
 		<input id='box_8' type='checkbox'>
19 19
 	</div>
20
-	<button onClick="verifyAccount('<?php echo $captcha['key'];?>','<?php echo $jodelAccountForView->deviceUid?>')">Verify</button>
20
+	<button onClick="verifyAccount('<?php echo $captcha['key']; ?>','<?php echo $jodelAccountForView->deviceUid?>')">Verify</button>
21 21
 </div>
22 22
\ No newline at end of file
Please login to merge, or discard this patch.
templates/header.php 1 patch
Spacing   +32 added lines, -32 removed lines patch added patch discarded remove patch
@@ -1,53 +1,53 @@
 block discarded – undo
1 1
 <!DOCTYPE html>
2 2
 <html lang="en">
3 3
 	<head>
4
-		<title><?php echo $title;?></title>
4
+		<title><?php echo $title; ?></title>
5 5
 		
6 6
 		<meta charset="utf-8">
7 7
 		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
8 8
 		<meta http-equiv="x-ua-compatible" content="ie=edge">
9 9
 		
10
-		<meta name="description" content="<?php echo $description;?>">
10
+		<meta name="description" content="<?php echo $description; ?>">
11 11
 		<meta name="keywords" content="jodelblue, jodel, blue, webclient, web, client, web-app, browser, app">
12 12
 		
13 13
 		<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.6/css/bootstrap.min.css" integrity="sha384-rwoIResjU2yc3z8GV/NPeZWAv56rSmLldC3R/AZzGRnGxQQKnKkoFVhFQhNUwEyJ" crossorigin="anonymous">
14 14
 		<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/ekko-lightbox/5.1.1/ekko-lightbox.min.css" integrity="sha256-8aNQFtmxcOMVoOhLD4mrHqaKC2Ui++LmlQsoKTqxwIE=" crossorigin="anonymous" />
15
-		<link rel="stylesheet" href="<?php echo $baseUrl;?>css/font-awesome.min.css">
16
-		<link rel="stylesheet" href="<?php echo $baseUrl;?>style.css" type="text/css">
15
+		<link rel="stylesheet" href="<?php echo $baseUrl; ?>css/font-awesome.min.css">
16
+		<link rel="stylesheet" href="<?php echo $baseUrl; ?>style.css" type="text/css">
17 17
 		
18
-		<link rel="shortcut icon" type="image/x-icon" href="<?php echo $baseUrl;?>img/favicon/favicon.ico">
19
-		<link rel="icon" type="image/x-icon" href="<?php echo $baseUrl;?>img/favicon/favicon.ico">
20
-		<link rel="icon" type="image/gif" href="<?php echo $baseUrl;?>img/favicon/favicon.gif">
21
-		<link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon.png">
22
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon.png">
23
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-57x57.png" sizes="57x57">
24
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-60x60.png" sizes="60x60">
25
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-72x72.png" sizes="72x72">
26
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-76x76.png" sizes="76x76">
27
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-114x114.png" sizes="114x114">
28
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-120x120.png" sizes="120x120">
29
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-128x128.png" sizes="128x128">
30
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-144x144.png" sizes="144x144">
31
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-152x152.png" sizes="152x152">
32
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-180x180.png" sizes="180x180">
33
-		<link rel="apple-touch-icon" href="<?php echo $baseUrl;?>img/favicon/apple-touch-icon-precomposed.png">
34
-		<link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon-16x16.png" sizes="16x16">
35
-		<link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon-32x32.png" sizes="32x32">
36
-		<link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon-96x96.png" sizes="96x96">
37
-		<link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon-160x160.png" sizes="160x160">
38
-		<link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon-192x192.png" sizes="192x192">
39
-		<link rel="icon" type="image/png" href="<?php echo $baseUrl;?>img/favicon/favicon-196x196.png" sizes="196x196">
40
-		<meta name="msapplication-TileImage" content="<?php echo $baseUrl;?>img/favicon/win8-tile-144x144.png"> 
18
+		<link rel="shortcut icon" type="image/x-icon" href="<?php echo $baseUrl; ?>img/favicon/favicon.ico">
19
+		<link rel="icon" type="image/x-icon" href="<?php echo $baseUrl; ?>img/favicon/favicon.ico">
20
+		<link rel="icon" type="image/gif" href="<?php echo $baseUrl; ?>img/favicon/favicon.gif">
21
+		<link rel="icon" type="image/png" href="<?php echo $baseUrl; ?>img/favicon/favicon.png">
22
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon.png">
23
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-57x57.png" sizes="57x57">
24
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-60x60.png" sizes="60x60">
25
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-72x72.png" sizes="72x72">
26
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-76x76.png" sizes="76x76">
27
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-114x114.png" sizes="114x114">
28
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-120x120.png" sizes="120x120">
29
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-128x128.png" sizes="128x128">
30
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-144x144.png" sizes="144x144">
31
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-152x152.png" sizes="152x152">
32
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-180x180.png" sizes="180x180">
33
+		<link rel="apple-touch-icon" href="<?php echo $baseUrl; ?>img/favicon/apple-touch-icon-precomposed.png">
34
+		<link rel="icon" type="image/png" href="<?php echo $baseUrl; ?>img/favicon/favicon-16x16.png" sizes="16x16">
35
+		<link rel="icon" type="image/png" href="<?php echo $baseUrl; ?>img/favicon/favicon-32x32.png" sizes="32x32">
36
+		<link rel="icon" type="image/png" href="<?php echo $baseUrl; ?>img/favicon/favicon-96x96.png" sizes="96x96">
37
+		<link rel="icon" type="image/png" href="<?php echo $baseUrl; ?>img/favicon/favicon-160x160.png" sizes="160x160">
38
+		<link rel="icon" type="image/png" href="<?php echo $baseUrl; ?>img/favicon/favicon-192x192.png" sizes="192x192">
39
+		<link rel="icon" type="image/png" href="<?php echo $baseUrl; ?>img/favicon/favicon-196x196.png" sizes="196x196">
40
+		<meta name="msapplication-TileImage" content="<?php echo $baseUrl; ?>img/favicon/win8-tile-144x144.png"> 
41 41
 		<meta name="msapplication-TileColor" content="#5682a3"> 
42 42
 		<meta name="msapplication-navbutton-color" content="#5682a3"> 
43 43
 		<meta name="application-name" content="JodelBlue"/> 
44 44
 		<meta name="msapplication-tooltip" content="JodelBlue"/> 
45 45
 		<meta name="apple-mobile-web-app-title" content="JodelBlue"/> 
46
-		<meta name="msapplication-square70x70logo" content="<?php echo $baseUrl;?>img/favicon/win8-tile-70x70.png"> 
47
-		<meta name="msapplication-square144x144logo" content="<?php echo $baseUrl;?>img/favicon/win8-tile-144x144.png"> 
48
-		<meta name="msapplication-square150x150logo" content="<?php echo $baseUrl;?>img/favicon/win8-tile-150x150.png"> 
49
-		<meta name="msapplication-wide310x150logo" content="<?php echo $baseUrl;?>img/favicon/win8-tile-310x150.png"> 
50
-		<meta name="msapplication-square310x310logo" content="<?php echo $baseUrl;?>img/favicon/win8-tile-310x310.png"> 
46
+		<meta name="msapplication-square70x70logo" content="<?php echo $baseUrl; ?>img/favicon/win8-tile-70x70.png"> 
47
+		<meta name="msapplication-square144x144logo" content="<?php echo $baseUrl; ?>img/favicon/win8-tile-144x144.png"> 
48
+		<meta name="msapplication-square150x150logo" content="<?php echo $baseUrl; ?>img/favicon/win8-tile-150x150.png"> 
49
+		<meta name="msapplication-wide310x150logo" content="<?php echo $baseUrl; ?>img/favicon/win8-tile-310x150.png"> 
50
+		<meta name="msapplication-square310x310logo" content="<?php echo $baseUrl; ?>img/favicon/win8-tile-310x310.png"> 
51 51
 	</head>
52 52
 
53 53
 	<body>
Please login to merge, or discard this patch.
index.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -104,7 +104,7 @@  discard block
 block discarded – undo
104 104
 				</article>
105 105
 			
106 106
 				<aside class="topSidebar col-sm-4 sidebar-outer">
107
-					<div class="fixed<?php if(!$view->isDetailedView) echo(' hide-mobile');?>">
107
+					<div class="fixed<?php if(!$view->isDetailedView) echo(' hide-mobile'); ?>">
108 108
 						<article>
109 109
 							<div>
110 110
 								<h2>Position / Hashtag</h2>
@@ -141,7 +141,7 @@  discard block
 block discarded – undo
141 141
 									if(isset($_GET['postId']) && isset($_GET['getPostDetails'])) { ?>
142 142
 									<h2>Comment on Jodel</h2>
143 143
 									<form method="POST">				
144
-											<input type="hidden" name="ancestor" value="<?php echo htmlspecialchars($_GET['postId']);?>" />
144
+											<input type="hidden" name="ancestor" value="<?php echo htmlspecialchars($_GET['postId']); ?>" />
145 145
 											<textarea id="message" name="message" placeholder="Send a comment on a Jodel to all students within 10km" required></textarea> 
146 146
 										<br />
147 147
 										<input type="submit" value="SEND" /> 
@@ -203,7 +203,7 @@  discard block
 block discarded – undo
203 203
 					</div>
204 204
 				</aside>
205 205
 			</div>
206
-			<?php include 'templates/nav-bottom.php';?>
206
+			<?php include 'templates/nav-bottom.php'; ?>
207 207
 		</div>
208 208
 		<?php
209 209
 			$includeEmojiAndAjax = TRUE;
Please login to merge, or discard this patch.
Braces   +21 added lines, -6 removed lines patch added patch discarded remove patch
@@ -96,7 +96,9 @@  discard block
 block discarded – undo
96 96
 							} ?>
97 97
 					</content>
98 98
 					
99
-					<?php if(!isset($_GET['postId']) && !isset($_GET['getPostDetails'])) { ?>
99
+					<?php if(!isset($_GET['postId']) && !isset($_GET['getPostDetails']))
100
+{
101
+?>
100 102
 						<p id="loading">
101 103
 							Loading…
102 104
 						</p>
@@ -104,12 +106,20 @@  discard block
 block discarded – undo
104 106
 				</article>
105 107
 			
106 108
 				<aside class="topSidebar col-sm-4 sidebar-outer">
107
-					<div class="fixed<?php if(!$view->isDetailedView) echo(' hide-mobile');?>">
109
+					<div class="fixed<?php if(!$view->isDetailedView)
110
+{
111
+	echo(' hide-mobile');
112
+}
113
+?>">
108 114
 						<article>
109 115
 							<div>
110 116
 								<h2>Position / Hashtag</h2>
111 117
 								<form action="index.php" method="get">
112
-									<input type="text" id="city" name="search" placeholder="<?php if(isset($newPositionStatus)) echo $newPositionStatus; ?>" required>
118
+									<input type="text" id="city" name="search" placeholder="<?php if(isset($newPositionStatus))
119
+{
120
+	echo $newPositionStatus;
121
+}
122
+?>" required>
113 123
 									<label>try: #jhj</label><br>
114 124
 									<input type="submit" value="Set Location" /> 
115 125
 								</form>
@@ -126,7 +136,7 @@  discard block
 block discarded – undo
126 136
 						<article>
127 137
 							<div>
128 138
 								<?php if(!$jodelAccountForView->isAccountVerified())
129
-								{
139
+{
130 140
 								?>
131 141
 								<h2>New Jodel</h2>
132 142
 								
@@ -138,7 +148,9 @@  discard block
 block discarded – undo
138 148
 								{
139 149
 
140 150
 
141
-									if(isset($_GET['postId']) && isset($_GET['getPostDetails'])) { ?>
151
+									if(isset($_GET['postId']) && isset($_GET['getPostDetails']))
152
+									{
153
+?>
142 154
 									<h2>Comment on Jodel</h2>
143 155
 									<form method="POST">				
144 156
 											<input type="hidden" name="ancestor" value="<?php echo htmlspecialchars($_GET['postId']);?>" />
@@ -146,7 +158,10 @@  discard block
 block discarded – undo
146 158
 										<br />
147 159
 										<input type="submit" value="SEND" /> 
148 160
 									</form>
149
-										<?php } else { ?>
161
+										<?php }
162
+else
163
+{
164
+?>
150 165
 									<h2>New Jodel</h2>
151 166
 									<form enctype="multipart/form-data" method="POST">
152 167
 										<textarea id="message" name="message" placeholder="Send a Jodel to all students within 10km" required></textarea> 
Please login to merge, or discard this patch.