@@ -307,8 +307,9 @@ |
||
307 | 307 | * |
308 | 308 | * @param string $path The path (relative to the application root) of the file |
309 | 309 | */ |
310 | - final protected function addJs($path){ |
|
311 | - if(in_array($path, $this->extraJs)){ |
|
310 | + final protected function addJs($path) |
|
311 | + { |
|
312 | + if(in_array($path, $this->extraJs)) { |
|
312 | 313 | // nothing to do |
313 | 314 | return; |
314 | 315 | } |
@@ -549,7 +549,8 @@ |
||
549 | 549 | * |
550 | 550 | * @return bool|null |
551 | 551 | */ |
552 | - public function getForceIdentified() { |
|
552 | + public function getForceIdentified() |
|
553 | + { |
|
553 | 554 | return $this->forceidentified; |
554 | 555 | } |
555 | 556 |
@@ -150,7 +150,8 @@ |
||
150 | 150 | if($user->getForceIdentified() === null) { |
151 | 151 | $idVerifier = new IdentificationVerifier($this->getHttpHelper(), $this->getSiteConfiguration(), $this->getDatabase()); |
152 | 152 | $this->assign('identificationStatus', $idVerifier->isUserIdentified($user->getOnWikiName()) ? 'detected' : 'missing'); |
153 | - } else { |
|
153 | + } |
|
154 | + else { |
|
154 | 155 | $this->assign('identificationStatus', $user->getForceIdentified() == 1 ? 'forced-on' : 'forced-off'); |
155 | 156 | } |
156 | 157 |
@@ -193,14 +193,16 @@ |
||
193 | 193 | return $this->partiallyLinked; |
194 | 194 | } |
195 | 195 | |
196 | - public function canCreateAccount() { |
|
196 | + public function canCreateAccount() |
|
197 | + { |
|
197 | 198 | return $this->isFullyLinked() |
198 | 199 | && $this->getIdentity(true)->getGrantBasic() |
199 | 200 | && $this->getIdentity(true)->getGrantHighVolume() |
200 | 201 | && $this->getIdentity(true)->getGrantCreateAccount(); |
201 | 202 | } |
202 | 203 | |
203 | - public function canWelcome() { |
|
204 | + public function canWelcome() |
|
205 | + { |
|
204 | 206 | return $this->isFullyLinked() |
205 | 207 | && $this->getIdentity(true)->getGrantBasic() |
206 | 208 | && $this->getIdentity(true)->getGrantHighVolume() |
@@ -131,7 +131,8 @@ |
||
131 | 131 | $task->setNotificationHelper($this->getNotificationHelper()); |
132 | 132 | } |
133 | 133 | |
134 | - public static function errorHandler($errno, $errstr, $errfile, $errline) { |
|
134 | + public static function errorHandler($errno, $errstr, $errfile, $errline) |
|
135 | + { |
|
135 | 136 | throw new Exception($errfile . "@" . $errline . ": " . $errstr); |
136 | 137 | } |
137 | 138 | } |
@@ -10,10 +10,10 @@ |
||
10 | 10 | { |
11 | 11 | $output = $input; |
12 | 12 | |
13 | - if(filter_var($input, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) !== false){ |
|
13 | + if(filter_var($input, FILTER_VALIDATE_IP, FILTER_FLAG_IPV4) !== false) { |
|
14 | 14 | $octets = explode('.', $input); |
15 | 15 | $output = ''; |
16 | - foreach ($octets as $octet){ |
|
16 | + foreach ($octets as $octet) { |
|
17 | 17 | $output .= str_pad(dechex($octet), 2, '0', STR_PAD_LEFT); |
18 | 18 | } |
19 | 19 |