@@ -29,7 +29,7 @@ discard block |
||
29 | 29 | $header = $this->getSignHeaders(); |
30 | 30 | $url = $this->getFullUrl(); |
31 | 31 | |
32 | - if ($this->getAccessToken()) { |
|
32 | + if($this->getAccessToken()) { |
|
33 | 33 | $header['Authorization'] = "Bearer " . $this->getAccessToken(); |
34 | 34 | } |
35 | 35 | //Comment out to debug the Request: |
@@ -52,7 +52,7 @@ discard block |
||
52 | 52 | 'proxy' => '186.103.169.165:8080', |
53 | 53 | );*/ |
54 | 54 | |
55 | - switch ($this->getMethod()) { |
|
55 | + switch($this->getMethod()) { |
|
56 | 56 | case 'POST': |
57 | 57 | $result = Requests::post($url, $header, $this->payLoad); |
58 | 58 | break; |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $result = Requests::put($url, $header, $this->payLoad); |
71 | 71 | break; |
72 | 72 | } |
73 | - switch ($result->status_code) { |
|
73 | + switch($result->status_code) { |
|
74 | 74 | case 200: |
75 | 75 | $result = json_decode($result->body, true); |
76 | 76 | break; |
@@ -111,11 +111,11 @@ discard block |
||
111 | 111 | |
112 | 112 | if(array_key_exists('error', $result) && $result['error'] == 'Service Unavailable"') |
113 | 113 | { |
114 | - header('location:'.$_SERVER['PHP_SELF']); |
|
114 | + header('location:' . $_SERVER['PHP_SELF']); |
|
115 | 115 | } |
116 | 116 | break; |
117 | 117 | default: |
118 | - error_log('Error '.$result->status_code.' - unknown error'); |
|
118 | + error_log('Error ' . $result->status_code . ' - unknown error'); |
|
119 | 119 | $result = json_decode($result->body, true); |
120 | 120 | } |
121 | 121 |
@@ -20,8 +20,8 @@ discard block |
||
20 | 20 | |
21 | 21 | if((!isset($_GET['pw']) || $config['pw'] != $_GET['pw']) && !isUserAdmin()) |
22 | 22 | { |
23 | - error_log($_SERVER['REMOTE_ADDR'] . ' used a wrong password on vote-ajax.php'); |
|
24 | - $response = array("message" => $_SERVER['REMOTE_ADDR'] . ' used a wrong password on vote-ajax.php',"success" => false); |
|
23 | + error_log($_SERVER['REMOTE_ADDR'] . ' used a wrong password on vote-ajax.php'); |
|
24 | + $response = array("message" => $_SERVER['REMOTE_ADDR'] . ' used a wrong password on vote-ajax.php', "success" => false); |
|
25 | 25 | echo json_encode($response); |
26 | 26 | die(); |
27 | 27 | } |
@@ -111,7 +111,7 @@ discard block |
||
111 | 111 | } |
112 | 112 | } |
113 | 113 | |
114 | -if (isset($captcha)) |
|
114 | +if(isset($captcha)) |
|
115 | 115 | { |
116 | 116 | $response = array("success" => $success, "message" => $message, "captcha" => $captcha, "deviceUid" => $deviceUid); |
117 | 117 | } |