@@ -132,7 +132,7 @@ discard block |
||
| 132 | 132 | if($location->getCityName() == $city) |
| 133 | 133 | { |
| 134 | 134 | return TRUE; |
| 135 | - } |
|
| 135 | + } |
|
| 136 | 136 | else |
| 137 | 137 | { |
| 138 | 138 | return FALSE; |
@@ -145,7 +145,7 @@ discard block |
||
| 145 | 145 | if(substr($_GET['city'], 0, 1) === '#') |
| 146 | 146 | { |
| 147 | 147 | return htmlspecialchars($_GET['city']) . " " . $this->location->cityName; |
| 148 | - } |
|
| 148 | + } |
|
| 149 | 149 | else |
| 150 | 150 | { |
| 151 | 151 | $url = 'https://maps.googleapis.com/maps/api/geocode/json?address=' . htmlspecialchars($_GET['city']) . '&key=' . $this->getGeocodingToken(); |
@@ -333,7 +333,8 @@ discard block |
||
| 333 | 333 | if(isset($_POST['color'])) |
| 334 | 334 | { |
| 335 | 335 | $color = $_POST['color']; |
| 336 | - switch ($color) { |
|
| 336 | + switch ($color) |
|
| 337 | + { |
|
| 337 | 338 | case '8ABDB0': |
| 338 | 339 | $color = '8ABDB0'; |
| 339 | 340 | break; |
@@ -446,7 +447,8 @@ discard block |
||
| 446 | 447 | expiration_date='" . $expiration_date . "' |
| 447 | 448 | WHERE device_uid='" . $device_uid . "'"); |
| 448 | 449 | |
| 449 | - if($result === false){ |
|
| 450 | + if($result === false) |
|
| 451 | + { |
|
| 450 | 452 | error_log("Adding account failed: (" . $db->errno . ") " . $db->error); |
| 451 | 453 | } |
| 452 | 454 | } |
@@ -526,14 +528,16 @@ discard block |
||
| 526 | 528 | $result = $db->query("INSERT INTO votes (device_uid, postId, type) |
| 527 | 529 | VALUES ('" . $this->deviceUid . "','" . $postId . "','" . $voteType . "')"); |
| 528 | 530 | |
| 529 | - if($result === false){ |
|
| 531 | + if($result === false) |
|
| 532 | + { |
|
| 530 | 533 | $error = db_error(); |
| 531 | 534 | echo $error; |
| 532 | 535 | echo "Adding Vote failed: (" . $result->errno . ") " . $result->error; |
| 533 | 536 | } |
| 534 | 537 | } |
| 535 | 538 | |
| 536 | - function registerAccount($location) { |
|
| 539 | + function registerAccount($location) |
|
| 540 | + { |
|
| 537 | 541 | $accountCreator = new CreateUser(); |
| 538 | 542 | $accountCreator->setLocation($location); |
| 539 | 543 | $data = $accountCreator->execute(); |
@@ -558,7 +562,8 @@ discard block |
||
| 558 | 562 | "','" . $device_uid . "','" . $name . "','" . $lat . "','" . $lng . "') "); |
| 559 | 563 | |
| 560 | 564 | $success = TRUE; |
| 561 | - if($result === false){ |
|
| 565 | + if($result === false) |
|
| 566 | + { |
|
| 562 | 567 | $error = $db->error(); |
| 563 | 568 | echo $error; |
| 564 | 569 | echo "Adding account failed: (" . $result->errno . ") " . $result->error; |