@@ -19,7 +19,7 @@ discard block |
||
19 | 19 | } |
20 | 20 | |
21 | 21 | body { |
22 | - background: <?php echo $colour1;?>; |
|
22 | + background: <?php echo $colour1; ?>; |
|
23 | 23 | color: #000000; |
24 | 24 | font-family:"Open Sans", Helvetica, sans-serif; |
25 | 25 | font-size:12px; |
@@ -33,7 +33,7 @@ discard block |
||
33 | 33 | } |
34 | 34 | |
35 | 35 | button { |
36 | - background: <?php echo $colour2;?>; |
|
36 | + background: <?php echo $colour2; ?>; |
|
37 | 37 | color: #FFFFFF; |
38 | 38 | min-height: 23px; |
39 | 39 | border-left-style: outset; |
@@ -187,9 +187,9 @@ discard block |
||
187 | 187 | border-bottom-style:solid; |
188 | 188 | border-top-width:5px; |
189 | 189 | border-bottom-width:5px; |
190 | - border-color: <?php echo $colour1;?>; |
|
190 | + border-color: <?php echo $colour1; ?>; |
|
191 | 191 | padding-left:30px; |
192 | - color: <?php echo $colour2;?>; |
|
192 | + color: <?php echo $colour2; ?>; |
|
193 | 193 | } |
194 | 194 | |
195 | 195 | div.pagecontent { |
@@ -382,7 +382,7 @@ discard block |
||
382 | 382 | |
383 | 383 | span.edu_cat { |
384 | 384 | font-weight: bold; |
385 | - color: <?php echo $colour2;?>; |
|
385 | + color: <?php echo $colour2; ?>; |
|
386 | 386 | } |
387 | 387 | |
388 | 388 | span.tooltip { |
@@ -495,7 +495,7 @@ discard block |
||
495 | 495 | border-bottom-style:solid; |
496 | 496 | border-top-width:5px; |
497 | 497 | border-bottom-width:5px; |
498 | - border-color: <?php echo $colour1;?>; |
|
498 | + border-color: <?php echo $colour1; ?>; |
|
499 | 499 | padding-left:30px; |
500 | 500 | } |
501 | 501 | |
@@ -549,7 +549,7 @@ discard block |
||
549 | 549 | } |
550 | 550 | |
551 | 551 | span.redirect_link { |
552 | - background: <?php echo $colour2;?>; color: #FFFFFF; height: 23px; |
|
552 | + background: <?php echo $colour2; ?>; color: #FFFFFF; height: 23px; |
|
553 | 553 | border-left-style: inset; border-left-width: 1px; border-left-color: #8bbacb; |
554 | 554 | border-top-style: inset; border-top-width: 1px; border-top-color: #8bbacb; |
555 | 555 | border-right-style: outset; border-right-width: 2px; border-right-color: #043d52; |
@@ -620,7 +620,7 @@ discard block |
||
620 | 620 | width: 30em; |
621 | 621 | padding-left: 10px; |
622 | 622 | padding-right: 00px; |
623 | - background: <?php echo $colour2;?>; |
|
623 | + background: <?php echo $colour2; ?>; |
|
624 | 624 | color: #FFFFFF; |
625 | 625 | box-shadow: 10px 10px 5px #888888; |
626 | 626 | } |
@@ -670,7 +670,7 @@ discard block |
||
670 | 670 | // border-bottom-width:5px; |
671 | 671 | border-color: #e7e7e7; |
672 | 672 | padding-left:30px; |
673 | - color: <?php echo $colour2;?>; |
|
673 | + color: <?php echo $colour2; ?>; |
|
674 | 674 | } |
675 | 675 | |
676 | 676 | #headingx h1 { |
@@ -689,7 +689,7 @@ discard block |
||
689 | 689 | text-align: justify; |
690 | 690 | border-bottom-style:solid; |
691 | 691 | border-bottom-width:5px; |
692 | - border-color: <?php echo $colour1;?>; |
|
692 | + border-color: <?php echo $colour1; ?>; |
|
693 | 693 | font-size: 14px; |
694 | 694 | font-weight: normal; |
695 | 695 | } |
@@ -698,7 +698,7 @@ discard block |
||
698 | 698 | |
699 | 699 | #faq { |
700 | 700 | padding: 20px; |
701 | - color: <?php echo $colour2;?>; |
|
701 | + color: <?php echo $colour2; ?>; |
|
702 | 702 | background: #ffffff; |
703 | 703 | } |
704 | 704 | |
@@ -738,7 +738,7 @@ discard block |
||
738 | 738 | |
739 | 739 | #menu_column { |
740 | 740 | border-right:solid; |
741 | - border-color: <?php echo $colour1;?>; |
|
741 | + border-color: <?php echo $colour1; ?>; |
|
742 | 742 | border-width:5px; |
743 | 743 | min-height:400px; |
744 | 744 | padding-left: 10px; |
@@ -756,11 +756,11 @@ discard block |
||
756 | 756 | } |
757 | 757 | |
758 | 758 | a:link { |
759 | - color:<?php echo $colour2;?>; |
|
759 | + color:<?php echo $colour2; ?>; |
|
760 | 760 | } |
761 | 761 | |
762 | 762 | a:visited { |
763 | - color:<?php echo $colour2;?>; |
|
763 | + color:<?php echo $colour2; ?>; |
|
764 | 764 | } |
765 | 765 | |
766 | 766 | a:hover { |
@@ -768,7 +768,7 @@ discard block |
||
768 | 768 | } |
769 | 769 | |
770 | 770 | a:active { |
771 | - color:<?php echo $colour2;?>; |
|
771 | + color:<?php echo $colour2; ?>; |
|
772 | 772 | } |
773 | 773 | |
774 | 774 | .comment { |
@@ -232,7 +232,7 @@ discard block |
||
232 | 232 | $fcontents .= "\n" . '!define USER_GROUP "' . $this->translateString(str_replace('"', '$\\"', $attr['profile:name'][0]), $this->codePage) . '" |
233 | 233 | '; |
234 | 234 | } |
235 | - $fcontents .= ' |
|
235 | + $fcontents .= ' |
|
236 | 236 | Caption "' . $this->translateString(sprintf(WindowsCommon::sprint_nsi(_("%s installer for %s")), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $attr['general:instname'][0]), $this->codePage) . '" |
237 | 237 | !define APPLICATION "' . $this->translateString(sprintf(WindowsCommon::sprint_nsi(_("%s installer for %s")), CONFIG_CONFASSISTANT['CONSORTIUM']['display_name'], $attr['general:instname'][0]), $this->codePage) . '" |
238 | 238 | !define VERSION "' . \core\CAT::VERSION_MAJOR . '.' . \core\CAT::VERSION_MINOR . '" |
@@ -241,8 +241,8 @@ discard block |
||
241 | 241 | !define LOCALE "' . preg_replace('/\..*$/', '', CONFIG['LANGUAGES'][$this->languageInstance->getLang()]['locale']) . '" |
242 | 242 | ;-------------------------------- |
243 | 243 | !define ORGANISATION "' . $this->translateString($attr['general:instname'][0], $this->codePage) . '" |
244 | -!define SUPPORT "' . ((isset($attr['support:email'][0]) && $attr['support:email'][0] ) ? $attr['support:email'][0] : $this->translateString($this->support_email_substitute, $this->codePage)) . '" |
|
245 | -!define URL "' . ((isset($attr['support:url'][0]) && $attr['support:url'][0] ) ? $attr['support:url'][0] : $this->translateString($this->support_url_substitute, $this->codePage)) . '" |
|
244 | +!define SUPPORT "' . ((isset($attr['support:email'][0]) && $attr['support:email'][0]) ? $attr['support:email'][0] : $this->translateString($this->support_email_substitute, $this->codePage)) . '" |
|
245 | +!define URL "' . ((isset($attr['support:url'][0]) && $attr['support:url'][0]) ? $attr['support:url'][0] : $this->translateString($this->support_url_substitute, $this->codePage)) . '" |
|
246 | 246 | '; |
247 | 247 | |
248 | 248 | |
@@ -256,11 +256,11 @@ discard block |
||
256 | 256 | $fcontents .= '!define REALM "' . $attr['internal:realm'][0] . '" |
257 | 257 | '; |
258 | 258 | } |
259 | - if(!empty($attr['internal:hint_userinput_suffix'][0]) && $attr['internal:hint_userinput_suffix'][0] == 1) { |
|
259 | + if (!empty($attr['internal:hint_userinput_suffix'][0]) && $attr['internal:hint_userinput_suffix'][0] == 1) { |
|
260 | 260 | $fcontents .= '!define HINT_USER_INPUT "' . $attr['internal:hint_userinput_suffix'][0] . '" |
261 | 261 | '; |
262 | 262 | } |
263 | - if(!empty($attr['internal:verify_userinput_suffix'][0]) && $attr['internal:verify_userinput_suffix'][0] == 1) { |
|
263 | + if (!empty($attr['internal:verify_userinput_suffix'][0]) && $attr['internal:verify_userinput_suffix'][0] == 1) { |
|
264 | 264 | $fcontents .= '!define VERIFY_USER_REALM_INPUT "' . $attr['internal:verify_userinput_suffix'][0] . '" |
265 | 265 | '; |
266 | 266 | } |
@@ -137,7 +137,7 @@ |
||
137 | 137 | |
138 | 138 | $out .= 'Config.sb_user_file = """' . $this->mkSbUserFile() . '"""' . "\n"; |
139 | 139 | if (!empty($this->attributes['internal:realm'][0])) { |
140 | - $out .= 'Config.user_realm = "' . $this->attributes['internal:realm'][0] . "\"\n"; |
|
140 | + $out .= 'Config.user_realm = "' . $this->attributes['internal:realm'][0] . "\"\n"; |
|
141 | 141 | } |
142 | 142 | if(!empty($this->attributes['internal:hint_userinput_suffix'][0]) && $this->attributes['internal:hint_userinput_suffix'][0] == 1) { |
143 | 143 | $out .= "Config.hint_user_input = True\n"; |
@@ -33,9 +33,9 @@ discard block |
||
33 | 33 | public function writeInstaller() { |
34 | 34 | $installerPath = $this->installerBasename . ".py"; |
35 | 35 | $this->copyFile("main.py", $installerPath); |
36 | - $installer = fopen($installerPath,"a"); |
|
37 | - fwrite($installer,$this->writeMessages()); |
|
38 | - fwrite($installer,$this->writeConfigVars()); |
|
36 | + $installer = fopen($installerPath, "a"); |
|
37 | + fwrite($installer, $this->writeMessages()); |
|
38 | + fwrite($installer, $this->writeConfigVars()); |
|
39 | 39 | fwrite($installer, "run_installer()\n"); |
40 | 40 | return($installerPath); |
41 | 41 | } |
@@ -100,7 +100,7 @@ discard block |
||
100 | 100 | $out .= 'Messages.p12_title = "' . _("personal certificate file (p12 or pfx)") . "\"\n"; |
101 | 101 | $out .= 'Messages.save_wpa_conf = "' . _("Network Manager configuration failed, but we may generate a wpa_supplicant configuration file if you wish. Be warned that your connection password will be saved in this file as clear text.") . "\"\n"; |
102 | 102 | $out .= 'Messages.save_wpa_confirm = "' . _("Write the file") . "\"\n"; |
103 | - $out .= 'Messages.wrongUsernameFormat = "' ._("Error: Your username must be of the form 'xxx@institutionID' e.g. '[email protected]'!") . "\"\n"; |
|
103 | + $out .= 'Messages.wrongUsernameFormat = "' . _("Error: Your username must be of the form 'xxx@institutionID' e.g. '[email protected]'!") . "\"\n"; |
|
104 | 104 | $out .= 'Messages.wrong_realm = "' . _("Error: your username must be in the form of 'xxx@{}'. Please enter the username in the correct format.") . "\"\n"; |
105 | 105 | $out .= 'Messages.wrong_realm_suffix = "' . _("Error: your username must be in the form of 'xxx@institutionID' and end with '{}'. Please enter the username in the correct format.") . "\"\n"; |
106 | 106 | |
@@ -129,8 +129,8 @@ discard block |
||
129 | 129 | $out .= "Config.use_other_tls_id = False\n"; |
130 | 130 | } |
131 | 131 | $tou = $this->mkUserConsent(); |
132 | - $out .= 'Config.tou = ' . ( $tou ? '"""' . $tou . '"""' : 'None' ) . "\n"; |
|
133 | - $out .= 'Config.CA = """' . $this->mkCAfile() . '"""' . "\n"; |
|
132 | + $out .= 'Config.tou = ' . ($tou ? '"""' . $tou . '"""' : 'None') . "\n"; |
|
133 | + $out .= 'Config.CA = """' . $this->mkCAfile() . '"""' . "\n"; |
|
134 | 134 | $out .= "Config.anonymous_identity = '" . $this->determineOuterIdString() . "'\n"; |
135 | 135 | $out .= 'Config.init_info = """' . $this->mkIntro() . '"""' . "\n"; |
136 | 136 | $out .= 'Config.init_confirmation = "' . $this->mkProfileConfirmation() . "\"\n"; |
@@ -139,10 +139,10 @@ discard block |
||
139 | 139 | if (!empty($this->attributes['internal:realm'][0])) { |
140 | 140 | $out .= 'Config.user_realm = "' . $this->attributes['internal:realm'][0] . "\"\n"; |
141 | 141 | } |
142 | - if(!empty($this->attributes['internal:hint_userinput_suffix'][0]) && $this->attributes['internal:hint_userinput_suffix'][0] == 1) { |
|
142 | + if (!empty($this->attributes['internal:hint_userinput_suffix'][0]) && $this->attributes['internal:hint_userinput_suffix'][0] == 1) { |
|
143 | 143 | $out .= "Config.hint_user_input = True\n"; |
144 | 144 | } |
145 | - if(!empty($this->attributes['internal:verify_userinput_suffix'][0]) && $this->attributes['internal:verify_userinput_suffix'][0] == 1) { |
|
145 | + if (!empty($this->attributes['internal:verify_userinput_suffix'][0]) && $this->attributes['internal:verify_userinput_suffix'][0] == 1) { |
|
146 | 146 | $out .= "Config.verify_user_realm_input = True\n"; |
147 | 147 | } |
148 | 148 | return $out; |
@@ -182,7 +182,7 @@ discard block |
||
182 | 182 | } |
183 | 183 | $out .= "'DNS:$oneServer'"; |
184 | 184 | } |
185 | - return "[" . $out. "]"; |
|
185 | + return "[" . $out . "]"; |
|
186 | 186 | } |
187 | 187 | |
188 | 188 | |
@@ -206,7 +206,7 @@ discard block |
||
206 | 206 | return '[' . implode(', ', $outArray) . ']'; |
207 | 207 | } |
208 | 208 | |
209 | - private function mkCAfile(){ |
|
209 | + private function mkCAfile() { |
|
210 | 210 | $out = ''; |
211 | 211 | $cAlist = $this->attributes['internal:CAs'][0]; |
212 | 212 | foreach ($cAlist as $oneCa) { |
@@ -124,8 +124,7 @@ |
||
124 | 124 | $out .= "Config.eap_inner = '" . $eapMethod['INNER'] . "'\n"; |
125 | 125 | if ($this->selectedEap == \core\common\EAP::EAPTYPE_TLS && isset($this->attributes['eap-specific:tls_use_other_id']) && $this->attributes['eap-specific:tls_use_other_id'][0] == 'on') { |
126 | 126 | $out .= "Config.use_other_tls_id = True\n"; |
127 | - } |
|
128 | - else { |
|
127 | + } else { |
|
129 | 128 | $out .= "Config.use_other_tls_id = False\n"; |
130 | 129 | } |
131 | 130 | $tou = $this->mkUserConsent(); |
@@ -6,7 +6,7 @@ discard block |
||
6 | 6 | * @author Zilvinas Vaira |
7 | 7 | * |
8 | 8 | */ |
9 | -class SilverbulletUser extends PersistentEntity{ |
|
9 | +class SilverbulletUser extends PersistentEntity { |
|
10 | 10 | |
11 | 11 | const LEVEL_GREEN = 0; |
12 | 12 | const LEVEL_YELLOW = 1; |
@@ -89,14 +89,14 @@ discard block |
||
89 | 89 | * @param int $profileId |
90 | 90 | * @param string $username |
91 | 91 | */ |
92 | - public function __construct($profileId, $username){ |
|
92 | + public function __construct($profileId, $username) { |
|
93 | 93 | parent::__construct(self::TABLE, self::TYPE_INST); |
94 | 94 | $this->setAttributeType(self::PROFILEID, Attribute::TYPE_INTEGER); |
95 | 95 | |
96 | 96 | $this->set(self::PROFILEID, $profileId); |
97 | 97 | $this->set(self::USERNAME, $username); |
98 | 98 | //$this->set(self::EXPIRY, 'NOW() + INTERVAL 1 WEEK'); |
99 | - $this->defaultUserExpiry = date('Y-m-d H:i:s',strtotime("today")); |
|
99 | + $this->defaultUserExpiry = date('Y-m-d H:i:s', strtotime("today")); |
|
100 | 100 | //$this->set(self::EXPIRY, $this->defaultUserExpiry); |
101 | 101 | } |
102 | 102 | |
@@ -105,7 +105,7 @@ discard block |
||
105 | 105 | * {@inheritDoc} |
106 | 106 | * @see \web\lib\admin\domain\PersistentInterface::validate() |
107 | 107 | */ |
108 | - public function validate(){ |
|
108 | + public function validate() { |
|
109 | 109 | return ( |
110 | 110 | !empty($this->get(self::PROFILEID)) |
111 | 111 | ); |
@@ -116,11 +116,11 @@ discard block |
||
116 | 116 | * |
117 | 117 | * @param string $date Takes any string value that can passed to strtotime() function. |
118 | 118 | */ |
119 | - public function setExpiry($date){ |
|
119 | + public function setExpiry($date) { |
|
120 | 120 | $tokenExpiry = date('Y-m-d H:i:s', strtotime($date)); |
121 | - if($tokenExpiry > $this->defaultUserExpiry){ |
|
121 | + if ($tokenExpiry > $this->defaultUserExpiry) { |
|
122 | 122 | $this->set(self::EXPIRY, $tokenExpiry); |
123 | - }else{ |
|
123 | + } else { |
|
124 | 124 | $this->clear(); |
125 | 125 | } |
126 | 126 | } |
@@ -128,8 +128,8 @@ discard block |
||
128 | 128 | /** |
129 | 129 | * |
130 | 130 | */ |
131 | - public function makeAcknowledged(){ |
|
132 | - $this->set(self::LAST_ACKNOWLEDGE, date('Y-m-d H:i:s',strtotime("now"))); |
|
131 | + public function makeAcknowledged() { |
|
132 | + $this->set(self::LAST_ACKNOWLEDGE, date('Y-m-d H:i:s', strtotime("now"))); |
|
133 | 133 | } |
134 | 134 | |
135 | 135 | /** |
@@ -137,14 +137,14 @@ discard block |
||
137 | 137 | * |
138 | 138 | * @return int One of the following constants LEVEL_GREEN, LEVEL_YELLOW, LEVEL_RED. |
139 | 139 | */ |
140 | - public function getAcknowledgeLevel(){ |
|
140 | + public function getAcknowledgeLevel() { |
|
141 | 141 | $max = CONFIG_CONFASSISTANT['SILVERBULLET']['gracetime'] ?? SilverbulletUser::MAX_ACKNOWLEDGE; |
142 | 142 | $days = $this->getAcknowledgeDays(); |
143 | - if($days <= $max * 0.2 && $days > $max * 0.1){ |
|
143 | + if ($days <= $max * 0.2 && $days > $max * 0.1) { |
|
144 | 144 | return self::LEVEL_YELLOW; |
145 | - }elseif ($days <= $max * 0.1){ |
|
145 | + }elseif ($days <= $max * 0.1) { |
|
146 | 146 | return self::LEVEL_RED; |
147 | - }else{ |
|
147 | + } else { |
|
148 | 148 | return self::LEVEL_GREEN; |
149 | 149 | } |
150 | 150 | } |
@@ -154,7 +154,7 @@ discard block |
||
154 | 154 | * |
155 | 155 | * @return number Number of days from 0 to maximum period. |
156 | 156 | */ |
157 | - public function getAcknowledgeDays(){ |
|
157 | + public function getAcknowledgeDays() { |
|
158 | 158 | $max = CONFIG_CONFASSISTANT['SILVERBULLET']['gracetime'] ?? SilverbulletUser::MAX_ACKNOWLEDGE; |
159 | 159 | $lastAcknowledge = strtotime($this->get(self::LAST_ACKNOWLEDGE)); |
160 | 160 | $now = strtotime('now'); |
@@ -162,11 +162,11 @@ discard block |
||
162 | 162 | return $days > 0 ? $days : 0; |
163 | 163 | } |
164 | 164 | |
165 | - public function getProfileId(){ |
|
165 | + public function getProfileId() { |
|
166 | 166 | return $this->get(self::PROFILEID); |
167 | 167 | } |
168 | 168 | |
169 | - public function getUsername(){ |
|
169 | + public function getUsername() { |
|
170 | 170 | return $this->get(self::USERNAME); |
171 | 171 | } |
172 | 172 | |
@@ -174,7 +174,7 @@ discard block |
||
174 | 174 | * |
175 | 175 | * @return boolean |
176 | 176 | */ |
177 | - public function isExpired(){ |
|
177 | + public function isExpired() { |
|
178 | 178 | $expiryTime = strtotime($this->get(self::EXPIRY)); |
179 | 179 | $currentTime = time(); |
180 | 180 | return $currentTime > $expiryTime; |
@@ -184,7 +184,7 @@ discard block |
||
184 | 184 | * |
185 | 185 | * @return string |
186 | 186 | */ |
187 | - public function getExpiry(){ |
|
187 | + public function getExpiry() { |
|
188 | 188 | return date('Y-m-d', strtotime($this->get(self::EXPIRY))); |
189 | 189 | } |
190 | 190 | |
@@ -192,7 +192,7 @@ discard block |
||
192 | 192 | * |
193 | 193 | * @return \web\lib\admin\domain\SilverbulletCertificate |
194 | 194 | */ |
195 | - public function getCertificates(){ |
|
195 | + public function getCertificates() { |
|
196 | 196 | return $this->certificates; |
197 | 197 | } |
198 | 198 | |
@@ -200,7 +200,7 @@ discard block |
||
200 | 200 | * |
201 | 201 | * @return \web\lib\admin\domain\SilverbulletInvitation |
202 | 202 | */ |
203 | - public function getInvitations(){ |
|
203 | + public function getInvitations() { |
|
204 | 204 | return $this->invitations; |
205 | 205 | } |
206 | 206 | |
@@ -208,7 +208,7 @@ discard block |
||
208 | 208 | * |
209 | 209 | * @return boolean |
210 | 210 | */ |
211 | - public function hasCertificates(){ |
|
211 | + public function hasCertificates() { |
|
212 | 212 | return count($this->certificates) > 0; |
213 | 213 | } |
214 | 214 | |
@@ -216,10 +216,10 @@ discard block |
||
216 | 216 | * |
217 | 217 | * @return boolean |
218 | 218 | */ |
219 | - public function hasActiveCertificates(){ |
|
219 | + public function hasActiveCertificates() { |
|
220 | 220 | $count = 0; |
221 | 221 | foreach ($this->certificates as $certificate) { |
222 | - if(!$certificate->isExpired() && !$certificate->isRevoked()){ |
|
222 | + if (!$certificate->isExpired() && !$certificate->isRevoked()) { |
|
223 | 223 | $count++; |
224 | 224 | } |
225 | 225 | } |
@@ -231,14 +231,14 @@ discard block |
||
231 | 231 | * |
232 | 232 | * @param boolean $isDeactivated |
233 | 233 | */ |
234 | - public function setDeactivated($isDeactivated, $profile){ |
|
234 | + public function setDeactivated($isDeactivated, $profile) { |
|
235 | 235 | $this->set(self::DEACTIVATION_STATUS, $isDeactivated ? self::INACTIVE : self::ACTIVE); |
236 | - if($isDeactivated){ |
|
236 | + if ($isDeactivated) { |
|
237 | 237 | $this->set(self::DEACTIVATION_TIME, date('Y-m-d H:i:s', strtotime("now"))); |
238 | 238 | foreach ($this->certificates as $certificate) { |
239 | 239 | $certificate->revoke($profile); |
240 | 240 | } |
241 | - }else{ |
|
241 | + } else { |
|
242 | 242 | $this->set(self::DEACTIVATION_TIME, '2000-01-01 00:00:00'); |
243 | 243 | } |
244 | 244 | } |
@@ -247,7 +247,7 @@ discard block |
||
247 | 247 | * |
248 | 248 | * @return boolean |
249 | 249 | */ |
250 | - public function isDeactivated(){ |
|
250 | + public function isDeactivated() { |
|
251 | 251 | return $this->get(self::DEACTIVATION_STATUS) == self::INACTIVE; |
252 | 252 | } |
253 | 253 | |
@@ -256,7 +256,7 @@ discard block |
||
256 | 256 | * {@inheritDoc} |
257 | 257 | * @see \web\lib\admin\domain\PersistentInterface::load() |
258 | 258 | */ |
259 | - public function load($searchAttribute = null){ |
|
259 | + public function load($searchAttribute = null) { |
|
260 | 260 | $state = parent::load(); |
261 | 261 | $this->certificates = SilverbulletCertificate::getList($this, $searchAttribute); |
262 | 262 | $this->invitations = SilverbulletInvitation::getList($this); |
@@ -268,7 +268,7 @@ discard block |
||
268 | 268 | * {@inheritDoc} |
269 | 269 | * @see \web\lib\admin\domain\PersistentInterface::delete() |
270 | 270 | */ |
271 | - public function delete(){ |
|
271 | + public function delete() { |
|
272 | 272 | $state = parent::delete(); |
273 | 273 | foreach ($this->certificates as $certificate) { |
274 | 274 | $certificate->delete(); |
@@ -284,7 +284,7 @@ discard block |
||
284 | 284 | * @param integer $userId |
285 | 285 | * @return \web\lib\admin\domain\SilverbulletUser |
286 | 286 | */ |
287 | - public static function prepare($userId){ |
|
287 | + public static function prepare($userId) { |
|
288 | 288 | $instance = new SilverbulletUser(null, ''); |
289 | 289 | $instance->set(self::ID, $userId); |
290 | 290 | return $instance; |
@@ -120,7 +120,7 @@ discard block |
||
120 | 120 | $tokenExpiry = date('Y-m-d H:i:s', strtotime($date)); |
121 | 121 | if($tokenExpiry > $this->defaultUserExpiry){ |
122 | 122 | $this->set(self::EXPIRY, $tokenExpiry); |
123 | - }else{ |
|
123 | + } else{ |
|
124 | 124 | $this->clear(); |
125 | 125 | } |
126 | 126 | } |
@@ -142,9 +142,9 @@ discard block |
||
142 | 142 | $days = $this->getAcknowledgeDays(); |
143 | 143 | if($days <= $max * 0.2 && $days > $max * 0.1){ |
144 | 144 | return self::LEVEL_YELLOW; |
145 | - }elseif ($days <= $max * 0.1){ |
|
145 | + } elseif ($days <= $max * 0.1){ |
|
146 | 146 | return self::LEVEL_RED; |
147 | - }else{ |
|
147 | + } else{ |
|
148 | 148 | return self::LEVEL_GREEN; |
149 | 149 | } |
150 | 150 | } |
@@ -238,7 +238,7 @@ discard block |
||
238 | 238 | foreach ($this->certificates as $certificate) { |
239 | 239 | $certificate->revoke($profile); |
240 | 240 | } |
241 | - }else{ |
|
241 | + } else{ |
|
242 | 242 | $this->set(self::DEACTIVATION_TIME, '2000-01-01 00:00:00'); |
243 | 243 | } |
244 | 244 | } |