Completed
Branch master (a5e97c)
by mains
02:22
created
php/jodel-web.php 1 patch
Spacing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -29,7 +29,7 @@  discard block
 block discarded – undo
29 29
 	if ($result->num_rows > 0)
30 30
 	{
31 31
 			// output data of each row
32
-			while($row = $result->fetch_assoc()) {
32
+			while ($row = $result->fetch_assoc()) {
33 33
 					//$access_token = $row["access_token"];
34 34
 					$expiration_date = $row["expiration_date"];
35 35
 					$deviceUid = $row["device_uid"];
@@ -41,9 +41,9 @@  discard block
 block discarded – undo
41 41
 			echo "0 results";
42 42
 	}
43 43
 
44
-	if($expiration_date <= time()) {
44
+	if ($expiration_date <= time()) {
45 45
 		$accountCreator = new CreateUser();
46
-		$accountCreator->setAccessToken($access_token);//$accountData->getAccessToken());
46
+		$accountCreator->setAccessToken($access_token); //$accountData->getAccessToken());
47 47
 		$accountCreator->setDeviceUid($deviceUid);
48 48
 		$accountCreator->setLocation($location);
49 49
 		$data = $accountCreator->execute();
@@ -63,7 +63,7 @@  discard block
 block discarded – undo
63 63
 								WHERE device_uid='" . $device_uid . "'");
64 64
 
65 65
 		$success = TRUE;
66
-		if($result === false){
66
+		if ($result === false) {
67 67
 				echo "Adding account failed: (" . $db->errno . ") " . $db->error;
68 68
 				$success = FALSE;
69 69
 		}	
@@ -102,11 +102,11 @@  discard block
 block discarded – undo
102 102
 	$result = $db->query("INSERT INTO accounts (access_token, refresh_token, token_type,
103 103
 					expires_in, expiration_date, distinct_id, device_uid)
104 104
 					VALUES ('" . $access_token . "','" . $refresh_token . "','" . $token_type .
105
-					"','" .  $expires_in . "','" . $expiration_date . "','" . $distinct_id .
105
+					"','" . $expires_in . "','" . $expiration_date . "','" . $distinct_id .
106 106
 					"','" . $device_uid . "') ");
107 107
 
108 108
 	$success = TRUE;
109
-	if($result === false){
109
+	if ($result === false) {
110 110
 			$error = db_error();
111 111
 			echo $error;
112 112
 			echo "Adding account failed: (" . $result->errno . ") " . $result->error;
Please login to merge, or discard this patch.