@@ -24,7 +24,7 @@ |
||
24 | 24 | $headerString = ''; |
25 | 25 | |
26 | 26 | foreach ($headers as $header => $headerValue) { |
27 | - $headerString .= $header . ': ' . $headerValue . "\r\n"; |
|
27 | + $headerString .= $header.': '.$headerValue."\r\n"; |
|
28 | 28 | } |
29 | 29 | |
30 | 30 | mail($to, $subject, $content, $headerString); |
@@ -404,11 +404,11 @@ |
||
404 | 404 | public function getRevealHash() |
405 | 405 | { |
406 | 406 | $data = $this->id // unique per request |
407 | - . '|' . $this->ip // } |
|
408 | - . '|' . $this->forwardedip // } private data not known to those without access |
|
409 | - . '|' . $this->useragent // } |
|
410 | - . '|' . $this->email // } |
|
411 | - . '|' . $this->status; // to rudimentarily invalidate the token on status change |
|
407 | + . '|'.$this->ip // } |
|
408 | + . '|'.$this->forwardedip // } private data not known to those without access |
|
409 | + . '|'.$this->useragent // } |
|
410 | + . '|'.$this->email // } |
|
411 | + . '|'.$this->status; // to rudimentarily invalidate the token on status change |
|
412 | 412 | |
413 | 413 | return hash('sha256', $data); |
414 | 414 | } |
@@ -54,7 +54,7 @@ |
||
54 | 54 | final protected function setUpSmarty() |
55 | 55 | { |
56 | 56 | $this->smarty = new Smarty(); |
57 | - $this->smarty->addPluginsDir($this->getSiteConfiguration()->getFilePath() . '/smarty-plugins'); |
|
57 | + $this->smarty->addPluginsDir($this->getSiteConfiguration()->getFilePath().'/smarty-plugins'); |
|
58 | 58 | |
59 | 59 | $this->assign('currentUser', User::getCommunity()); |
60 | 60 | $this->assign('loggedIn', false); |
@@ -96,7 +96,7 @@ |
||
96 | 96 | |
97 | 97 | $statement = $this->getDatabase()->prepare($query); |
98 | 98 | $statement->bindValue(":username", $this->user->getUsername()); |
99 | - $statement->bindValue(":date", date('Y-m-d') . "%"); |
|
99 | + $statement->bindValue(":date", date('Y-m-d')."%"); |
|
100 | 100 | $statement->execute(); |
101 | 101 | $today = $statement->fetchColumn(); |
102 | 102 | $statement->closeCursor(); |
@@ -79,7 +79,7 @@ discard block |
||
79 | 79 | */ |
80 | 80 | private static function encryptVersion1($password, $salt) |
81 | 81 | { |
82 | - return ':1:' . $salt . ':' . md5($salt . '-' . md5($password)); |
|
82 | + return ':1:'.$salt.':'.md5($salt.'-'.md5($password)); |
|
83 | 83 | } |
84 | 84 | |
85 | 85 | /** |
@@ -89,7 +89,7 @@ discard block |
||
89 | 89 | */ |
90 | 90 | private static function encryptVersion2($password) |
91 | 91 | { |
92 | - return ':2:x:' . password_hash($password, PASSWORD_BCRYPT); |
|
92 | + return ':2:x:'.password_hash($password, PASSWORD_BCRYPT); |
|
93 | 93 | } |
94 | 94 | |
95 | 95 | /** |
@@ -72,7 +72,7 @@ discard block |
||
72 | 72 | $cacheResult->delete(); |
73 | 73 | |
74 | 74 | if (isset($result['error']['info'])) { |
75 | - throw new Exception("Unrecognised API response to query: " . $result['error']['info']); |
|
75 | + throw new Exception("Unrecognised API response to query: ".$result['error']['info']); |
|
76 | 76 | } |
77 | 77 | |
78 | 78 | throw new Exception("Unrecognised API response to query."); |
@@ -90,7 +90,7 @@ discard block |
||
90 | 90 | |
91 | 91 | if ($result['antispoof']['result'] == "error") { |
92 | 92 | // we've got conflicts, let's do something with them. |
93 | - throw new Exception("Encountered error while getting result: " . $result['antispoof']['error']); |
|
93 | + throw new Exception("Encountered error while getting result: ".$result['antispoof']['error']); |
|
94 | 94 | } |
95 | 95 | |
96 | 96 | throw new Exception("Unrecognised API response to query."); |
@@ -62,7 +62,7 @@ discard block |
||
62 | 62 | $statement = $database->prepare($query); |
63 | 63 | |
64 | 64 | foreach ($destinationIps as $ip) { |
65 | - echo 'Fetching data for ' . $ip . PHP_EOL; |
|
65 | + echo 'Fetching data for '.$ip.PHP_EOL; |
|
66 | 66 | |
67 | 67 | $statement->bindValue(':exitaddr', $ip); |
68 | 68 | |
@@ -81,7 +81,7 @@ discard block |
||
81 | 81 | )); |
82 | 82 | |
83 | 83 | foreach (array(80 => $http, 443 => $https) as $port => $response) { |
84 | - echo ' Running for port ' . $ip . ':' . $port . PHP_EOL; |
|
84 | + echo ' Running for port '.$ip.':'.$port.PHP_EOL; |
|
85 | 85 | |
86 | 86 | $statement->bindValue(':exitport', $port); |
87 | 87 | |
@@ -99,7 +99,7 @@ discard block |
||
99 | 99 | } |
100 | 100 | } |
101 | 101 | |
102 | - echo 'Done for ' . $ip . PHP_EOL; |
|
102 | + echo 'Done for '.$ip.PHP_EOL; |
|
103 | 103 | } |
104 | 104 | |
105 | 105 | // kill old cached entries |
@@ -41,8 +41,8 @@ |
||
41 | 41 | $data = htmlentities($data, ENT_COMPAT, 'UTF-8'); |
42 | 42 | } |
43 | 43 | |
44 | - echo '<script>window.location.href="' . str_replace("%DATA%", $data, $toolList[$tool]) . '"</script>'; |
|
44 | + echo '<script>window.location.href="'.str_replace("%DATA%", $data, $toolList[$tool]).'"</script>'; |
|
45 | 45 | } |
46 | 46 | else { |
47 | - header("Location: " . $_SERVER["REQUEST_URI"] . "&round2=true"); |
|
47 | + header("Location: ".$_SERVER["REQUEST_URI"]."&round2=true"); |
|
48 | 48 | } |
@@ -50,25 +50,25 @@ discard block |
||
50 | 50 | $pluralise = false; |
51 | 51 | } |
52 | 52 | elseif ($secs > 10 && $secs < $minuteCut) { |
53 | - $output = round($secs / $second) . " second"; |
|
53 | + $output = round($secs / $second)." second"; |
|
54 | 54 | } |
55 | 55 | elseif ($secs >= $minuteCut && $secs < $hourCut) { |
56 | - $output = round($secs / $minute) . " minute"; |
|
56 | + $output = round($secs / $minute)." minute"; |
|
57 | 57 | } |
58 | 58 | elseif ($secs >= $hourCut && $secs < $dayCut) { |
59 | - $output = round($secs / $hour) . " hour"; |
|
59 | + $output = round($secs / $hour)." hour"; |
|
60 | 60 | } |
61 | 61 | elseif ($secs >= $dayCut && $secs < $weekCut) { |
62 | - $output = round($secs / $day) . " day"; |
|
62 | + $output = round($secs / $day)." day"; |
|
63 | 63 | } |
64 | 64 | elseif ($secs >= $weekCut && $secs < $monthCut) { |
65 | - $output = round($secs / $week) . " week"; |
|
65 | + $output = round($secs / $week)." week"; |
|
66 | 66 | } |
67 | 67 | elseif ($secs >= $monthCut && $secs < $yearCut) { |
68 | - $output = round($secs / $month) . " month"; |
|
68 | + $output = round($secs / $month)." month"; |
|
69 | 69 | } |
70 | 70 | elseif ($secs >= $yearCut && $secs < $year * 10) { |
71 | - $output = round($secs / $year) . " year"; |
|
71 | + $output = round($secs / $year)." year"; |
|
72 | 72 | } |
73 | 73 | else { |
74 | 74 | $output = "a long time ago"; |
@@ -76,7 +76,7 @@ discard block |
||
76 | 76 | } |
77 | 77 | |
78 | 78 | if ($pluralise) { |
79 | - $output = (substr($output, 0, 2) <> "1 ") ? $output . "s ago" : $output . " ago"; |
|
79 | + $output = (substr($output, 0, 2) <> "1 ") ? $output."s ago" : $output." ago"; |
|
80 | 80 | } |
81 | 81 | |
82 | 82 | return $output; |