@@ -65,7 +65,7 @@ discard block |
||
| 65 | 65 | $viewableDataStatement->bindValue(":email", $request->getEmail()); |
| 66 | 66 | $viewableDataStatement->bindValue(":reserved", User::getCurrent()->getId()); |
| 67 | 67 | $viewableDataStatement->bindValue(":trustedIp", $request->getTrustedIp()); |
| 68 | - $viewableDataStatement->bindValue(":trustedProxy", '%' . $request->getTrustedIp() . '%'); |
|
| 68 | + $viewableDataStatement->bindValue(":trustedProxy", '%'.$request->getTrustedIp().'%'); |
|
| 69 | 69 | |
| 70 | 70 | $viewableDataStatement->execute(); |
| 71 | 71 | |
@@ -77,11 +77,11 @@ discard block |
||
| 77 | 77 | #endregion |
| 78 | 78 | |
| 79 | 79 | if ($request->getStatus() == "Closed") { |
| 80 | - $hash = md5($request->getId() . $request->getEmail() . $request->getTrustedIp() . microtime()); //If the request is closed, change the hash based on microseconds similar to the checksums. |
|
| 80 | + $hash = md5($request->getId().$request->getEmail().$request->getTrustedIp().microtime()); //If the request is closed, change the hash based on microseconds similar to the checksums. |
|
| 81 | 81 | $smarty->assign("isclosed", true); |
| 82 | 82 | } |
| 83 | 83 | else { |
| 84 | - $hash = md5($request->getId() . $request->getEmail() . $request->getTrustedIp()); |
|
| 84 | + $hash = md5($request->getId().$request->getEmail().$request->getTrustedIp()); |
|
| 85 | 85 | $smarty->assign("isclosed", false); |
| 86 | 86 | } |
| 87 | 87 | $smarty->assign("hash", $hash); |
@@ -257,10 +257,10 @@ discard block |
||
| 257 | 257 | $userListData = $userListResult->fetchAll(PDO::FETCH_COLUMN); |
| 258 | 258 | $userListProcessedData = array(); |
| 259 | 259 | foreach ($userListData as $userListItem) { |
| 260 | - $userListProcessedData[] = "\"" . htmlentities($userListItem) . "\""; |
|
| 260 | + $userListProcessedData[] = "\"".htmlentities($userListItem)."\""; |
|
| 261 | 261 | } |
| 262 | 262 | |
| 263 | - $userList = '[' . implode(",", $userListProcessedData) . ']'; |
|
| 263 | + $userList = '['.implode(",", $userListProcessedData).']'; |
|
| 264 | 264 | $smarty->assign("jsuserlist", $userList); |
| 265 | 265 | // end: assign to user |
| 266 | 266 | |
@@ -70,12 +70,12 @@ |
||
| 70 | 70 | $database->commit(); |
| 71 | 71 | echo ". Committed txn.\n"; |
| 72 | 72 | } catch (Exception $ex) { |
| 73 | - echo ". Encountered exception: " . $ex->getMessage(). "\n"; |
|
| 73 | + echo ". Encountered exception: ".$ex->getMessage()."\n"; |
|
| 74 | 74 | $database->rollBack(); |
| 75 | 75 | echo ". Rolled back txn\n"; |
| 76 | 76 | throw $ex; |
| 77 | 77 | } finally { |
| 78 | - if($database->hasActiveTransaction()){ |
|
| 78 | + if ($database->hasActiveTransaction()) { |
|
| 79 | 79 | $database->rollBack(); |
| 80 | 80 | echo ". Rolled back txn\n"; |
| 81 | 81 | } |
@@ -122,7 +122,7 @@ |
||
| 122 | 122 | if (count($validationErrors) > 0) { |
| 123 | 123 | foreach ($validationErrors as $validationError) { |
| 124 | 124 | BootstrapSkin::displayAlertBox( |
| 125 | - $smarty->fetch("validation/" . $validationError->getErrorCode() . ".tpl"), |
|
| 125 | + $smarty->fetch("validation/".$validationError->getErrorCode().".tpl"), |
|
| 126 | 126 | "alert-error"); |
| 127 | 127 | } |
| 128 | 128 | |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | } |
| 62 | 62 | |
| 63 | 63 | // username can't contain #@/<>[]|{} |
| 64 | - if (preg_match("/[" . preg_quote("#@/<>[]|{}", "/") . "]/", $this->request->getName()) === 1) { |
|
| 64 | + if (preg_match("/[".preg_quote("#@/<>[]|{}", "/")."]/", $this->request->getName()) === 1) { |
|
| 65 | 65 | $errorList[ValidationError::NAME_INVALIDCHAR] = new ValidationError(ValidationError::NAME_INVALIDCHAR); |
| 66 | 66 | } |
| 67 | 67 | |
@@ -176,7 +176,7 @@ discard block |
||
| 176 | 176 | { |
| 177 | 177 | global $enableTitleblacklist; |
| 178 | 178 | if ($enableTitleblacklist == 1) { |
| 179 | - $apiResult = file_get_contents("https://en.wikipedia.org/w/api.php?action=titleblacklist&tbtitle=" . urlencode($this->request->getName()) . "&tbaction=new-account&tbnooverride&format=php"); |
|
| 179 | + $apiResult = file_get_contents("https://en.wikipedia.org/w/api.php?action=titleblacklist&tbtitle=".urlencode($this->request->getName())."&tbaction=new-account&tbnooverride&format=php"); |
|
| 180 | 180 | |
| 181 | 181 | $data = unserialize($apiResult); |
| 182 | 182 | |
@@ -192,7 +192,7 @@ discard block |
||
| 192 | 192 | { |
| 193 | 193 | global $mediawikiWebServiceEndpoint; |
| 194 | 194 | |
| 195 | - $userexist = file_get_contents($mediawikiWebServiceEndpoint . "?action=query&list=users&ususers=" . urlencode($this->request->getName()) . "&format=php"); |
|
| 195 | + $userexist = file_get_contents($mediawikiWebServiceEndpoint."?action=query&list=users&ususers=".urlencode($this->request->getName())."&format=php"); |
|
| 196 | 196 | $ue = unserialize($userexist); |
| 197 | 197 | if (!isset ($ue['query']['users']['0']['missing']) && isset ($ue['query']['users']['0']['userid'])) { |
| 198 | 198 | return true; |
@@ -206,7 +206,7 @@ discard block |
||
| 206 | 206 | global $mediawikiWebServiceEndpoint; |
| 207 | 207 | |
| 208 | 208 | $reqname = str_replace("_", " ", $this->request->getName()); |
| 209 | - $userexist = file_get_contents($mediawikiWebServiceEndpoint . "?action=query&meta=globaluserinfo&guiuser=" . urlencode($reqname) . "&format=php"); |
|
| 209 | + $userexist = file_get_contents($mediawikiWebServiceEndpoint."?action=query&meta=globaluserinfo&guiuser=".urlencode($reqname)."&format=php"); |
|
| 210 | 210 | $ue = unserialize($userexist); |
| 211 | 211 | if (isset ($ue['query']['globaluserinfo']['id'])) { |
| 212 | 212 | return true; |
@@ -26,10 +26,10 @@ |
||
| 26 | 26 | $output .= "#{$count}: "; |
| 27 | 27 | |
| 28 | 28 | if (isset($line['type']) && $line['type'] != "") { |
| 29 | - $output .= $line['class'] . $line['type']; |
|
| 29 | + $output .= $line['class'].$line['type']; |
|
| 30 | 30 | } |
| 31 | 31 | |
| 32 | - $output .= $line['function'] . "(...)"; |
|
| 32 | + $output .= $line['function']."(...)"; |
|
| 33 | 33 | $output .= " [{$line['file']}#{$line['line']}\r\n"; |
| 34 | 34 | |
| 35 | 35 | $count++; |
@@ -95,7 +95,7 @@ |
||
| 95 | 95 | |
| 96 | 96 | $statement = $this->database->prepare($query); |
| 97 | 97 | $statement->bindValue(":username", $this->user->getUsername()); |
| 98 | - $statement->bindValue(":date", date('Y-m-d') . "%"); |
|
| 98 | + $statement->bindValue(":date", date('Y-m-d')."%"); |
|
| 99 | 99 | $statement->execute(); |
| 100 | 100 | $today = $statement->fetchColumn(); |
| 101 | 101 | $statement->closeCursor(); |
@@ -16,7 +16,7 @@ |
||
| 16 | 16 | global $CORSallowed; |
| 17 | 17 | |
| 18 | 18 | if (in_array($httpOrigin, $CORSallowed)) { |
| 19 | - header("Access-Control-Allow-Origin: " . $httpOrigin); |
|
| 19 | + header("Access-Control-Allow-Origin: ".$httpOrigin); |
|
| 20 | 20 | } |
| 21 | 21 | } |
| 22 | 22 | } |
@@ -12,7 +12,7 @@ |
||
| 12 | 12 | $substr = mb_substr($string, 0, 1); |
| 13 | 13 | $substr2 = mb_substr($string, 1, $strlen - 1); |
| 14 | 14 | $upstring = mb_strtoupper($substr); |
| 15 | - $ustring = $upstring . $substr2; |
|
| 15 | + $ustring = $upstring.$substr2; |
|
| 16 | 16 | return $ustring; |
| 17 | 17 | } |
| 18 | 18 | |
@@ -15,7 +15,7 @@ discard block |
||
| 15 | 15 | $cacheResult = AntiSpoofCache::getByUsername($username, gGetDb()); |
| 16 | 16 | if ($cacheResult == false) { |
| 17 | 17 | // get the data from the API |
| 18 | - $data = file_get_contents($mediawikiWebServiceEndpoint . "?action=antispoof&format=php&username=" . urlencode($username)); |
|
| 18 | + $data = file_get_contents($mediawikiWebServiceEndpoint."?action=antispoof&format=php&username=".urlencode($username)); |
|
| 19 | 19 | |
| 20 | 20 | $cacheEntry = new AntiSpoofCache(); |
| 21 | 21 | $cacheEntry->setDatabase(gGetDb()); |
@@ -35,7 +35,7 @@ discard block |
||
| 35 | 35 | $cacheResult->delete(); |
| 36 | 36 | |
| 37 | 37 | if (isset($result['error']['info'])) { |
| 38 | - throw new Exception("Unrecognised API response to query: " . $result['error']['info']); |
|
| 38 | + throw new Exception("Unrecognised API response to query: ".$result['error']['info']); |
|
| 39 | 39 | } |
| 40 | 40 | |
| 41 | 41 | throw new Exception("Unrecognised API response to query."); |
@@ -53,7 +53,7 @@ discard block |
||
| 53 | 53 | |
| 54 | 54 | if ($result['antispoof']['result'] == "error") { |
| 55 | 55 | // we've got conflicts, let's do something with them. |
| 56 | - throw new Exception("Encountered error while getting result: " . $result['antispoof']['error']); |
|
| 56 | + throw new Exception("Encountered error while getting result: ".$result['antispoof']['error']); |
|
| 57 | 57 | } |
| 58 | 58 | |
| 59 | 59 | throw new Exception("Unrecognised API response to query."); |