@@ -240,7 +240,7 @@ |
||
| 240 | 240 | $loginLink .= "?response_type=" . URL_RESPONSE_TYPES; |
| 241 | 241 | if (strpos($url, 'admin') !== false) { |
| 242 | 242 | $loginLink .= "&redirect_uri=" . urlencode(REDIRECT_URI_ADMIN); |
| 243 | - }else { |
|
| 243 | + } else { |
|
| 244 | 244 | $loginLink .= "&redirect_uri=" . urlencode(REDIRECT_URI); |
| 245 | 245 | } |
| 246 | 246 | $loginLink .= "&nonce=" . $nonce; |
@@ -22,7 +22,7 @@ |
||
| 22 | 22 | $url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; |
| 23 | 23 | if (strpos($url, 'admin') !== false) { |
| 24 | 24 | echo '<p id="adminTagline" class="centered">Changing government through it\'s people</p>'; |
| 25 | - }else { |
|
| 25 | + } else { |
|
| 26 | 26 | |
| 27 | 27 | } |
| 28 | 28 | ?> |
@@ -62,7 +62,7 @@ discard block |
||
| 62 | 62 | |
| 63 | 63 | header("Refresh:0; url=\"" . REDIRECT_URI . ""); |
| 64 | 64 | } |
| 65 | -}else { |
|
| 65 | +} else { |
|
| 66 | 66 | $_SESSION['openid_connect_state'] = $state; |
| 67 | 67 | $_SESSION['openid_connect_nonce'] = $nonce; |
| 68 | 68 | } |
@@ -108,7 +108,7 @@ discard block |
||
| 108 | 108 | echo("UserAPI.storeSessionUser(" . json_encode($userInfo) . ");"); |
| 109 | 109 | echo("UserAPI.login();"); |
| 110 | 110 | } |
| 111 | - }else { |
|
| 111 | + } else { |
|
| 112 | 112 | echo("UserAPI.login();"); |
| 113 | 113 | } |
| 114 | 114 | //var isExistingUser = UserAPI.authenticate(UserAPI.getSessionUserAsJSON()); |
@@ -184,7 +184,7 @@ |
||
| 184 | 184 | * @param ManagerProfileDetails $managerProfileDetails |
| 185 | 185 | * @return int $profileId |
| 186 | 186 | */ |
| 187 | - public static function updateManagerProfile(ManagerProfile $managerProfile, ManagerProfileDetailsNonLocalized $managerProfileDetails){ |
|
| 187 | + public static function updateManagerProfile(ManagerProfile $managerProfile, ManagerProfileDetailsNonLocalized $managerProfileDetails) { |
|
| 188 | 188 | |
| 189 | 189 | //var_dump($managerProfile->getUser_manager_profile_id()); |
| 190 | 190 | |
@@ -59,7 +59,7 @@ discard block |
||
| 59 | 59 | * @param dbconnection $link |
| 60 | 60 | * $link is the connection required to be closed |
| 61 | 61 | */ |
| 62 | - protected static function closeConnection($link){ |
|
| 62 | + protected static function closeConnection($link) { |
|
| 63 | 63 | $link = null; |
| 64 | 64 | } |
| 65 | 65 | |
@@ -69,14 +69,14 @@ discard block |
||
| 69 | 69 | * @param type $sql |
| 70 | 70 | * @return type |
| 71 | 71 | */ |
| 72 | - protected static function executeDBTransaction($link,$sql){ |
|
| 73 | - try{ |
|
| 72 | + protected static function executeDBTransaction($link, $sql) { |
|
| 73 | + try { |
|
| 74 | 74 | $link->beginTransaction(); |
| 75 | 75 | $link->exec($sql); |
| 76 | 76 | $link->commit(); |
| 77 | 77 | } catch (Exception $e) { |
| 78 | 78 | $link->rollBack(); |
| 79 | - die('<b>Error:</b> '.$e->getMessage()); |
|
| 79 | + die('<b>Error:</b> ' . $e->getMessage()); |
|
| 80 | 80 | } |
| 81 | 81 | return $link; |
| 82 | 82 | } |
@@ -98,10 +98,10 @@ discard block |
||
| 98 | 98 | |
| 99 | 99 | try {
|
| 100 | 100 | $sql->execute() or die("ERROR: " . implode(":", $conn->errorInfo()));
|
| 101 | - $sql->setFetchMode( PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, 'JobPoster',array( |
|
| 101 | + $sql->setFetchMode(PDO::FETCH_CLASS|PDO::FETCH_PROPS_LATE, 'JobPoster', array( |
|
| 102 | 102 | 'id', 'locale_id', 'manager_user_id', 'title', 'description', 'applicants_to_date', 'term_qty', 'term_units', 'job_min_level', |
| 103 | - 'job_max_level', 'start_date','open_date', 'close_date', 'department', 'branch', 'division', 'location_province', 'location_city', |
|
| 104 | - 'remuneration_range_low','remuneration_range_high','impact','key_tasks','core_competencies','dev_competencies', |
|
| 103 | + 'job_max_level', 'start_date', 'open_date', 'close_date', 'department', 'branch', 'division', 'location_province', 'location_city', |
|
| 104 | + 'remuneration_range_low', 'remuneration_range_high', 'impact', 'key_tasks', 'core_competencies', 'dev_competencies', |
|
| 105 | 105 | 'classification', 'security_clearance', 'language_requirement' |
| 106 | 106 | )); |
| 107 | 107 | $jobPosters = $sql->fetchAll(); |
@@ -200,7 +200,7 @@ discard block |
||
| 200 | 200 | $sql->setFetchMode(PDO::FETCH_CLASS|PDO::FETCH_PROPS_LATE, 'JobPoster', array( |
| 201 | 201 | 'id', 'locale_id', 'manager_user_id', 'title', 'description', 'applicants_to_date', 'term_qty', 'term_units', 'job_min_level', |
| 202 | 202 | 'job_max_level', 'start_date', 'open_date', 'close_date', 'department', 'branch', 'division', 'location_province', 'location_city', |
| 203 | - 'remuneration_range_low','remuneration_range_high','impact','classification','security_clearance', 'language_requirement', |
|
| 203 | + 'remuneration_range_low', 'remuneration_range_high', 'impact', 'classification', 'security_clearance', 'language_requirement', |
|
| 204 | 204 | )); |
| 205 | 205 | $jobPoster = $sql->fetch(); |
| 206 | 206 | } catch (PDOException $e) {
|
@@ -593,11 +593,11 @@ discard block |
||
| 593 | 593 | |
| 594 | 594 | try {
|
| 595 | 595 | $sql->execute() or die("ERROR: " . implode(":", $conn->errorInfo()));
|
| 596 | - $sql->setFetchMode( PDO::FETCH_CLASS | PDO::FETCH_PROPS_LATE, 'JobPoster',array( |
|
| 596 | + $sql->setFetchMode(PDO::FETCH_CLASS|PDO::FETCH_PROPS_LATE, 'JobPoster', array( |
|
| 597 | 597 | 'id', 'locale_id', 'manager_user_id', 'title', 'description', 'applicants_to_date', 'term_qty', 'term_units', 'job_min_level', |
| 598 | 598 | 'job_max_level', 'start_date', 'open_date', 'close_date', 'department', 'branch', 'division', 'location_province', 'location_city', |
| 599 | - 'remuneration_range_low','remuneration_range_high','impact','key_tasks','core_competencies','dev_competencies', |
|
| 600 | - 'classification', 'security_clearance','language_requirement' |
|
| 599 | + 'remuneration_range_low', 'remuneration_range_high', 'impact', 'key_tasks', 'core_competencies', 'dev_competencies', |
|
| 600 | + 'classification', 'security_clearance', 'language_requirement' |
|
| 601 | 601 | )); |
| 602 | 602 | $jobPosters = $sql->fetchAll(); |
| 603 | 603 | //var_dump($rows); |
@@ -503,14 +503,18 @@ |
||
| 503 | 503 | $sqlEssentialType->execute() or die("ERROR: " . implode(":", $link->errorInfo()));
|
| 504 | 504 | $sqlAssetType->execute() or die("ERROR: " . implode(":", $link->errorInfo()));
|
| 505 | 505 | |
| 506 | - if (sizeof($key_task_data) > 0) |
|
| 507 | - $sql4->execute($key_task_data) or die("ERROR: " . implode(":", $link->errorInfo()));
|
|
| 508 | - if (sizeof($core_competency_data) > 0) |
|
| 509 | - $sql5->execute($core_competency_data) or die("ERROR: " . implode(":", $link->errorInfo()));
|
|
| 510 | - if (sizeof($dev_competency_data) > 0) |
|
| 511 | - $sql6->execute($dev_competency_data) or die("ERROR: " . implode(":", $link->errorInfo()));
|
|
| 512 | - if (sizeof($question_data) > 0) |
|
| 513 | - $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 | + } |
|
| 514 | 518 | |
| 515 | 519 | $link->commit(); |
| 516 | 520 | } catch (PDOException $e) {
|
@@ -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 | } |
@@ -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 | } |
@@ -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 | } |