Completed
Push — master ( 306300...8aacdd )
by mains
02:51
created
index.php 2 patches
Spacing   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -1,14 +1,14 @@  discard block
 block discarded – undo
1
-<?php include 'php/jodel-web.php';?>
1
+<?php include 'php/jodel-web.php'; ?>
2 2
 <!DOCTYPE html>
3 3
 <html lang="en">
4 4
 	<head>
5
-		<title><?php echo $viewTest::getTitle($posts[0], $view, $isDetailedView);?></title>
5
+		<title><?php echo $viewTest::getTitle($posts[0], $view, $isDetailedView); ?></title>
6 6
 		
7 7
 		<meta charset="utf-8">
8 8
 		<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
9 9
 		<meta http-equiv="x-ua-compatible" content="ie=edge">
10 10
 		
11
-		<meta name="description" content="<?php echo $viewTest::getMetaDescription($posts[0], $view, $isDetailedView);?>">
11
+		<meta name="description" content="<?php echo $viewTest::getMetaDescription($posts[0], $view, $isDetailedView); ?>">
12 12
 		<meta name="keywords" content="jodelblue, jodel, blue, webclient, web, client, web-app, browser, app">
13 13
 		
14 14
 		<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0-alpha.5/css/bootstrap.min.css" integrity="sha384-AysaV+vQoT3kOAXZkl02PThvDr8HYKPZhNT5h/CXfBThSRXQ6jW5DO2ekP5ViFdi" crossorigin="anonymous">
@@ -90,7 +90,7 @@  discard block
 block discarded – undo
90 90
 
91 91
 					<content id="posts">
92 92
 						<?php
