@@ -423,7 +423,7 @@ |
||
| 423 | 423 | } |
| 424 | 424 | |
| 425 | 425 | /** |
| 426 | - * @return callable |
|
| 426 | + * @return string[] |
|
| 427 | 427 | */ |
| 428 | 428 | protected function getDefaultRoute() |
| 429 | 429 | { |
@@ -423,7 +423,7 @@ |
||
| 423 | 423 | } |
| 424 | 424 | |
| 425 | 425 | /** |
| 426 | - * @return callable |
|
| 426 | + * @return string[] |
|
| 427 | 427 | */ |
| 428 | 428 | protected function getDefaultRoute() |
| 429 | 429 | { |
@@ -20,11 +20,11 @@ |
||
| 20 | 20 | $data = $_GET['data']; |
| 21 | 21 | $tool = $_GET['tool']; |
| 22 | 22 | |
| 23 | - if($tool === 'link') |
|
| 23 | + if ($tool === 'link') |
|
| 24 | 24 | { |
| 25 | 25 | // quick security check - if you want to exploit something, you better be sure your exploit resolves via dns. |
| 26 | 26 | // this is not intended to catch everything, just as a quick sanity check. |
| 27 | - if(gethostbyname($data) == $data){ |
|
| 27 | + if (gethostbyname($data) == $data) { |
|
| 28 | 28 | echo 'Error resolving hostname, it doesn\'t look like this domain exists.'; |
| 29 | 29 | die(); |
| 30 | 30 | } |
@@ -20,11 +20,10 @@ |
||
| 20 | 20 | $data = $_GET['data']; |
| 21 | 21 | $tool = $_GET['tool']; |
| 22 | 22 | |
| 23 | - if($tool === 'link') |
|
| 24 | - { |
|
| 23 | + if($tool === 'link') { |
|
| 25 | 24 | // quick security check - if you want to exploit something, you better be sure your exploit resolves via dns. |
| 26 | 25 | // this is not intended to catch everything, just as a quick sanity check. |
| 27 | - if(gethostbyname($data) == $data){ |
|
| 26 | + if(gethostbyname($data) == $data) { |
|
| 28 | 27 | echo 'Error resolving hostname, it doesn\'t look like this domain exists.'; |
| 29 | 28 | die(); |
| 30 | 29 | } |
@@ -56,14 +56,14 @@ |
||
| 56 | 56 | try { |
| 57 | 57 | $request->save(); |
| 58 | 58 | } |
| 59 | - catch(OptimisticLockFailedException $ex){ |
|
| 59 | + catch (OptimisticLockFailedException $ex) { |
|
| 60 | 60 | // Okay. Someone's edited this in the time between us loading this page and doing the checks, and us getting |
| 61 | 61 | // to saving the page. We *do not* want to show an optimistic lock failure, the most likely problem is they |
| 62 | 62 | // double-loaded this page (see #255). Let's confirm this, and bomb out with a success message if it's the |
| 63 | 63 | // case. |
| 64 | 64 | |
| 65 | 65 | $request = Request::getById($id, $this->getDatabase()); |
| 66 | - if($request->getEmailConfirm() === 'Confirmed') { |
|
| 66 | + if ($request->getEmailConfirm() === 'Confirmed') { |
|
| 67 | 67 | // we've already done the sanity checks above |
| 68 | 68 | |
| 69 | 69 | $this->redirect('requestSubmitted'); |
@@ -56,7 +56,7 @@ |
||
| 56 | 56 | try { |
| 57 | 57 | $request->save(); |
| 58 | 58 | } |
| 59 | - catch(OptimisticLockFailedException $ex){ |
|
| 59 | + catch(OptimisticLockFailedException $ex) { |
|
| 60 | 60 | // Okay. Someone's edited this in the time between us loading this page and doing the checks, and us getting |
| 61 | 61 | // to saving the page. We *do not* want to show an optimistic lock failure, the most likely problem is they |
| 62 | 62 | // double-loaded this page (see #255). Let's confirm this, and bomb out with a success message if it's the |
@@ -164,6 +164,7 @@ |
||
| 164 | 164 | |
| 165 | 165 | /** |
| 166 | 166 | * @param TorExitProvider $torExitProvider |
| 167 | + * @return void |
|
| 167 | 168 | */ |
| 168 | 169 | public function setTorExitProvider($torExitProvider); |
| 169 | 170 | } |
| 170 | 171 | \ No newline at end of file |
@@ -414,7 +414,7 @@ |
||
| 414 | 414 | . '|' . $this->forwardedip // } private data not known to those without access |
| 415 | 415 | . '|' . $this->useragent // } |
| 416 | 416 | . '|' . $this->email // } |
| 417 | - . '|' . $this->status; // to rudimentarily invalidate the token on status change |
|
| 417 | + . '|' . $this->status; // to rudimentarily invalidate the token on status change |
|
| 418 | 418 | |
| 419 | 419 | return hash('sha256', $data); |
| 420 | 420 | } |
@@ -57,11 +57,11 @@ |
||
| 57 | 57 | ) { |
| 58 | 58 | $this->primaryDatabase = $primaryDatabase; |
| 59 | 59 | |
| 60 | - if(true){ |
|
| 60 | + if (true) { |
|
| 61 | 61 | $this->notificationsDatabase = $notificationsDatabase; |
| 62 | 62 | $this->notificationsEnabled = $siteConfiguration->getIrcNotificationsEnabled(); |
| 63 | 63 | } |
| 64 | - else{ |
|
| 64 | + else { |
|
| 65 | 65 | $this->notificationsEnabled = false; |
| 66 | 66 | } |
| 67 | 67 | |
@@ -57,11 +57,11 @@ |
||
| 57 | 57 | ) { |
| 58 | 58 | $this->primaryDatabase = $primaryDatabase; |
| 59 | 59 | |
| 60 | - if(true){ |
|
| 60 | + if(true) { |
|
| 61 | 61 | $this->notificationsDatabase = $notificationsDatabase; |
| 62 | 62 | $this->notificationsEnabled = $siteConfiguration->getIrcNotificationsEnabled(); |
| 63 | 63 | } |
| 64 | - else{ |
|
| 64 | + else { |
|
| 65 | 65 | $this->notificationsEnabled = false; |
| 66 | 66 | } |
| 67 | 67 | |
@@ -273,7 +273,7 @@ |
||
| 273 | 273 | $welcomeTemplate = WelcomeTemplate::getById($objectId, $database); |
| 274 | 274 | |
| 275 | 275 | // some old templates have been completely deleted and lost to the depths of time. |
| 276 | - if($welcomeTemplate === false){ |
|
| 276 | + if ($welcomeTemplate === false) { |
|
| 277 | 277 | return "Welcome template #{$objectId}"; |
| 278 | 278 | } else { |
| 279 | 279 | $userCode = htmlentities($welcomeTemplate->getUserCode(), ENT_COMPAT, 'UTF-8'); |
@@ -273,9 +273,10 @@ |
||
| 273 | 273 | $welcomeTemplate = WelcomeTemplate::getById($objectId, $database); |
| 274 | 274 | |
| 275 | 275 | // some old templates have been completely deleted and lost to the depths of time. |
| 276 | - if($welcomeTemplate === false){ |
|
| 276 | + if($welcomeTemplate === false) { |
|
| 277 | 277 | return "Welcome template #{$objectId}"; |
| 278 | - } else { |
|
| 278 | + } |
|
| 279 | + else { |
|
| 279 | 280 | $userCode = htmlentities($welcomeTemplate->getUserCode(), ENT_COMPAT, 'UTF-8'); |
| 280 | 281 | return "<a href=\"{$baseurl}/internal.php/welcomeTemplates/view?template={$objectId}\">{$userCode}</a>"; |
| 281 | 282 | } |