Completed
Push — master ( 335df2...311089 )
by mains
02:47
created
vote-ajax.php 1 patch
Upper-Lower-Casing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -20,14 +20,14 @@  discard block
 block discarded – undo
20 20
 if(!isUserVoter() && !isUserAdmin())
21 21
 {
22 22
 	error_log($_SERVER['REMOTE_ADDR']  . ' used a wrong password on vote-ajax.php');
23
-	$response = array("message" => $_SERVER['REMOTE_ADDR']  . ' used a wrong password on vote-ajax.php',"success" => false);
23
+	$response = array("message" => $_SERVER['REMOTE_ADDR']  . ' used a wrong password on vote-ajax.php',"success" => FALSE);
24 24
 	echo json_encode($response);
25 25
 	die();
26 26
 }
27 27
 else
28 28
 {
29 29
 	$message = "";
30
-	$success = true;
30
+	$success = TRUE;
31 31
 	$token = "";
32 32
 		if(isset($_POST['vote']) && isset($_POST['postId']))
33 33
 		{
@@ -96,7 +96,7 @@  discard block
 block discarded – undo
96 96
 						//$response = array("success" => $jodelAccount->verifyCaptcha());
97 97
 						//echo json_encode($response);
98 98
 						//die();
99
-					$success = false;
99
+					$success = FALSE;
100 100
 				}
101 101
 				else
102 102
 				{
@@ -106,7 +106,7 @@  discard block
 block discarded – undo
106 106
 			else
107 107
 			{
108 108
 				$message = 'There is no account available for this jodel. Please create at least one new account to vote this jodel.';
109
-				$success = false;
109
+				$success = FALSE;
110 110
 			}
111 111
 		}
112 112
 
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,13 +20,13 @@  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
 }
26 26
 else if(isUserVoter())
27 27
 {
28
-	$userIsAdmin = false;
29
-	$userIsVoter = true;
28
+	$userIsAdmin = FALSE;
29
+	$userIsVoter = TRUE;
30 30
 }
31 31
 else
32 32
 {
@@ -50,7 +50,7 @@  discard block
 block discarded – undo
50 50
                     	. "','" . $db->escape_string($_POST['device_uid'])
51 51
                     	. "','" . $db->escape_string($_POST['rights']) . "')");
52 52
     
53
-    if($result === false){
53
+    if($result === FALSE){
54 54
             $error = db_error();
55 55
             error_log($error);
56 56
             error_log("Adding Voter failed: (" . $result->errno . ") " . $result->error);
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.34.2 Dalvik/2.1.0 (Linux; U; Android 5.1.1; )';
9 9
     const CLIENT_TYPE = 'android_4.34.2';
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.