93
-							for($i = 0; $i<$loops; $i++)
93
+							for($i = 0; $i < $loops; $i++)
94 94
 							{
95 95
 								if(array_key_exists($i, $posts) && array_key_exists('post_id', $posts[$i]) && isset($posts[$i]['post_id']))
96 96
 								{
@@ -134,7 +134,7 @@  discard block
 block discarded – undo
134 134
 								<?php if(isset($_GET['postId']) && isset($_GET['getPostDetails'])) { ?>
135 135
 								<h2>Comment on Jodel</h2>
136 136
 								<form method="POST">				
137
-										<input type="hidden" name="ancestor" value="<?php echo htmlspecialchars($_GET['postId']);?>" />
137
+										<input type="hidden" name="ancestor" value="<?php echo htmlspecialchars($_GET['postId']); ?>" />
138 138
 										<textarea id="message" name="message" placeholder="Send a comment on a Jodel to all students within 10km" required></textarea> 
139 139
 									<br />
140 140
 									<input type="submit" value="SEND" /> 
@@ -171,13 +171,13 @@  discard block
 block discarded – undo
171 171
 				<div class="col-xs-12">
172 172
 					<div class="row">
173 173
 						<div class="col-xs-3">
174
-							<a href="index.php" <?php if($view=='time') echo 'class="active"';?>><i class="fa fa-clock-o fa-3x"></i></a>
174
+							<a href="index.php" <?php if($view == 'time') echo 'class="active"'; ?>><i class="fa fa-clock-o fa-3x"></i></a>
175 175
 						</div>
176 176
 						<div class="col-xs-3">
177
-							<a href="index.php?view=comment" <?php if($view=='comment') echo 'class="active"';?>><i class="fa fa-commenting-o fa-3x"></i></a>
177
+							<a href="index.php?view=comment" <?php if($view == 'comment') echo 'class="active"'; ?>><i class="fa fa-commenting-o fa-3x"></i></a>
178 178
 						</div>
179 179
 						<div class="col-xs-3">
180
-							<a href="index.php?view=upVote" <?php if($view=='upVote') echo 'class="active"';?>><i class="fa fa-angle-up fa-3x"></i></a>
180
+							<a href="index.php?view=upVote" <?php if($view == 'upVote') echo 'class="active"'; ?>><i class="fa fa-angle-up fa-3x"></i></a>
181 181
 						</div>
182 182
 						<div class="col-xs-3">
183 183
 							<nav>
Please login to merge, or discard this patch.
Braces   +38 added lines, -9 removed lines patch added patch discarded remove patch
@@ -75,7 +75,11 @@  discard block
 block discarded – undo
75 75
 
76 76
 					<div id="location_mobile" class="hidden-sm-up">
77 77
 						<form method="get">
78
-							<input type="text" id="city_mobile" name="city" placeholder="<?php if(isset($newPositionStatus)) echo $newPositionStatus; ?>" required>
78
+							<input type="text" id="city_mobile" name="city" placeholder="<?php if(isset($newPositionStatus))
79
+{
80
+	echo $newPositionStatus;
81
+}
82
+?>" required>
79 83
 
80 84
 							<input type="submit" id="submit_mobile" class="fa" value="&#xf0ac;" />
81 85
 						</form>
@@ -102,7 +106,9 @@  discard block
 block discarded – undo
102 106
 
103 107
 					</content>
104 108
 					
105
-					<?php if(!isset($_GET['postId']) && !isset($_GET['getPostDetails'])) { ?>
109
+					<?php if(!isset($_GET['postId']) && !isset($_GET['getPostDetails']))
110
+{
111
+?>
106 112
 						<p id="loading">
107 113
 							Loading…
108 114
 						</p>
@@ -115,7 +121,11 @@  discard block
 block discarded – undo
115 121
 							<div>
116 122
 								<h2>Position / Hashtag</h2>
117 123
 								<form method="get">
118
-									<input type="text" id="city" name="city" placeholder="<?php if(isset($newPositionStatus)) echo $newPositionStatus; ?>" required>
124
+									<input type="text" id="city" name="city" placeholder="<?php if(isset($newPositionStatus))
125
+{
126
+	echo $newPositionStatus;
127
+}
128
+?>" required>
119 129
 									<label>try: #jhj</label><br>
120 130
 									<input type="submit" value="Set Location" /> 
121 131
 								</form>
@@ -131,7 +141,9 @@  discard block
 block discarded – undo
131 141
 
132 142
 						<article>
133 143
 							<div>
134
-								<?php if(isset($_GET['postId']) && isset($_GET['getPostDetails'])) { ?>
144
+								<?php if(isset($_GET['postId']) && isset($_GET['getPostDetails']))
145
+{
146
+?>
135 147
 								<h2>Comment on Jodel</h2>
136 148
 								<form method="POST">				
137 149
 										<input type="hidden" name="ancestor" value="<?php echo htmlspecialchars($_GET['postId']);?>" />
@@ -139,7 +151,10 @@  discard block
 block discarded – undo
139 151
 									<br />
140 152
 									<input type="submit" value="SEND" /> 
141 153
 								</form>
142
-									<?php } else { ?>
154
+									<?php }
155
+else
156
+{
157
+?>
143 158
 								<h2>New Jodel</h2>
144 159
 								<form method="POST">
145 160
 									<textarea id="message" name="message" placeholder="Send a Jodel to all students within 10km" required></textarea> 
@@ -171,13 +186,25 @@  discard block
 block discarded – undo
171 186
 				<div class="col-xs-12">
172 187
 					<div class="row">
173 188
 						<div class="col-xs-3">
174
-							<a href="index.php" <?php if($view=='time') echo 'class="active"';?>><i class="fa fa-clock-o fa-3x"></i></a>
189
+							<a href="index.php" <?php if($view=='time')
190
+{
191
+	echo 'class="active"';
192
+}
193
+?>><i class="fa fa-clock-o fa-3x"></i></a>
175 194
 						</div>
176 195
 						<div class="col-xs-3">
177
-							<a href="index.php?view=comment" <?php if($view=='comment') echo 'class="active"';?>><i class="fa fa-commenting-o fa-3x"></i></a>
196
+							<a href="index.php?view=comment" <?php if($view=='comment')
197
+{
198
+	echo 'class="active"';
199
+}
200
+?>><i class="fa fa-commenting-o fa-3x"></i></a>
178 201
 						</div>
179 202
 						<div class="col-xs-3">
180
-							<a href="index.php?view=upVote" <?php if($view=='upVote') echo 'class="active"';?>><i class="fa fa-angle-up fa-3x"></i></a>
203
+							<a href="index.php?view=upVote" <?php if($view=='upVote')
204
+{
205
+	echo 'class="active"';
206
+}
207
+?>><i class="fa fa-angle-up fa-3x"></i></a>
181 208
 						</div>
182 209
 						<div class="col-xs-3">
183 210
 							<nav>
@@ -218,7 +245,9 @@  discard block
 block discarded – undo
218 245
 				    $('html,body').animate({scrollTop: aTag.offset().top-90},'slow');
219 246
 				}
220 247
 
221
-				<?php if(!isset($_GET['postId']) && !isset($_GET['getPostDetails'])) { ?>
248
+				<?php if(!isset($_GET['postId']) && !isset($_GET['getPostDetails']))
249
+{
250
+?>
222 251
 
223 252
 				
224 253
 
Please login to merge, or discard this patch.
php/JodelAccount.php 1 patch
Spacing   +12 added lines, -12 removed lines patch added patch discarded remove patch
@@ -35,7 +35,7 @@  discard block
 block discarded – undo
35 35
         {
36 36
             $this->refreshToken();
37 37
         }
38
-        $this->accessToken  = $this->getAccessToken();
38
+        $this->accessToken = $this->getAccessToken();
39 39
     }
40 40
 
41 41
     function isAccountVerified()
@@ -94,7 +94,7 @@  discard block
 block discarded – undo
94 94
                     }
95 95
                     else
96 96
                     {
97
-                        error_log('User with JodelDeviceId:' . $this->deviceUid .  ' [' . $_SERVER['REMOTE_ADDR'] . '][' . $_SERVER ['HTTP_USER_AGENT'] . '] changed to Location: ' . $name);
97
+                        error_log('User with JodelDeviceId:' . $this->deviceUid . ' [' . $_SERVER['REMOTE_ADDR'] . '][' . $_SERVER ['HTTP_USER_AGENT'] . '] changed to Location: ' . $name);
98 98
                     }
99 99
                 }
100 100
 
@@ -106,11 +106,11 @@  discard block
 block discarded – undo
106 106
     function getLocation()
107 107
     {
108 108
         $db = new DatabaseConnect();
109
-        $result = $db->query("SELECT * FROM accounts WHERE device_uid='" . $this->deviceUid  . "'");
109
+        $result = $db->query("SELECT * FROM accounts WHERE device_uid='" . $this->deviceUid . "'");
110 110
         
111 111
         $location = new Location();
112 112
         
113
-        if ($result->num_rows > 0)
113
+        if($result->num_rows > 0)
114 114
         {
115 115
             // output data of each row
116 116
             while($row = $result->fetch_assoc())
@@ -211,7 +211,7 @@  discard block
 block discarded – undo
211 211
         if(isset($_POST['color']))
212 212
         {
213 213
             $color = $_POST['color'];
214
-            switch ($color) {
214
+            switch($color) {
215 215
                 case '8ABDB0':
216 216
                     $color = '8ABDB0';
217 217
                     break;
@@ -267,7 +267,7 @@  discard block
 block discarded – undo
267 267
 
268 268
         $access_token;
269 269
 
270
-        if ($result->num_rows > 0)
270
+        if($result->num_rows > 0)
271 271
         {
272 272
                 // output data of each row
273 273
                 while($row = $result->fetch_assoc()) {
@@ -299,7 +299,7 @@  discard block
 block discarded – undo
299 299
                                         expiration_date='" . $expiration_date . "'
300 300
                                     WHERE device_uid='" . $device_uid . "'");
301 301
 
302
-            if($result === false){
302
+            if($result === false) {
303 303
                     echo "Adding account failed: (" . $db->errno . ") " . $db->error;
304 304
             }   
305 305
         }
@@ -317,11 +317,11 @@  discard block
 block discarded – undo
317 317
     function getAccessToken()
318 318
     {
319 319
         $db = new DatabaseConnect();
320
-        $result = $db->query("SELECT * FROM accounts WHERE device_uid='" . $this->deviceUid  . "'");
320
+        $result = $db->query("SELECT * FROM accounts WHERE device_uid='" . $this->deviceUid . "'");
321 321
         
322 322
         $accessToken;
323 323
         
324
-        if ($result->num_rows > 0)
324
+        if($result->num_rows > 0)
325 325
         {
326 326
             // output data of each row
327 327
             while($row = $result->fetch_assoc())
@@ -389,7 +389,7 @@  discard block
 block discarded – undo
389 389
         $result = $db->query("INSERT INTO votes (device_uid, postId, type)
390 390
                         VALUES ('" . $this->deviceUid . "','" . $postId . "','" . $voteType . "')");
391 391
         
392
-        if($result === false){
392
+        if($result === false) {
393 393
                 $error = db_error();
394 394
                 echo $error;
395 395
                 echo "Adding Vote failed: (" . $result->errno . ") " . $result->error;
@@ -417,11 +417,11 @@  discard block
 block discarded – undo
417 417
         $result = $db->query("INSERT INTO accounts (access_token, refresh_token, token_type,
418 418
                         expires_in, expiration_date, distinct_id, device_uid, name, lat, lng)
419 419
                         VALUES ('" . $access_token . "','" . $refresh_token . "','" . $token_type .
420
-                        "','" .  $expires_in . "','" . $expiration_date . "','" . $distinct_id .
420
+                        "','" . $expires_in . "','" . $expiration_date . "','" . $distinct_id .
421 421
                         "','" . $device_uid . "','" . $name . "','" . $lat . "','" . $lng . "') ");
422 422
 
423 423
         $success = TRUE;
424
-        if($result === false){
424
+        if($result === false) {
425 425
                 $error = db_error();
426 426
                 echo $error;
427 427
                 echo "Adding account failed: (" . $result->errno . ") " . $result->error;
Please login to merge, or discard this patch.
php/View.php 2 patches
Spacing   +16 added lines, -16 removed lines patch added patch discarded remove patch
@@ -24,25 +24,25 @@  discard block
 block discarded – undo
24 24
         $timediff_inDays = (string)$timediff->format('%d');
25 25
         $timediff_inMonth = (string)$timediff->format('%m');
26 26
 
27
-        if($timediff_inMonth!=0)
27
+        if($timediff_inMonth != 0)
28 28
         {
29 29
                 $timediff = $timediff_inMonth . "m";
30 30
         }
31 31
         else
32 32
         {
33
-            if($timediff_inDays!=0)
33
+            if($timediff_inDays != 0)
34 34
             {
35 35
                 $timediff = $timediff_inDays . "d";
36 36
             }
37 37
             else
38 38
             {
39
-                if($timediff_inHours!=0)
39
+                if($timediff_inHours != 0)
40 40
                 {
41 41
                     $timediff = $timediff_inHours . "h";
42 42
                 }
43 43
                 else
44 44
                 {
45
-                    if($timediff_inMinutes!=0)
45
+                    if($timediff_inMinutes != 0)
46 46
                     {
47 47
                         $timediff = $timediff_inMinutes . "m";
48 48
                     }
@@ -56,7 +56,7 @@  discard block
 block discarded – undo
56 56
 
57 57
 
58 58
         ?>
59
-        <article id ="postId-<?php echo $post['post_id']; ?>" class="jodel" style="background-color: #<?php echo $post['color'];?>;">
59
+        <article id ="postId-<?php echo $post['post_id']; ?>" class="jodel" style="background-color: #<?php echo $post['color']; ?>;">
60 60
             <content>
61 61
                 <?php 
62 62
                 if(isset($post['image_url']))
@@ -74,24 +74,24 @@  discard block
 block discarded – undo
74 74
                 <?php
75 75
                     if($isDetailedView)
76 76
                     {?>
77
-                        <a href="index.php?vote=up&getPostDetails=true&postId=<?php echo $post['post_id'];?>&postId_parent=<?php echo htmlspecialchars($_GET['postId']);?>" rel="nofollow">
77
+                        <a href="index.php?vote=up&getPostDetails=true&postId=<?php echo $post['post_id']; ?>&postId_parent=<?php echo htmlspecialchars($_GET['postId']); ?>" rel="nofollow">
78 78
               <?php }
79 79
                     else
80 80
                     {?>
81
-                        <a href="index.php?vote=up&postId=<?php echo $post['post_id'];?>" rel="nofollow">
81
+                        <a href="index.php?vote=up&postId=<?php echo $post['post_id']; ?>" rel="nofollow">
82 82
               <?php } ?>
83 83
                             <i class="fa fa-angle-up fa-3x"></i>
84 84
                         </a>    
85 85
                             <br />
86
-                        <?php echo $post["vote_count"];?><br />
86
+                        <?php echo $post["vote_count"]; ?><br />
87 87
                 <?php
88 88
                     if($isDetailedView)
89 89
                     {?>
90
-                        <a href="index.php?vote=down&getPostDetails=true&postId=<?php echo $post['post_id'];?>&postId_parent=<?php echo htmlspecialchars($_GET['postId']);?>" rel="nofollow">
90
+                        <a href="index.php?vote=down&getPostDetails=true&postId=<?php echo $post['post_id']; ?>&postId_parent=<?php echo htmlspecialchars($_GET['postId']); ?>" rel="nofollow">
91 91
               <?php }
92 92
                     else
93 93
                     {?>
94
-                        <a href="index.php?vote=down&postId=<?php echo $post['post_id'];?>" rel="nofollow">
94
+                        <a href="index.php?vote=down&postId=<?php echo $post['post_id']; ?>" rel="nofollow">
95 95
               <?php } ?>
96 96
                             <i class="fa fa-angle-down fa-3x"></i>
97 97
                         </a>
@@ -103,14 +103,14 @@  discard block
 block discarded – undo
103 103
                         <td class="time">
104 104
                             <span class="tip" data-tooltip="Time">
105 105
                                 <i class="fa fa-clock-o"></i>
106
-                                <?php echo $timediff;?>
107
-                                <span class="tiptext"><?php echo $d->format('Y-m-d H:i:s');?></span>
106
+                                <?php echo $timediff; ?>
107
+                                <span class="tiptext"><?php echo $d->format('Y-m-d H:i:s'); ?></span>
108 108
                             </span> 
109 109
                         </td>
110 110
                         <td class="comments">
111 111
                             <?php if(!$isDetailedView) {?>
112 112
                             <span data-tooltip="Comments">
113
-                                <a href="index.php?getPostDetails=true&view=<?php echo $view;?>&postId=<?php echo $post["post_id"];?>">
113
+                                <a href="index.php?getPostDetails=true&view=<?php echo $view; ?>&postId=<?php echo $post["post_id"]; ?>">
114 114
                                     <i class="fa fa-commenting-o"></i>
115 115
                                     <?php if(array_key_exists("child_count", $post)) {
116 116
                                                 echo $post["child_count"];
@@ -139,7 +139,7 @@  discard block
 block discarded – undo
139 139
                                         {
140 140
                                             ?>
141 141
                                             <span data-tooltip="Author">
142
-                                                <i class="fa fa-user-o"></i> #<?php echo $post["user_handle"];?> |
142
+                                                <i class="fa fa-user-o"></i> #<?php echo $post["user_handle"]; ?> |
143 143
                                             </span>
144 144
                                             <?php
145 145
                                         }
@@ -149,8 +149,8 @@  discard block
 block discarded – undo
149 149
 
150 150
                             <span class="tip" data-tooltip="Distance">
151 151
                                 <i class="fa fa-map-marker"></i>
152
-                                <?php echo $post['distance'];?> km
153
-                                <span class="tiptext"><?php echo $post['location']['name'];?></span>
152
+                                <?php echo $post['distance']; ?> km
153
+                                <span class="tiptext"><?php echo $post['location']['name']; ?></span>
154 154
                             </span>
155 155
                         </td>
156 156
                     </tr>
Please login to merge, or discard this patch.
Braces   +24 added lines, -12 removed lines patch added patch discarded remove patch
@@ -9,7 +9,8 @@  discard block
 block discarded – undo
9 9
 	 * Compute HTML Code
10 10
 	 */
11 11
  	function jodelToHtml($post, $view = 'time', $isDetailedView = FALSE)
12
-    {   //ToDO
12
+ 	{
13
+//ToDO
13 14
         //Replace # with link
14 15
         //preg_replace('~(\#)([^\s!,. /()"\'?]+)~', '<a href="tag/$2">#$2</a>', $text);
15 16
 
@@ -65,7 +66,8 @@  discard block
 block discarded – undo
65 66
 
66 67
                     echo '<img src="' . $post['image_url'] . '" alt="' . htmlspecialchars(preg_replace($regexRest, '', $post['message'])) . '">';
67 68
                 }
68
-                else {
69
+                else
70
+                {
69 71
                     echo str_replace('  ', ' &nbsp;', nl2br(htmlspecialchars($post['message'])));
70 72
                 }
71 73
                 ?>
@@ -73,11 +75,13 @@  discard block
 block discarded – undo
73 75
             <aside>
74 76
                 <?php
75 77
                     if($isDetailedView)
76
-                    {?>
78
+                    {
79
+?>
77 80
                         <a href="index.php?vote=up&getPostDetails=true&postId=<?php echo $post['post_id'];?>&postId_parent=<?php echo htmlspecialchars($_GET['postId']);?>" rel="nofollow">
78 81
               <?php }
79
-                    else
80
-                    {?>
82
+else
83
+                    {
84
+?>
81 85
                         <a href="index.php?vote=up&postId=<?php echo $post['post_id'];?>" rel="nofollow">
82 86
               <?php } ?>
83 87
                             <i class="fa fa-angle-up fa-3x"></i>
@@ -86,11 +90,13 @@  discard block
 block discarded – undo
86 90
                         <?php echo $post["vote_count"];?><br />
87 91
                 <?php
88 92
                     if($isDetailedView)
89
-                    {?>
93
+                    {
94
+?>
90 95
                         <a href="index.php?vote=down&getPostDetails=true&postId=<?php echo $post['post_id'];?>&postId_parent=<?php echo htmlspecialchars($_GET['postId']);?>" rel="nofollow">
91 96
               <?php }
92
-                    else
93
-                    {?>
97
+else
98
+                    {
99
+?>
94 100
                         <a href="index.php?vote=down&postId=<?php echo $post['post_id'];?>" rel="nofollow">
95 101
               <?php } ?>
96 102
                             <i class="fa fa-angle-down fa-3x"></i>
@@ -108,13 +114,19 @@  discard block
 block discarded – undo
108 114
                             </span> 
109 115
                         </td>
110 116
                         <td class="comments">
111
-                            <?php if(!$isDetailedView) {?>
117
+                            <?php if(!$isDetailedView)
118
+{
119
+?>
112 120
                             <span data-tooltip="Comments">
113 121
                                 <a href="index.php?getPostDetails=true&view=<?php echo $view;?>&postId=<?php echo $post["post_id"];?>">
114 122
                                     <i class="fa fa-commenting-o"></i>
115
-                                    <?php if(array_key_exists("child_count", $post)) {
123
+                                    <?php if(array_key_exists("child_count", $post))
124
+{
116 125
                                                 echo $post["child_count"];
117
-                                            } else echo "0";
126
+                                            }
127
+                                            else {
128
+                                            	echo "0";
129
+                                            }
118 130
                                     ?>
119 131
                                     </a>
120 132
                             </span>
@@ -230,7 +242,7 @@  discard block
 block discarded – undo
230 242
 	}
231 243
 
232 244
 	function getPosts($lastPostId, $accessToken, $url, $version = 'v2')
233
-	{	
245
+	{
234 246
 		$accountCreator = new GetPosts();
235 247
 		$accountCreator->setLastPostId($lastPostId);
236 248
 		$accountCreator->setAccessToken($accessToken);
Please login to merge, or discard this patch.
php/jodel-web.php 1 patch
Braces   +7 added lines, -5 removed lines patch added patch discarded remove patch
@@ -97,7 +97,7 @@  discard block
 block discarded – undo
97 97
 	}
98 98
 	
99 99
 	if(configPropertyExists($config, 'karmaDeviceUid'))
100
-    {
100
+	{
101 101
     	$jodelAccountForKarma = new JodelAccount($config['karmaDeviceUid']);
102 102
     }
103 103
     else
@@ -114,7 +114,8 @@  discard block
 block discarded – undo
114 114
 	//Set View
115 115
 	if(isset($_GET['view']))
116 116
 	{
117
-		switch ($_GET['view']) {
117
+		switch ($_GET['view'])
118
+		{
118 119
 			case 'comment':
119 120
 				$view = 'comment';
120 121
 				break;
@@ -151,7 +152,7 @@  discard block
 block discarded – undo
151 152
 	{
152 153
 		$jodelAccountForKarma->votePostId($_GET['postId'], $_GET['vote']);
153 154
 		if(isset($_GET['getPostDetails']) && isset($_GET['getPostDetails']))
154
-        {
155
+		{
155 156
             header('Location: index.php?getPostDetails=true&postId=' . htmlspecialchars($_GET['postId_parent']) . '#postId-' . htmlspecialchars($_GET['postId']));
156 157
         }
157 158
         else
@@ -169,7 +170,7 @@  discard block
 block discarded – undo
169 170
 
170 171
 
171 172
 	function getPosts($lastPostId, $accessToken, $url, $version = 'v2')
172
-	{	
173
+	{
173 174
 		$accountCreator = new GetPosts();
174 175
 		$accountCreator->setLastPostId($lastPostId);
175 176
 		$accountCreator->setAccessToken($accessToken);
@@ -290,7 +291,8 @@  discard block
 block discarded – undo
290 291
 
291 292
 			$posts[0] = $data;
292 293
 
293
-			if(array_key_exists('children', $data)) {
294
+			if(array_key_exists('children', $data))
295
+			{
294 296
 				foreach($data['children'] as $key => $child)
295 297
 				{
296 298
 					
Please login to merge, or discard this patch.
vote-ajax.php 2 patches
Spacing   +3 added lines, -3 removed lines patch added patch discarded remove patch
@@ -3,8 +3,8 @@  discard block
 block discarded – undo
3 3
 $config = parse_ini_file('config/config.ini.php');
4 4
 if(!isset($_GET['pw']) || $config['pw'] != $_GET['pw'])
5 5
 {
6
-	error_log($_SERVER['REMOTE_ADDR']  . ' used a wrong password on vote-ajax.php');
7
-	$respone = array("message" => $_SERVER['REMOTE_ADDR']  . ' used a wrong password on vote-ajax.php',"success" => false);
6
+	error_log($_SERVER['REMOTE_ADDR'] . ' used a wrong password on vote-ajax.php');
7
+	$respone = array("message" => $_SERVER['REMOTE_ADDR'] . ' used a wrong password on vote-ajax.php', "success" => false);
8 8
 	echo json_encode($response);
9 9
 	
10 10
 	die();
@@ -55,7 +55,7 @@  discard block
 block discarded – undo
55 55
 		}
56 56
 	}
57 57
 
58
-if (isset($captcha))
58
+if(isset($captcha))
59 59
 {
60 60
 	$response = array("success" => $success, "message" => $message, "captcha" => $captcha, "deviceUid" => $deviceUid);
61 61
 }
Please login to merge, or discard this patch.
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -59,7 +59,7 @@
 block discarded – undo
59 59
 {
60 60
 	$response = array("success" => $success, "message" => $message, "captcha" => $captcha, "deviceUid" => $deviceUid);
61 61
 }
62
-else 
62
+else
63 63
 {
64 64
 	$response = array("success" => $success, "message" => $message);
65 65
 }
Please login to merge, or discard this patch.
admin.php 1 patch
Spacing   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -4,7 +4,7 @@
 block discarded – undo
4 4
 
5 5
 if(!isset($_GET['pw']) || $config['pw'] != $_GET['pw'])
6 6
 {
7
-	error_log($_SERVER['REMOTE_ADDR']  . ' used a wrong password on admin.php');
7
+	error_log($_SERVER['REMOTE_ADDR'] . ' used a wrong password on admin.php');
8 8
 	die();
9 9
 }
10 10
 
Please login to merge, or discard this patch.