Completed
Push — 1.10.x ( 986d2b...f19030 )
by Angel Fernando Quiroz
69:29 queued 19:50
created
main/webservices/cm_webservice_announcements.php 1 patch
Braces   +6 added lines, -4 removed lines patch added patch discarded remove patch
@@ -26,8 +26,9 @@  discard block
 block discarded – undo
26 26
             }
27 27
             return $announcements;
28 28
 
29
-        } else
30
-            return get_lang('InvalidId');
29
+        } else {
30
+                    return get_lang('InvalidId');
31
+        }
31 32
 
32 33
     }
33 34
 
@@ -69,8 +70,9 @@  discard block
 block discarded – undo
69 70
 
70 71
             return (htmlcode) ? html_entity_decode($announcements[0][$field_table]) : $announcements[0][$field_table];
71 72
 
72
-        }else
73
-            return get_lang('InvalidId');
73
+        } else {
74
+                    return get_lang('InvalidId');
75
+        }
74 76
     }
75 77
 
76 78
 
Please login to merge, or discard this patch.
main/webservices/cm_webservice_course.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -521,8 +521,9 @@
 block discarded – undo
521 521
 
522 522
 	public function nada($username, $password)
523 523
 	{
524
-		if($this->verifyUserPass($username, $password) == "valid")
525
-			return $username.$password;
524
+		if($this->verifyUserPass($username, $password) == "valid") {
525
+					return $username.$password;
526
+		}
526 527
 		return $username;
527 528
 	}
528 529
 
Please login to merge, or discard this patch.
main/webservices/cm_webservice_courses.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -35,8 +35,9 @@
 block discarded – undo
35 35
         {
36 36
             $course_info = CourseManager::get_course_information($course_code);
37 37
             return $course_info['title'];
38
-        } else
39
-            return get_lang('InvalidId');
38
+        } else {
39
+                    return get_lang('InvalidId');
40
+        }
40 41
 
41 42
     }
42 43
 
Please login to merge, or discard this patch.
main/webservices/http-auth.php 1 patch
Braces   +10 added lines, -9 removed lines patch added patch discarded remove patch
@@ -12,7 +12,9 @@  discard block
 block discarded – undo
12 12
 $digest = getDigest();
13 13
 
14 14
 // If there was no digest, show login
15
-if (is_null($digest)) requireLogin($realm,$nonce);
15
+if (is_null($digest)) {
16
+    requireLogin($realm,$nonce);
17
+}
16 18
 
17 19
 $digestParts = digestParse($digest);
18 20
 
@@ -25,9 +27,9 @@  discard block
 block discarded – undo
25 27
 
26 28
 $validResponse = md5("{$A1}:{$digestParts['nonce']}:{$digestParts['nc']}:{$digestParts['cnonce']}:{$digestParts['qop']}:{$A2}");
27 29
 
28
-if ($digestParts['response'] != $validResponse)
30
+if ($digestParts['response'] != $validResponse) {
29 31
   requireLogin($realm,$nonce);
30
-else {
32
+} else {
31 33
   // We're in!
32 34
   echo 'a7532ae474e5e66a0c16eddab02e02a7';
33 35
   die();
@@ -40,12 +42,11 @@  discard block
 block discarded – undo
40 42
     if (isset($_SERVER['PHP_AUTH_DIGEST'])) {
41 43
         $digest = $_SERVER['PHP_AUTH_DIGEST'];
42 44
     // most other servers
43
-    }
44
-    elseif (isset($_SERVER['HTTP_AUTHENTICATION'])) {
45
-      if (strpos(strtolower($_SERVER['HTTP_AUTHENTICATION']),'digest')===0)
46
-        $digest = substr($_SERVER['HTTP_AUTHORIZATION'], 7);
47
-    }
48
-    elseif (isset($_SERVER['HTTP_WWW_AUTHENTICATE'])) {
45
+    } elseif (isset($_SERVER['HTTP_AUTHENTICATION'])) {
46
+      if (strpos(strtolower($_SERVER['HTTP_AUTHENTICATION']),'digest')===0) {
47
+              $digest = substr($_SERVER['HTTP_AUTHORIZATION'], 7);
48
+      }
49
+    } elseif (isset($_SERVER['HTTP_WWW_AUTHENTICATE'])) {
49 50
       $digest = $_SERVER['HTTP_WWW_AUTHENTICATE'];
50 51
     }
51 52
     return $digest;
Please login to merge, or discard this patch.
main/webservices/cm_webservice.php 1 patch
Braces   +8 added lines, -8 removed lines patch added patch discarded remove patch
@@ -153,18 +153,18 @@
 block discarded – undo
153 153
                                 // Check if the expiration date has not been reached
154 154
                                 if ($uData['expiration_date']>date('Y-m-d H:i:s') OR $uData['expiration_date']=='0000-00-00 00:00:00') {
155 155
                                     return "valid";
156
+                                } else {
157
+                                                                    return get_lang('AccountExpired');
156 158
                                 }
157
-                                else
158
-                                    return get_lang('AccountExpired');
159
+                            } else {
160
+                                                            return get_lang('AccountInactive');
159 161
                             }
160
-                            else
161
-                                return get_lang('AccountInactive');
162
+                        } else {
163
+                                                    return get_lang('InvalidId');
162 164
                         }
163
-                        else
164
-                            return get_lang('InvalidId');
165
+                    } else {
166
+                                            return get_lang('AccountURLInactive');
165 167
                     }
166
-                    else
167
-                        return get_lang('AccountURLInactive');
168 168
                 }
