Completed
Push — master ( 311089...9992d6 )
by mains
18:35
created
vote-ajax.php 1 patch
Upper-Lower-Casing   +6 added lines, -6 removed lines patch added patch discarded remove patch
@@ -22,7 +22,7 @@  discard block
 block discarded – undo
22 22
 if(!$userIsVoter && !$userIsAdmin)
23 23
 {
24 24
 	error_log($_SERVER['REMOTE_ADDR']  . ' used a wrong password on vote-ajax.php');
25
-	$response = array("message" => $_SERVER['REMOTE_ADDR']  . ' used a wrong password on vote-ajax.php',"success" => false);
25
+	$response = array("message" => $_SERVER['REMOTE_ADDR']  . ' used a wrong password on vote-ajax.php',"success" => FALSE);
26 26
 	echo json_encode($response);
27 27
 	die();
28 28
 }
@@ -39,7 +39,7 @@  discard block
 block discarded – undo
39 39
 		if($remaining_votes <= 0)
40 40
 		{
41 41
 			$message = 'This voter account run out of votes. For more information please contact [email protected]';
42
-			$success = false;
42
+			$success = FALSE;
43 43
 
44 44
 			$response = array("success" => $success, "message" => $message);
45 45
 			echo json_encode($response);
@@ -49,7 +49,7 @@  discard block
 block discarded – undo
49 49
 		
50 50
 
51 51
 	$message = "";
52
-	$success = true;
52
+	$success = TRUE;
53 53
 	$token = "";
54 54
 		if(isset($_POST['vote']) && isset($_POST['postId']))
55 55
 		{
@@ -118,7 +118,7 @@  discard block
 block discarded – undo
118 118
 						//$response = array("success" => $jodelAccount->verifyCaptcha());
119 119
 						//echo json_encode($response);
120 120
 						//die();
121
-					$success = false;
121
+					$success = FALSE;
122 122
 				}
123 123
 				else
124 124
 				{
@@ -126,7 +126,7 @@  discard block
 block discarded – undo
126 126
 					$result = $db->query("UPDATE users 
127 127
                                 SET remaining_votes='" . $remaining_votes . "'
128 128
                                 WHERE user_token='" . $_COOKIE['JodelVoterPassword'] . "'");
129
-					if($result === false)
129
+					if($result === FALSE)
130 130
 					{
131 131
                			error_log("Update remaining votes failed: (" . $db->errno . ") " . $db->error);
132 132
                		}
@@ -137,7 +137,7 @@  discard block
 block discarded – undo
137 137
 			else
138 138
 			{
139 139
 				$message = 'There is no account available for this jodel. Please create at least one new account to vote this jodel.';
140
-				$success = false;
140
+				$success = FALSE;
141 141
 			}
142 142
 		}
143 143
 
Please login to merge, or discard this patch.
php/Requests/AbstractRequest.php 1 patch
Upper-Lower-Casing   +19 added lines, -19 removed lines patch added patch discarded remove patch
@@ -8,7 +8,7 @@  discard block
 block discarded – undo
8 8
     const USERAGENT = 'Jodel/4.35.6 Dalvik/2.1.0 (Linux; U; Android 5.1.1; )';
9 9
     const CLIENT_TYPE = 'android_4.35.6';
10 10
     
11
-    private $accessToken = null;
11
+    private $accessToken = NULL;
12 12
     private $payLoad;
13 13
     public $expects = '';
14 14
     public $version = 'v2';
@@ -75,18 +75,18 @@  discard block
 block discarded – undo
75 75
 
76 76
         switch ($result->status_code) {
77 77
             case 200:
78
-                $result = json_decode($result->body, true);
78
+                $result = json_decode($result->body, TRUE);
79 79
                 break;
80 80
             case 204:
81 81
                 $result = 'Success';
82 82
                 http_response_code(200);
83 83
                 break;
84 84
             case 400:
85
-                $result = json_decode($result->body, true);
86
-                error_log('Error 400 - ' . print_r($result, true));
85
+                $result = json_decode($result->body, TRUE);
86
+                error_log('Error 400 - ' . print_r($result, TRUE));
87 87
                 break;
88 88
             case 401:
89
-                $result = json_decode($result->body, true);
89
+                $result = json_decode($result->body, TRUE);
90 90
 
91 91
                 if(array_key_exists('error', $result) && $result['error'] == 'length')
92 92
                 {
@@ -94,33 +94,33 @@  discard block
 block discarded – undo
94 94
                 }
95 95
                 else
96 96
                 {
97
-                    error_log('Error 401 - ' . print_r($result, true));
97
+                    error_log('Error 401 - ' . print_r($result, TRUE));
98 98
                 }
99 99
                 break;
100 100
             case 404:
101
-                error_log('Error 404 - ' . print_r($result, true));
102
-                $result = json_decode($result->body, true);
101
+                error_log('Error 404 - ' . print_r($result, TRUE));
102
+                $result = json_decode($result->body, TRUE);
103 103
                 break;
104 104
 			case 477:
105
-                $result = json_decode($result->body, true);
106
-                error_log('Error 477 - ' . print_r($result, true));
105
+                $result = json_decode($result->body, TRUE);
106
+                error_log('Error 477 - ' . print_r($result, TRUE));
107 107
                 break;
108 108
             case 429:
109
-                error_log('Error 429 - Too Many Requests' . print_r(json_decode($result->body, true), true));
109
+                error_log('Error 429 - Too Many Requests' . print_r(json_decode($result->body, TRUE), TRUE));
110 110
             	exit("Error 429: Too Many Requests");
111 111
             	break;
112 112
             case 403:
113
-                error_log('Error 403 - Access denied:' . print_r(json_decode($result->body, true), true));
114
-                $result = json_decode($result->body, true);
113
+                error_log('Error 403 - Access denied:' . print_r(json_decode($result->body, TRUE), TRUE));
114
+                $result = json_decode($result->body, TRUE);
115 115
                 break;
116 116
             case 502:
117
-                error_log('Error 502 - ' . print_r($result, true));
118
-                $result = json_decode($result->body, true);
117
+                error_log('Error 502 - ' . print_r($result, TRUE));
118
+                $result = json_decode($result->body, TRUE);
119 119
                 header('location:'.$_SERVER['PHP_SELF']);
120 120
                 break;
121 121
             case 503:
122
-                error_log('Error 503 - ' . print_r($result, true));
123
-                $result = json_decode($result->body, true);
122
+                error_log('Error 503 - ' . print_r($result, TRUE));
123
+                $result = json_decode($result->body, TRUE);
124 124
 
125 125
                 if(array_key_exists('error', $result) && $result['error'] == 'Service Unavailable')
126 126
                 {
@@ -129,7 +129,7 @@  discard block
 block discarded – undo
129 129
                 break;
130 130
             default:
131 131
                 error_log('Error '.$result->status_code.' - unknown error');
132
-                $result = json_decode($result->body, true);
132
+                $result = json_decode($result->body, TRUE);
133 133
         }
134 134
 
135 135
         //important for account refresh
@@ -151,7 +151,7 @@  discard block
 block discarded – undo
151 151
      */
152 152
     private function getSignHeaders()
153 153
     {
154
-			if($this->getAccessToken() == null) {
154
+			if($this->getAccessToken() == NULL) {
155 155
 				$payload_accessToken = "";
156 156
 			}
157 157
 			else {
Please login to merge, or discard this patch.
admin.php 1 patch
Upper-Lower-Casing   +5 added lines, -5 removed lines patch added patch discarded remove patch
@@ -20,14 +20,14 @@  discard block
 block discarded – undo
20 20
 
21 21
 if(isUserAdmin())
22 22
 {
23
-	$userIsAdmin = true;
24
-	$userIsVoter = true;
23
+	$userIsAdmin = TRUE;
24
+	$userIsVoter = TRUE;
25 25
 	$votesRemaining = 'Unlimited';
26 26
 }
27 27
 else if(isUserVoter())
28 28
 {
29
-	$userIsAdmin = false;
30
-	$userIsVoter = true;
29
+	$userIsAdmin = FALSE;
30
+	$userIsVoter = TRUE;
31 31
 
32 32
 	$result = $db->query("SELECT user_token, remaining_votes FROM users WHERE user_token = '" . $_COOKIE['JodelVoterPassword'] . "'");
33 33
 	if($result->num_rows > 0)
@@ -62,7 +62,7 @@  discard block
 block discarded – undo
62 62
                     	. "','" . $db->escape_string($_POST['device_uid'])
63 63
                     	. "','" . $db->escape_string($_POST['rights']) . "')");
64 64
     
65
-    if($result === false){
65
+    if($result === FALSE){
66 66
             $error = db_error();
67 67
             error_log($error);
68 68
             error_log("Adding Voter failed: (" . $result->errno . ") " . $result->error);
Please login to merge, or discard this patch.