Completed
Pull Request — master (#220)
by
unknown
03:53
created
public_html/inc/common/header-nav.php 1 patch
Braces   +40 added lines, -16 removed lines patch added patch discarded remove patch
@@ -19,23 +19,29 @@  discard block
 block discarded – undo
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">
@@ -61,11 +67,14 @@  discard block
 block discarded – undo
61 67
                     <a href="#CreateEditProfile" id="navigationProfileLink" onclick="CreateEditProfileAPI.showCreateEditProfile();TalentCloudAPI.setNav('navigationProfileLinkWrapper');">
62 68
                         My Profile
63 69
                     </a>
64
-                <?php else :?>
70
+                <?php else {
71
+    :?>
65 72
                     <a href="#MyProfile" id="navigationProfileLink" onclick="JobSeekerAPI.showMyJobSeekerProfile();TalentCloudAPI.setNav('navigationProfileLinkWrapper');">
66 73
                         My Profile
67 74
                     </a>
68
-                <?php endif; ?>
75
+                <?php endif;
76
+}
77
+?>
69 78
 
70 79
             </div>
71 80
 
@@ -75,18 +84,24 @@  discard block
 block discarded – undo
75 84
                     <a href="javascript:void(0)" id="navigationPosterLink" onclick="CreateJobPosterAPI.showCreateJobPosterForm(this);TalentCloudAPI.setNav('navigationPosterLinkWrapper');">Create Job Poster
76 85
                     </a>
77 86
                 </div>
78
-            <?php else : ?>
87
+            <?php else {
88
+    : ?>
79 89
                 <?php /* No link for you! */ ?>
80
-            <?php endif; ?>
90
+            <?php endif;
91
+}
92
+?>
81 93
 
82 94
             <?php /* Register */
83 95
                 if (strpos($url, 'admin') !== false) : ?>
84 96
                     <div class="page-hero__navigation-item box med-1of5 lg-1of6 hidden" id="navigationRegisterLinkWrapper" aria-hidden="true">
85 97
                         <?php echo("<a href=\"\" id=\"navigationRegisterLink\">Register</a>"); ?>
86 98
                     </div>
87
-                <?php else : ?>
99
+                <?php else {
100
+    : ?>
88 101
                     <div class="page-hero__navigation-item box med-1of5 lg-1of6" id="navigationRegisterLinkWrapper" aria-hidden="false">
89
-                        <?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
+?>
90 105
                     </div>
91 106
                 <?php endif; ?>
92 107
 
@@ -102,9 +117,12 @@  discard block
 block discarded – undo
102 117
 
103 118
                 <?php if ($hasUser != null) : ?>
104 119
                     <div class="page-hero__navigation-item box med-1of5 lg-1of6 hidden" id="navigationLoginLinkWrapper" aria-hidden="true">
105
-                <?php else :?>
120
+                <?php else {
121
+    :?>
106 122
                     <div class="page-hero__navigation-item box med-1of5 lg-1of6" id="navigationLoginLinkWrapper" aria-hidden="false">
107
-                <?php endif; ?>
123
+                <?php endif;
124
+}
125
+?>
108 126
                         <?php
109 127
                             $loginLink = "";
110 128
                             $loginLink .= OPENID_URI . AUTH_URI;
@@ -119,13 +137,16 @@  discard block
 block discarded – undo
119 137
                         ?>
120 138
                     </div>
121 139
 
122
-            <?php else : ?>
140
+            <?php else {
141
+    : ?>
123 142
 
124 143
                 <?php if ($hasUser != null) : ?>
125 144
                     <div class="page-hero__navigation-item box med-1of5 lg-1of6 hidden" id="navigationLoginLinkWrapper">
126 145
                 <?php else :?>
127 146
                     <div class="page-hero__navigation-item box med-1of5 lg-1of6" id="navigationLoginLinkWrapper">
128
-                <?php endif; ?>
147
+                <?php endif;
148
+}
149
+?>
129 150
                         <?php
130 151
                             $loginLink = "";
131 152
                             $loginLink .= OPENID_URI . AUTH_URI;
@@ -156,9 +177,12 @@  discard block
 block discarded – undo
156 177
     <div id="h1">
157 178
         <?php if (strpos($url, 'admin') !== false) : ?>
158 179
             <h1 class="visuallyHidden">Talent Cloud - Admin Portal</h1>
159
-        <?php else :?>
180
+        <?php else {
181
+    :?>
160 182
             <h1 class="visuallyHidden">Talent Cloud - Applicant Portal</h1>
161
-        <?php endif; ?>
183
+        <?php endif;
184
+}
185
+?>
162 186
     </div>
163 187
 
164 188
     <div class="landing-hero" id="landingHero">
Please login to merge, or discard this patch.
public_html/tc/controller/UserController.php 1 patch
Spacing   +4 added lines, -4 removed lines patch added patch discarded remove patch
@@ -86,7 +86,7 @@  discard block
 block discarded – undo
86 86
             $newUser->setUser_role(ROLE_APPLICANT);
87 87
             $newUser->setIs_confirmed(true);
88 88
             $user = UserController::registerUser($newUser);
89
-        } else {
89
+        }else {
90 90
             throw new Exception("Unable to access openId userInfo");
91 91
         }
92 92
         return $user;
@@ -105,7 +105,7 @@  discard block
 block discarded – undo
105 105
         //if user_id is not null, then log the user in automatically
106 106
         if ($existingUser) {
107 107
             return $existingUser;
108
-        } else {
108
+        }else {
109 109
             return null;
110 110
             /*
111 111
               //if user_id is null, then the user is not registered and we should register them automatically
@@ -143,7 +143,7 @@  discard block
 block discarded – undo
143 143
                 $jobSeekerProfile = new JobSeekerProfile();
144 144
                 JobSeekerController::addJobSeekerProfile($jobSeekerProfile, $userId);
145 145
             }
146
-        } else if ($user->getUser_role() === ROLE_ADMIN) {
146
+        }else if ($user->getUser_role() === ROLE_ADMIN) {
147 147
 
148 148
             $userId = $user->getUser_id();
149 149
 
@@ -186,7 +186,7 @@  discard block
 block discarded – undo
186 186
             if ($oldUser->getEmail() != $updatedUser->getEmail()) {
187 187
                 $confEmailSent = UserController::confirmEmail($updatedUser);
188 188
                 $updatedUser->setIs_confirmed(false);
189
-            } else {
189
+            }else {
190 190
                 $updatedUser->setIs_confirmed($oldUser->getIs_confirmed());
191 191
             }
192 192
             $updateSuccessful = UserDAO::updateUser($updatedUser); //do updates
Please login to merge, or discard this patch.