169 169
                 return get_lang('InvalidId');
170 170
         }
Please login to merge, or discard this patch.
main/webservices/cm_webservice_inbox.php 1 patch
Braces   +15 added lines, -10 removed lines patch added patch discarded remove patch
@@ -48,8 +48,9 @@  discard block
 block discarded – undo
48 48
 
49 49
             return $message;
50 50
 
51
-        } else
52
-            return get_lang('InvalidId');
51
+        } else {
52
+                    return get_lang('InvalidId');
53
+        }
53 54
 
54 55
     }
55 56
 
@@ -92,8 +93,9 @@  discard block
 block discarded – undo
92 93
             $result = Database::fetch_row($sql_result);
93 94
             return (htmlcode) ? html_entity_decode($result[0]) : $result[0];
94 95
 
95
-        }else
96
-            return get_lang('InvalidId');
96
+        } else {
97
+                    return get_lang('InvalidId');
98
+        }
97 99
 
98 100
 
99 101
     }
@@ -118,8 +120,9 @@  discard block
 block discarded – undo
118 120
 
119 121
             return $message;
120 122
 
121
-        } else
122
-            return get_lang('InvalidId');
123
+        } else {
124
+                    return get_lang('InvalidId');
125
+        }
123 126
 
124 127
     }
125 128
 
@@ -164,8 +167,9 @@  discard block
 block discarded – undo
164 167
 
165 168
             return (htmlcode) ? html_entity_decode($result[0]) : $result[0];
166 169
 
167
-        }else
168
-            return get_lang('InvalidId');
170
+        } else {
171
+                    return get_lang('InvalidId');
172
+        }
169 173
 
170 174
 
171 175
     }
@@ -199,8 +203,9 @@  discard block
 block discarded – undo
199 203
 
200 204
             return $inbox_last_id;
201 205
 
202
-        } else
203
-            return get_lang('InvalidId');
206
+        } else {
207
+                    return get_lang('InvalidId');
208
+        }
204 209
 
205 210
     }
206 211
 
Please login to merge, or discard this patch.
main/document/edit_draw.php 1 patch
Braces   +3 added lines, -2 removed lines patch added patch discarded remove patch
@@ -87,10 +87,11 @@
 block discarded – undo
87 87
 
88 88
 $is_certificate_mode = DocumentManager::is_certificate_mode($dir);
89 89
 
90
-if (!$is_certificate_mode)
90
+if (!$is_certificate_mode) {
91 91
 	$interbreadcrumb[]= array("url" => "./document.php?curdirpath=".urlencode($my_cur_dir_path).$req_gid, "name"=> get_lang('Documents'));
92
-else
92
+} else {
93 93
 	$interbreadcrumb[]= array ('url' => '../gradebook/'.$_SESSION['gradebook_dest'], 'name' => get_lang('Gradebook'));
94
+}
94 95
 
95 96
 // Interbreadcrumb for the current directory root path
96 97
 if (empty($document_data['parents'])) {
Please login to merge, or discard this patch.
main/document/webcam_receiver.php 1 patch
Braces   +4 added lines, -3 removed lines patch added patch discarded remove patch
@@ -17,8 +17,7 @@  discard block
 block discarded – undo
17 17
 	$webcamname = $params['webcamname'];
18 18
 	$webcamdir = $params['webcamdir'];
19 19
 	$webcamuserid = $params['webcamuserid'];
20
-}
21
-else {
20
+} else {
22 21
 	api_not_allowed();
23 22
 	die();
24 23
 }
@@ -58,7 +57,9 @@  discard block
 block discarded – undo
58 57
 $webcamname_noex=basename($webcamname, ".jpg");
59 58
 if (file_exists($saveDir.'/'.$webcamname_noex.'.'.$ext)){
60 59
 		$i = 1;
61
-		while (file_exists($saveDir.'/'.$webcamname_noex.'_'.$i.'.'.$ext)) $i++;
60
+		while (file_exists($saveDir.'/'.$webcamname_noex.'_'.$i.'.'.$ext)) {
61
+		    $i++;
62
+		}
62 63
 		$webcamname_to_save = $webcamname_noex . '_' . $i . '.'.$ext;
63 64
 		$title_to_save = $webcamname_noex . '_' . $i . '.'.$ext;
64 65
 		$title_to_save = str_replace('_',' ',$title_to_save);
Please login to merge, or discard this patch.
main/document/edit_paint.php 1 patch
Braces   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -93,10 +93,11 @@  discard block
 block discarded – undo
93 93
 
94 94
 $is_certificate_mode = DocumentManager::is_certificate_mode($dir);
95 95
 
96
-if (!$is_certificate_mode)
96
+if (!$is_certificate_mode) {
97 97
 	$interbreadcrumb[]= array("url" => "./document.php?curdirpath=".urlencode($my_cur_dir_path).'&'.api_get_cidreq(), "name"=> get_lang('Documents'));
98
-else
98
+} else {
99 99
 	$interbreadcrumb[]= array ('url' => '../gradebook/'.$_SESSION['gradebook_dest'], 'name' => get_lang('Gradebook'));
100
+}
100 101
 
101 102
 // Interbreadcrumb for the current directory root path
102 103
 if (empty($document_data['parents'])) {
@@ -158,8 +159,7 @@  discard block
 block discarded – undo
158 159
 		@file_put_contents($path_and_file, $crossdomain);
159 160
 	}
160 161
 	$credentials="true";
161
-}
162
-else {
162
+} else {
163 163
 	$credentials="false";
164 164
 }
165 165
 
Please login to merge, or discard this patch.