Completed
Push — master ( ccb03a...769cd4 )
by mains
02:58
created
templates/footer.php 1 patch
Braces   +9 added lines, -3 removed lines patch added patch discarded remove patch
@@ -61,7 +61,9 @@  discard block
 block discarded – undo
61 61
 			{
62 62
 				window.history.back();
63 63
 			}
64
-		<?php if(isset($includeEmojiAndAjax)){ ?>
64
+		<?php if(isset($includeEmojiAndAjax))
65
+{
66
+?>
65 67
 
66 68
 			function vote(postId, vote, obj)
67 69
 			{
@@ -91,7 +93,9 @@  discard block
 block discarded – undo
91 93
 
92 94
 			$(document).ready(function()
93 95
 			{
94
-				<?php if(isset($errorMsg)) { ?>
96
+				<?php if(isset($errorMsg))
97
+{
98
+?>
95 99
 				//Error Msg
96 100
 				if('<?php echo $errorMsg;?>' != '')
97 101
 				{
@@ -155,7 +159,9 @@  discard block
 block discarded – undo
155 159
 					return {"lastPostId":lastPostId, "old_lastPostId":old_lastPostId};
156 160
 				}
157 161
 
158
-				<?php if(!isset($_GET['postId']) && !isset($_GET['getPostDetails'])) { ?>
162
+				<?php if(!isset($_GET['postId']) && !isset($_GET['getPostDetails']))
163
+{
164
+?>
159 165
 
160 166
 				if(window.location.hash)
161 167
 				{
Please login to merge, or discard this patch.
php/Requests/AbstractRequest.php 1 patch
Braces   +13 added lines, -7 removed lines patch added patch discarded remove patch
@@ -1,7 +1,7 @@  discard block
 block discarded – undo
1 1
 <?php
2 2
 
3 3
 abstract class AbstractRequest
4
-{	
4
+{
5 5
     const CLIENTID = '81e8a76e-1e02-4d17-9ba0-8a7020261b26';
6 6
     const APIURL = 'https://api.go-tellm.com/api';
7 7
     const SECRET = 'SDydTnTdqqaiAMfneLkqXYxamvNuUYOmkqpdiZTu';
@@ -20,7 +20,8 @@  discard block
 block discarded – undo
20 20
 		        
21 21
 		$this->payLoad = $this->getPayload();
22 22
 		$device_uid = '';
23
-		if(isset($this->payLoad['device_uid'])) {
23
+		if(isset($this->payLoad['device_uid']))
24
+		{
24 25
 			$device_uid = $this->payLoad['device_uid'];
25 26
 		}
26 27
 				
@@ -29,7 +30,8 @@  discard block
 block discarded – undo
29 30
         $header = $this->getSignHeaders();
30 31
         $url = $this->getFullUrl();
31 32
 
32
-        if ($this->getAccessToken()) {
33
+        if ($this->getAccessToken())
34
+        {
33 35
             $header['Authorization'] = "Bearer " . $this->getAccessToken();
34 36
         }
35 37
         //Comment out to debug the Request:
@@ -52,7 +54,8 @@  discard block
 block discarded – undo
52 54
             'proxy' => '186.103.169.165:8080',
53 55
         );*/
54 56
 
55
-        switch ($this->getMethod()) {
57
+        switch ($this->getMethod())
58
+        {
56 59
             case 'POST':
57 60
                 $result = Requests::post($url, $header, $this->payLoad);
58 61
                 break;
@@ -73,7 +76,8 @@  discard block
 block discarded – undo
73 76
 
74 77
         http_response_code($result->status_code);
75 78
 
76
-        switch ($result->status_code) {
79
+        switch ($result->status_code)
80
+        {
77 81
             case 200:
78 82
                 $result = json_decode($result->body, true);
79 83
                 break;
@@ -150,10 +154,12 @@  discard block
 block discarded – undo
150 154
      */
151 155
     private function getSignHeaders()
152 156
     {
153
-			if($this->getAccessToken() == null) {
157
+			if($this->getAccessToken() == null)
158
+			{
154 159
 				$payload_accessToken = "";
155 160
 			}
156
-			else {
161
+			else
162
+			{
157 163
 				$payload_accessToken = $this->getAccessToken();
158 164
 			}
159 165
 			
Please login to merge, or discard this patch.