@@ -33,7 +33,7 @@ discard block |
||
| 33 | 33 | $result = SkillDeclarationController::getAllSkillDeclarationsForJobApplication($jobPosterApplicationId); |
| 34 | 34 | $json = json_encode($result, JSON_PRETTY_PRINT); |
| 35 | 35 | echo($json); |
| 36 | - }else{ |
|
| 36 | + } else{ |
|
| 37 | 37 | $result = array(); |
| 38 | 38 | $json = json_encode($result, JSON_PRETTY_PRINT); |
| 39 | 39 | echo($json); |
@@ -86,7 +86,7 @@ discard block |
||
| 86 | 86 | } |
| 87 | 87 | |
| 88 | 88 | |
| 89 | - }else{ |
|
| 89 | + } else{ |
|
| 90 | 90 | $result = array(); |
| 91 | 91 | $json = json_encode($result, JSON_PRETTY_PRINT); |
| 92 | 92 | echo($json); |
@@ -123,7 +123,7 @@ discard block |
||
| 123 | 123 | exit; |
| 124 | 124 | } |
| 125 | 125 | |
| 126 | - }else{ |
|
| 126 | + } else{ |
|
| 127 | 127 | $result = array(); |
| 128 | 128 | $json = json_encode($result, JSON_PRETTY_PRINT); |
| 129 | 129 | echo($json); |
@@ -36,7 +36,7 @@ discard block |
||
| 36 | 36 | $result = TeamCultureController::getTeamCultureNonLocalizedByManagerProfileId($managerProfileId); |
| 37 | 37 | $json = json_encode($result, JSON_PRETTY_PRINT); |
| 38 | 38 | echo($json); |
| 39 | - }else{ |
|
| 39 | + } else{ |
|
| 40 | 40 | $result = array(); |
| 41 | 41 | $json = json_encode($result, JSON_PRETTY_PRINT); |
| 42 | 42 | echo($json); |
@@ -79,23 +79,23 @@ discard block |
||
| 79 | 79 | $resultJson = json_encode($result, JSON_PRETTY_PRINT); |
| 80 | 80 | echo($resultJson); |
| 81 | 81 | |
| 82 | - }else{ |
|
| 82 | + } else{ |
|
| 83 | 83 | header('HTTP/1.0 401 Unauthorized'); |
| 84 | 84 | echo json_encode(array("failed"=>"Invalid token"),JSON_FORCE_OBJECT); |
| 85 | 85 | exit; |
| 86 | 86 | } |
| 87 | 87 | |
| 88 | - }else{ |
|
| 88 | + } else{ |
|
| 89 | 89 | header('HTTP/1.0 401 Unauthorized'); |
| 90 | 90 | echo json_encode(array("failed"=>"No manager profile id provided"),JSON_FORCE_OBJECT); |
| 91 | 91 | exit; |
| 92 | 92 | } |
| 93 | - }else{ |
|
| 93 | + } else{ |
|
| 94 | 94 | header('HTTP/1.0 401 Unauthorized'); |
| 95 | 95 | echo json_encode(array("failed"=>'Invalid token, please reauthorize user'),JSON_FORCE_OBJECT); |
| 96 | 96 | exit; |
| 97 | 97 | } |
| 98 | - }else{ |
|
| 98 | + } else{ |
|
| 99 | 99 | header('HTTP/1.0 401 Unauthorized'); |
| 100 | 100 | echo json_encode(array("failed"=>'No authorization token provided'),JSON_FORCE_OBJECT); |
| 101 | 101 | exit; |
@@ -44,7 +44,7 @@ |
||
| 44 | 44 | $json = json_encode($result, JSON_PRETTY_PRINT); |
| 45 | 45 | echo($json); |
| 46 | 46 | } |
| 47 | - }else{ |
|
| 47 | + } else{ |
|
| 48 | 48 | $result = array(); |
| 49 | 49 | $json = json_encode($result, JSON_PRETTY_PRINT); |
| 50 | 50 | echo($json); |
@@ -446,14 +446,18 @@ discard block |
||
| 446 | 446 | $sqlEssentialType = $link->prepare($sqlStr_EssentialType); |
| 447 | 447 | $sqlAssetType = $link->prepare($sqlStr_AssetType); |
| 448 | 448 | |
| 449 | - if (sizeof($key_task_data) > 0) |
|
| 450 | - $sql4 = $link->prepare($sqlStr4); |
|
| 451 | - if (sizeof($core_competency_data) > 0) |
|
| 452 | - $sql5 = $link->prepare($sqlStr5); |
|
| 453 | - if (sizeof($dev_competency_data) > 0) |
|
| 454 | - $sql6 = $link->prepare($sqlStr6); |
|
| 455 | - if (sizeof($question_data) > 0) |
|
| 456 | - $sqlQuestions = $link->prepare($sqlQuestionsStr); |
|
| 449 | + if (sizeof($key_task_data) > 0) { |
|
| 450 | + $sql4 = $link->prepare($sqlStr4); |
|
| 451 | + } |
|
| 452 | + if (sizeof($core_competency_data) > 0) { |
|
| 453 | + $sql5 = $link->prepare($sqlStr5); |
|
| 454 | + } |
|
| 455 | + if (sizeof($dev_competency_data) > 0) { |
|
| 456 | + $sql6 = $link->prepare($sqlStr6); |
|
| 457 | + } |
|
| 458 | + if (sizeof($question_data) > 0) { |
|
| 459 | + $sqlQuestions = $link->prepare($sqlQuestionsStr); |
|
| 460 | + } |
|
| 457 | 461 | |
| 458 | 462 | |
| 459 | 463 | $sql1->bindValue(':term_units_id', $jobPosterNonLocalized->getTerm_units_id(), PDO::PARAM_INT);
|
@@ -499,14 +503,18 @@ discard block |
||
| 499 | 503 | $sqlEssentialType->execute() or die("ERROR: " . implode(":", $link->errorInfo()));
|
| 500 | 504 | $sqlAssetType->execute() or die("ERROR: " . implode(":", $link->errorInfo()));
|
| 501 | 505 | |
| 502 | - if (sizeof($key_task_data) > 0) |
|
| 503 | - $sql4->execute($key_task_data) or die("ERROR: " . implode(":", $link->errorInfo()));
|
|
| 504 | - if (sizeof($core_competency_data) > 0) |
|
| 505 | - $sql5->execute($core_competency_data) or die("ERROR: " . implode(":", $link->errorInfo()));
|
|
| 506 | - if (sizeof($dev_competency_data) > 0) |
|
| 507 | - $sql6->execute($dev_competency_data) or die("ERROR: " . implode(":", $link->errorInfo()));
|
|
| 508 | - if (sizeof($question_data) > 0) |
|
| 509 | - $sqlQuestions->execute ($question_data) or die("ERROR: " . implode(":", $link->errorInfo()));
|
|
| 506 | + if (sizeof($key_task_data) > 0) { |
|
| 507 | + $sql4->execute($key_task_data) or die("ERROR: " . implode(":", $link->errorInfo())); |
|
| 508 | + } |
|
| 509 | + if (sizeof($core_competency_data) > 0) { |
|
| 510 | + $sql5->execute($core_competency_data) or die("ERROR: " . implode(":", $link->errorInfo())); |
|
| 511 | + } |
|
| 512 | + if (sizeof($dev_competency_data) > 0) { |
|
| 513 | + $sql6->execute($dev_competency_data) or die("ERROR: " . implode(":", $link->errorInfo())); |
|
| 514 | + } |
|
| 515 | + if (sizeof($question_data) > 0) { |
|
| 516 | + $sqlQuestions->execute ($question_data) or die("ERROR: " . implode(":", $link->errorInfo())); |
|
| 517 | + } |
|
| 510 | 518 | |
| 511 | 519 | $link->commit(); |
| 512 | 520 | } catch (PDOException $e) {
|
@@ -47,7 +47,7 @@ |
||
| 47 | 47 | $link->setAttribute(PDO::ATTR_EMULATE_PREPARES, false); |
| 48 | 48 | |
| 49 | 49 | return $link; |
| 50 | - }catch(PDOException $e){ |
|
| 50 | + } catch(PDOException $e){ |
|
| 51 | 51 | die('<b>Error:</b> '.$e->getMessage()); |
| 52 | 52 | } |
| 53 | 53 | } |
@@ -19,10 +19,11 @@ |
||
| 19 | 19 | class ProfilePicController { |
| 20 | 20 | |
| 21 | 21 | public static function getProfilePic($user_id) { |
| 22 | - if (ProfilePicDAO::profilePicExistsForUser($user_id)) |
|
| 23 | - return ProfilePicDAO::getProfilePic($user_id); |
|
| 24 | - else |
|
| 25 | - return NULL; |
|
| 22 | + if (ProfilePicDAO::profilePicExistsForUser($user_id)) { |
|
| 23 | + return ProfilePicDAO::getProfilePic($user_id); |
|
| 24 | + } else { |
|
| 25 | + return NULL; |
|
| 26 | + } |
|
| 26 | 27 | } |
| 27 | 28 | |
| 28 | 29 | public static function putProfilePic($profile_pic) { |
@@ -123,10 +123,11 @@ |
||
| 123 | 123 | } |
| 124 | 124 | |
| 125 | 125 | public static function getWorkplacePhotoByManagerProfileAndName($photoName, $managerProfileId) { |
| 126 | - if (WorkEnvironmentDAO::workplacePhotoExistsForManagerAndName($managerProfileId, $photoName)) |
|
| 127 | - return WorkEnvironmentDAO::getWorkplacePhoto($managerProfileId, $photoName); |
|
| 128 | - else |
|
| 129 | - return NULL; |
|
| 126 | + if (WorkEnvironmentDAO::workplacePhotoExistsForManagerAndName($managerProfileId, $photoName)) { |
|
| 127 | + return WorkEnvironmentDAO::getWorkplacePhoto($managerProfileId, $photoName); |
|
| 128 | + } else { |
|
| 129 | + return NULL; |
|
| 130 | + } |
|
| 130 | 131 | } |
| 131 | 132 | |
| 132 | 133 | /** |
@@ -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 | |
@@ -61,7 +61,7 @@ |
||
| 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); |