@@ -8,7 +8,7 @@ discard block |
||
8 | 8 | header('HTTP/1.0 401 Unauthorized'); |
9 | 9 | echo 'Text to send if user hits Cancel button'; |
10 | 10 | exit; |
11 | - } else { |
|
11 | + }else { |
|
12 | 12 | if ($_SERVER['PHP_AUTH_USER'] == 'test' && $_SERVER['PHP_AUTH_PW'] == 'test') { |
13 | 13 | header("Access-Control-Allow-Origin: *"); |
14 | 14 | header("Content-Type: application/json"); |
@@ -25,7 +25,7 @@ discard block |
||
25 | 25 | $result = array('user' => 'test', 'pass' => 'test'); |
26 | 26 | $json = json_encode($result); |
27 | 27 | echo($json); |
28 | - } else { |
|
28 | + }else { |
|
29 | 29 | $result1 = array('user' => 'test', 'pass' => 'test'); |
30 | 30 | $result2 = array('user' => 'test1', 'pass' => 'test1'); |
31 | 31 | $result3 = array('user' => 'test2', 'pass' => 'test2'); |
@@ -55,7 +55,7 @@ discard block |
||
55 | 55 | echo(""); |
56 | 56 | break; |
57 | 57 | } |
58 | - } else { |
|
58 | + }else { |
|
59 | 59 | header('WWW-Authenticate: Basic realm="My Realm"'); |
60 | 60 | header('HTTP/1.0 401 Unauthorized'); |
61 | 61 | echo 'Authorization declined'; |
@@ -40,7 +40,7 @@ |
||
40 | 40 | } |
41 | 41 | |
42 | 42 | return ["manager_profile_id"=>$profileId]; |
43 | - } else { |
|
43 | + }else { |
|
44 | 44 | $profileId = ManagerProfileDAO::createManagerProfile($managerProfile, $managerProfileDetails); |
45 | 45 | return ["manager_profile_id"=>$profileId]; |
46 | 46 | } |
@@ -18,7 +18,7 @@ discard block |
||
18 | 18 | if ($workEnvId === 0) { |
19 | 19 | $workEnvironment = self::createWorkEnvironment($workEnvironment); |
20 | 20 | WorkEnvironmentDAO::setManagerProfileWorkEnvironment($managerProfileId, $workEnvironment->getBasic_work_environment()->getId()); |
21 | - } else { |
|
21 | + }else { |
|
22 | 22 | $workEnvironment->getBasic_work_environment()->setId($workEnvId); |
23 | 23 | self::updateWorkEnvironment($workEnvironment); |
24 | 24 | } |
@@ -44,7 +44,7 @@ discard block |
||
44 | 44 | //already exists, so just update description |
45 | 45 | $oldCaption->setDescription($newCaption->getDescription()); |
46 | 46 | WorkEnvironmentDAO::updateWorkplacePhotoCaption($oldCaption); |
47 | - } else { |
|
47 | + }else { |
|
48 | 48 | //doesn't exist, so make sure it has correct work env id and blank photo id, and insert it |
49 | 49 | $newCaption->setWork_environment_id($workEnvId); |
50 | 50 | $newCaption->setWorkplace_photo_id(null); |
@@ -71,7 +71,7 @@ discard block |
||
71 | 71 | //already exists, so just update description |
72 | 72 | $oldCaption->setDescription($newCaption->getDescription()); |
73 | 73 | WorkEnvironmentDAO::updateWorkplacePhotoCaption($oldCaption); |
74 | - } else { |
|
74 | + }else { |
|
75 | 75 | //doesn't exist, so make sure it has correct work env id and blank photo id, and insert it |
76 | 76 | $newCaption->setWork_environment_id($workEnvId); |
77 | 77 | $newCaption->setWorkplace_photo_id(null); |
@@ -97,7 +97,7 @@ discard block |
||
97 | 97 | $exists = WorkEnvironmentDAO::workplacePhotoExistsForManagerAndName($managerProfileId, $photoName); |
98 | 98 | if ($exists) { |
99 | 99 | WorkEnvironmentDAO::updateWorkplacePhoto($workplacePhoto, $managerProfileId, $photoName); |
100 | - } else { |
|
100 | + }else { |
|
101 | 101 | |
102 | 102 | $photoId = WorkEnvironmentDAO::insertWorkplacePhoto($workplacePhoto); |
103 | 103 | |
@@ -113,7 +113,7 @@ discard block |
||
113 | 113 | if ($caption) { |
114 | 114 | $caption->setWorkplace_photo_id($photoId); |
115 | 115 | WorkEnvironmentDAO::updateWorkplacePhotoCaption($caption); |
116 | - } else { |
|
116 | + }else { |
|
117 | 117 | $caption = new WorkplacePhotoCaption($workEnvironmentId, $photoName, $photoId, ''); |
118 | 118 | WorkEnvironmentDAO::insertWorkplacePhotoCaption($caption); |
119 | 119 | } |
@@ -125,7 +125,7 @@ |
||
125 | 125 | public static function getWorkplacePhotoByManagerProfileAndName($photoName, $managerProfileId) { |
126 | 126 | if (WorkEnvironmentDAO::workplacePhotoExistsForManagerAndName($managerProfileId, $photoName)) { |
127 | 127 | return WorkEnvironmentDAO::getWorkplacePhoto($managerProfileId, $photoName); |
128 | - }else { |
|
128 | + } else { |
|
129 | 129 | return NULL; |
130 | 130 | } |
131 | 131 | } |
@@ -61,7 +61,7 @@ discard block |
||
61 | 61 | //if user_id is not null, then log the user in automatically |
62 | 62 | if ($existingUser) { |
63 | 63 | return $existingUser; |
64 | - } else { |
|
64 | + }else { |
|
65 | 65 | //if user_id is null, then the user is not registered and we should register them automatically |
66 | 66 | //register new user |
67 | 67 | $newUser = UserController::registerUser($user); |
@@ -87,7 +87,7 @@ discard block |
||
87 | 87 | $userId = $registeredUser->getUser_id(); |
88 | 88 | $jobSeekerProfile = new JobSeekerProfile(); |
89 | 89 | $result = JobSeekerController::addJobSeekerProfile($jobSeekerProfile, $userId); |
90 | - } else if ($registeredUser->getUser_role() === 'administrator') { |
|
90 | + }else if ($registeredUser->getUser_role() === 'administrator') { |
|
91 | 91 | |
92 | 92 | $userId = $registeredUser->getUser_id(); |
93 | 93 | $managerProfile = new ManagerProfile(); |
@@ -129,7 +129,7 @@ discard block |
||
129 | 129 | if ($oldUser->getEmail() != $updatedUser->getEmail()) { |
130 | 130 | $confEmailSent = UserController::confirmEmail($updatedUser); |
131 | 131 | $updatedUser->setIs_confirmed(false); |
132 | - } else { |
|
132 | + }else { |
|
133 | 133 | $updatedUser->setIs_confirmed($oldUser->getIs_confirmed()); |
134 | 134 | } |
135 | 135 | $updateSuccessful = UserDAO::updateUser($updatedUser); //do updates |
@@ -70,7 +70,7 @@ discard block |
||
70 | 70 | $questionAnswers = self::getApplicationQuestionAnswers($jobPosterApplication->getJob_poster_application_id()); |
71 | 71 | $jobApplicationWithAnswers = new JobApplicationWithAnswers($jobPosterApplication, $questionAnswers); |
72 | 72 | return $jobApplicationWithAnswers; |
73 | - } else { |
|
73 | + }else { |
|
74 | 74 | return false; |
75 | 75 | } |
76 | 76 | } |
@@ -165,7 +165,7 @@ discard block |
||
165 | 165 | $workSamples = WorkSampleController::getAllWorkSamplesForJobApplication($jobPosterApplicationId, $locale); |
166 | 166 | |
167 | 167 | return new FullJobApplication($jobPosterApplication, $jobSeekerProfile, $questionAnswers, $skillDeclarations, $microReferences, $workSamples); |
168 | - } else { |
|
168 | + }else { |
|
169 | 169 | return false; |
170 | 170 | } |
171 | 171 | } |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | $isDraft = self::jobApplicationIsDraft($jobPosterApplicationId); |
175 | 175 | if ($isDraft) { |
176 | 176 | return JobApplicationDAO::setJobAppliationStatus($jobPosterApplicationId, "Submitted"); |
177 | - } else { |
|
177 | + }else { |
|
178 | 178 | return ["false"=>"Cannot submit an application which is not a draft"]; |
179 | 179 | } |
180 | 180 | } |
@@ -37,7 +37,7 @@ discard block |
||
37 | 37 | if ($resourceKey != null && !empty($resourceKey)) { |
38 | 38 | if ($keyOption != null) { |
39 | 39 | return $commonLabelArray[$resourceKey][$keyOption]; |
40 | - } else { |
|
40 | + }else { |
|
41 | 41 | return $commonLabelArray[$resourceKey]; |
42 | 42 | } |
43 | 43 | } |
@@ -57,7 +57,7 @@ discard block |
||
57 | 57 | if ($resourceKey != null && !empty($resourceKey)) { |
58 | 58 | if ($keyOption != null) { |
59 | 59 | return $labelArray[$resourceKey][$keyOption]; |
60 | - } else { |
|
60 | + }else { |
|
61 | 61 | return $labelArray[$resourceKey]; |
62 | 62 | } |
63 | 63 | } |
@@ -21,7 +21,7 @@ |
||
21 | 21 | public static function getProfilePic($user_id) { |
22 | 22 | if (ProfilePicDAO::profilePicExistsForUser($user_id)) { |
23 | 23 | return ProfilePicDAO::getProfilePic($user_id); |
24 | - }else { |
|
24 | + } else { |
|
25 | 25 | return NULL; |
26 | 26 | } |
27 | 27 | } |
@@ -44,7 +44,7 @@ |
||
44 | 44 | //var_dump($message); |
45 | 45 | if (!@mail($to, $subject, $message, $headers)) { |
46 | 46 | return false; |
47 | - } else { |
|
47 | + }else { |
|
48 | 48 | return true; |
49 | 49 | } |
50 | 50 |
@@ -34,7 +34,7 @@ |
||
34 | 34 | $json = json_encode($result, JSON_PRETTY_PRINT); |
35 | 35 | header("Content-length:" . strlen($json)); |
36 | 36 | echo($json); |
37 | - } else { |
|
37 | + }else { |
|
38 | 38 | $result = array(); |
39 | 39 | $json = json_encode($result, JSON_PRETTY_PRINT); |
40 | 40 | echo($json); |