Completed
Push — master ( 335df2...311089 )
by mains
02:47
created
vote-ajax.php 1 patch
Braces   +1 added lines, -1 removed lines patch added patch discarded remove patch
@@ -114,7 +114,7 @@
 block discarded – undo
114 114
 	{
115 115
 		$response = array("success" => $success, "message" => $message, "captcha" => $captcha, "deviceUid" => $deviceUid);
116 116
 	}
117
-	else 
117
+	else
118 118
 	{
119 119
 		$response = array("success" => $success, "message" => $message);
120 120
 	}
Please login to merge, or discard this patch.
admin.php 1 patch
Braces   +12 added lines, -4 removed lines patch added patch discarded remove patch
@@ -50,7 +50,8 @@  discard block
 block discarded – undo
50 50
                     	. "','" . $db->escape_string($_POST['device_uid'])
51 51
                     	. "','" . $db->escape_string($_POST['rights']) . "')");
52 52
     
53
-    if($result === false){
53
+    if($result === false)
54
+    {
54 55
             $error = db_error();
55 56
             error_log($error);
56 57
             error_log("Adding Voter failed: (" . $result->errno . ") " . $result->error);
@@ -154,7 +155,9 @@  discard block
 block discarded – undo
154 155
 				<article class="topContent col-sm-8">
155 156
 
156 157
 					<content id="posts" class="adminpanel">
157
-						<?php if($userIsAdmin) { ?>
158
+						<?php if($userIsAdmin)
159
+{
160
+?>
158 161
 						<h2>account management</h2>
159 162
 						<form method="post">
160 163
 							<div>
@@ -179,14 +182,19 @@  discard block
 block discarded – undo
179 182
 						<?php
180 183
 						}
181 184
 
182
-						if($userIsVoter) {
185
+						if($userIsVoter)
186
+						{
183 187
 						?>
184 188
 						<h2>Voting</h2>
185 189
 						<form>
186 190
 							<input placeholder="quantity" id="quantityDelay" type="number" name="quantity"><br>
187 191
 							<input placeholder="min interval" id="minDelay" value="<?php echo $config['minInterval'];?>" type="text" name="min"><br>
188 192
 							<input placeholder="max interval" id="maxDelay" value="<?php echo $config['maxInterval'];?>" type="text" name="max"><br>
189
-							<input placeholder="postId" id="postIdDelay" value="<?php if(isset($_GET['postId'])) echo $_GET['postId'];?>" type="text" name="postId"><br>
193
+							<input placeholder="postId" id="postIdDelay" value="<?php if(isset($_GET['postId']))
194
+{
195
+	echo $_GET['postId'];
196
+}
197
+?>" type="text" name="postId"><br>
190 198
 							<button type="button" name="vote" value="up" class="half" onclick="voteWithAjax('up');">Upvote</button>
191 199
 							<button type="button" name="vote" value="down" class="half" onclick="voteWithAjax('down');">Downvote</button><br>
192 200
 						</form>
Please login to merge, or discard this patch.
php/jodel-web.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -75,7 +75,7 @@  discard block
 block discarded – undo
75 75
 function isUserVoter()
76 76
 {
77 77
 	if(isset($_COOKIE['JodelVoterPassword']))
78
-	{	
78
+	{
79 79
 		$db = new DatabaseConnect();
80 80
 		$result = $db->query("SELECT id FROM users WHERE user_token = '" . $_COOKIE['JodelVoterPassword'] . "'");
81 81
 		if($result->num_rows == 0)
@@ -147,7 +147,7 @@  discard block
 block discarded – undo
147 147
 	}
148 148
 	
149 149
 	if(configPropertyExists($config, 'karmaDeviceUid'))
150
-    {
150
+	{
151 151
     	$jodelAccountForKarma = new JodelAccount($config['karmaDeviceUid']);
152 152
     }
153 153
     else
@@ -220,7 +220,8 @@  discard block
 block discarded – undo
220 220
 	
221 221
 	if(isset($_GET['view']))
222 222
 	{
223
-		switch ($_GET['view']) {
223
+		switch ($_GET['view'])
224
+		{
224 225
 			case 'discussed':
225 226
 				$view = 'discussed';
226 227
 				break;
Please login to merge, or discard this patch.