@@ -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 | ?> |
@@ -19,23 +19,29 @@ discard block |
||
19 | 19 | <div class="page-hero__navigation-item box med-1of5 lg-1of6" id="navigationHomeLinkWrapper" aria-hidden="false"> |
20 | 20 | <?php if (strpos($url, 'admin') !== false) : ?> |
21 | 21 | <a href="/admin/" id="navigationHomeLink">Home</a> |
22 | - <?php else : ?> |
|
22 | + <?php else { |
|
23 | + : ?> |
|
23 | 24 | <a href="/" id="navigationHomeLink">Home</a> |
24 | - <?php endif; ?> |
|
25 | + <?php endif; |
|
26 | +} |
|
27 | +?> |
|
25 | 28 | </div> |
26 | 29 | |
27 | 30 | <?php /* Checks to see if the page is the admin portal and then displays the admin home link. */ ?> |
28 | 31 | <?php $url = 'http://' . $_SERVER['SERVER_NAME'] . $_SERVER['REQUEST_URI']; ?> |
29 | 32 | <?php if (strpos($url, 'admin') !== false) : ?> |
30 | 33 | <?php /* No link for you! */ ?> |
31 | - <?php else : ?> |
|
34 | + <?php else { |
|
35 | + : ?> |
|
32 | 36 | <?php /* Browse Jobs */ ?> |
33 | 37 | <div class="page-hero__navigation-item box med-1of5 lg-1of6" id="navigationBrowseLinkWrapper" aria-hidden="false"> |
34 | 38 | <a href="#BrowseJobs" id="navigationBrowseLink" onclick="JobPostAPI.showBrowseJobs();TalentCloudAPI.setNav('navigationBrowseLinkWrapper');"> |
35 | 39 | Browse Jobs |
36 | 40 | </a> |
37 | 41 | </div> |
38 | - <?php endif; ?> |
|
42 | + <?php endif; |
|
43 | +} |
|
44 | +?> |
|
39 | 45 | |
40 | 46 | <?php /* Dashboard */ ?> |
41 | 47 | <div class="page-hero__navigation-item box med-1of5 lg-1of6 hidden" id="navigationDashboardLinkWrapper" aria-hidden="true"> |
@@ -78,18 +84,24 @@ discard block |
||
78 | 84 | <a href="javascript:void(0)" id="navigationPosterLink" onclick="CreateJobPosterAPI.showCreateJobPosterForm(this);TalentCloudAPI.setNav('navigationPosterLinkWrapper');">Job Poster |
79 | 85 | </a> |
80 | 86 | </div> |
81 | - <?php else : ?> |
|
87 | + <?php else { |
|
88 | + : ?> |
|
82 | 89 | <?php /* No link for you! */ ?> |
83 | - <?php endif; ?> |
|
90 | + <?php endif; |
|
91 | +} |
|
92 | +?> |
|
84 | 93 | |
85 | 94 | <?php /* Register */ |
86 | 95 | if (strpos($url, 'admin') !== false) : ?> |
87 | 96 | <div class="page-hero__navigation-item box med-1of5 lg-1of6 hidden" id="navigationRegisterLinkWrapper" aria-hidden="true"> |
88 | 97 | <?php echo("<a href=\"\" id=\"navigationRegisterLink\">Register</a>"); ?> |
89 | 98 | </div> |
90 | - <?php else : ?> |
|
99 | + <?php else { |
|
100 | + : ?> |
|
91 | 101 | <div class="page-hero__navigation-item box med-1of5 lg-1of6" id="navigationRegisterLinkWrapper" aria-hidden="false"> |
92 | - <?php echo("<a href=\"https://account.gccollab.ca/register?redirect_uri=https%3A%2F%2Ftc.gccollab.ca%2F\" id=\"navigationRegisterLink\">Register</a>"); ?> |
|
102 | + <?php echo("<a href=\"https://account.gccollab.ca/register?redirect_uri=https%3A%2F%2Ftc.gccollab.ca%2F\" id=\"navigationRegisterLink\">Register</a>"); |
|
103 | +} |
|
104 | +?> |
|
93 | 105 | </div> |
94 | 106 | <?php endif; ?> |
95 | 107 | |
@@ -125,13 +137,16 @@ discard block |
||
125 | 137 | ?> |
126 | 138 | </div> |
127 | 139 | |
128 | - <?php else : ?> |
|
140 | + <?php else { |
|
141 | + : ?> |
|
129 | 142 | |
130 | 143 | <?php if ($hasUser != null) : ?> |
131 | 144 | <div class="page-hero__navigation-item box med-1of5 lg-1of6 hidden" id="navigationLoginLinkWrapper"> |
132 | 145 | <?php else :?> |
133 | 146 | <div class="page-hero__navigation-item box med-1of5 lg-1of6" id="navigationLoginLinkWrapper"> |
134 | - <?php endif; ?> |
|
147 | + <?php endif; |
|
148 | +} |
|
149 | +?> |
|
135 | 150 | <?php |
136 | 151 | $loginLink = ""; |
137 | 152 | $loginLink .= OPENID_URI . AUTH_URI; |
@@ -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 | } |