@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | if($location->getLat() == $lat && $location->getLng() == $lng && $location->getCityName() == $name) |
| 87 | 87 | { |
| 88 | 88 | return TRUE; |
| 89 | - } |
|
| 89 | + } |
|
| 90 | 90 | else |
| 91 | 91 | { |
| 92 | 92 | return FALSE; |
@@ -99,7 +99,7 @@ discard block |
||
| 99 | 99 | if(substr($_GET['city'], 0, 1) === '#') |
| 100 | 100 | { |
| 101 | 101 | return htmlspecialchars($_GET['city']) . " " . $this->location->cityName; |
| 102 | - } |
|
| 102 | + } |
|
| 103 | 103 | else |
| 104 | 104 | { |
| 105 | 105 | $url = 'https://maps.googleapis.com/maps/api/geocode/json?address=' . htmlspecialchars($_GET['city']) . '&key=AIzaSyCwhnja-or07012HqrhPW7prHEDuSvFT4w'; |
@@ -272,7 +272,8 @@ discard block |
||
| 272 | 272 | if(isset($_POST['color'])) |
| 273 | 273 | { |
| 274 | 274 | $color = $_POST['color']; |
| 275 | - switch ($color) { |
|
| 275 | + switch ($color) |
|
| 276 | + { |
|
| 276 | 277 | case '8ABDB0': |
| 277 | 278 | $color = '8ABDB0'; |
| 278 | 279 | break; |
@@ -369,7 +370,8 @@ discard block |
||
| 369 | 370 | expiration_date='" . $expiration_date . "' |
| 370 | 371 | WHERE device_uid='" . $device_uid . "'"); |
| 371 | 372 | |
| 372 | - if($result === false){ |
|
| 373 | + if($result === false) |
|
| 374 | + { |
|
| 373 | 375 | error_log("Adding account failed: (" . $db->errno . ") " . $db->error); |
| 374 | 376 | } |
| 375 | 377 | } |
@@ -449,14 +451,16 @@ discard block |
||
| 449 | 451 | $result = $db->query("INSERT INTO votes (device_uid, postId, type) |
| 450 | 452 | VALUES ('" . $this->deviceUid . "','" . $postId . "','" . $voteType . "')"); |
| 451 | 453 | |
| 452 | - if($result === false){ |
|
| 454 | + if($result === false) |
|
| 455 | + { |
|
| 453 | 456 | $error = db_error(); |
| 454 | 457 | echo $error; |
| 455 | 458 | echo "Adding Vote failed: (" . $result->errno . ") " . $result->error; |
| 456 | 459 | } |
| 457 | 460 | } |
| 458 | 461 | |
| 459 | - function registerAccount($location) { |
|
| 462 | + function registerAccount($location) |
|
| 463 | + { |
|
| 460 | 464 | $accountCreator = new CreateUser(); |
| 461 | 465 | $accountCreator->setLocation($location); |
| 462 | 466 | $data = $accountCreator->execute(); |
@@ -481,7 +485,8 @@ discard block |
||
| 481 | 485 | "','" . $device_uid . "','" . $name . "','" . $lat . "','" . $lng . "') "); |
| 482 | 486 | |
| 483 | 487 | $success = TRUE; |
| 484 | - if($result === false){ |
|
| 488 | + if($result === false) |
|
| 489 | + { |
|
| 485 | 490 | $error = $db->error(); |
| 486 | 491 | echo $error; |
| 487 | 492 | echo "Adding account failed: (" . $result->errno . ") " . $result->error; |