Completed
Push — master ( 2ca5fd...7b8c34 )
by mains
02:56
created
php/JodelAccount.php 1 patch
Braces   +12 added lines, -7 removed lines patch added patch discarded remove patch
@@ -145,7 +145,7 @@  discard block
 block discarded – undo
145 145
         if($location->getLat() == $lat && $location->getLng() == $lng && $location->getCityName() == $name)
146 146
         {
147 147
             return TRUE;
148
-        }  
148
+        }
149 149
         else
150 150
         {
151 151
             return FALSE;
@@ -158,7 +158,7 @@  discard block
 block discarded – undo
158 158
         if(substr($_GET['city'], 0, 1) === '#')
159 159
         {
160 160
             return htmlspecialchars($_GET['city']) . " " . $this->location->cityName;
161
-        }                
161
+        }
162 162
         else
163 163
         {
164 164
             $url = 'https://maps.googleapis.com/maps/api/geocode/json?address=' . htmlspecialchars($_GET['city']) . '&key=' . $this->getGeocodingToken();
@@ -338,7 +338,8 @@  discard block
 block discarded – undo
338 338
         if(isset($_POST['color']))
339 339
         {
340 340
             $color = $_POST['color'];
341
-            switch ($color) {
341
+            switch ($color)
342
+            {
342 343
                 case '8ABDB0':
343 344
                     $color = '8ABDB0';
344 345
                     break;
@@ -451,7 +452,8 @@  discard block
 block discarded – undo
451 452
                                     expiration_date='" . $expiration_date . "'
452 453
                                 WHERE device_uid='" . $device_uid . "'");
453 454
 
454
-        if($result === false){
455
+        if($result === false)
456
+        {
455 457
                 error_log("Adding account failed: (" . $db->errno . ") " . $db->error);
456 458
         }   
457 459
     }
@@ -531,14 +533,16 @@  discard block
 block discarded – undo
531 533
         $result = $db->query("INSERT INTO votes (device_uid, postId, type)
532 534
                         VALUES ('" . $this->deviceUid . "','" . $postId . "','" . $voteType . "')");
533 535
         
534
-        if($result === false){
536
+        if($result === false)
537
+        {
535 538
                 $error = db_error();
536 539
                 echo $error;
537 540
                 echo "Adding Vote failed: (" . $result->errno . ") " . $result->error;
538 541
         }       
539 542
     }
540 543
 
541
-    function registerAccount($location) {
544
+    function registerAccount($location)
545
+    {
542 546
         $accountCreator = new CreateUser();
543 547
         $accountCreator->setLocation($location);
544 548
         $data = $accountCreator->execute();
@@ -563,7 +567,8 @@  discard block
 block discarded – undo
563 567
                         "','" . $device_uid . "','" . $name . "','" . $lat . "','" . $lng . "') ");
564 568
 
565 569
         $success = TRUE;
566
-        if($result === false){
570
+        if($result === false)
571
+        {
567 572
                 $error = $db->error();
568 573
                 echo $error;
569 574
                 echo "Adding account failed: (" . $result->errno . ") " . $result->error;
Please login to merge, or discard this patch.