urlencode
This commit is contained in:
parent
d0bd5b40c3
commit
7d46cfbcab
@ -39,12 +39,12 @@ class ErrorHandler {
|
||||
$error['ManiaControlVersion'] = ManiaControl::VERSION;
|
||||
$error['OperatingSystem'] = php_uname();
|
||||
$error['PHPVersion'] = phpversion();
|
||||
$error['ServerLogin'] = null;
|
||||
$error['ServerLogin'] = null;
|
||||
|
||||
$json = json_encode($error);
|
||||
$info = base64_encode($json);
|
||||
|
||||
$url = UpdateManager::URL_WEBSERVICE . "errorreport?error=" . $info;
|
||||
$url = UpdateManager::URL_WEBSERVICE . "errorreport?error=" . urlencode($info);
|
||||
$success = FileUtil::loadFile($url);
|
||||
|
||||
if (!json_decode($success)) {
|
||||
@ -80,12 +80,12 @@ class ErrorHandler {
|
||||
$error['ManiaControlVersion'] = ManiaControl::VERSION;
|
||||
$error['OperatingSystem'] = php_uname();
|
||||
$error['PHPVersion'] = phpversion();
|
||||
$error['ServerLogin'] = $this->maniaControl->server->login;
|
||||
$error['ServerLogin'] = $this->maniaControl->server->login;
|
||||
|
||||
$json = json_encode($error);
|
||||
$info = base64_encode($json);
|
||||
|
||||
$url = UpdateManager::URL_WEBSERVICE . "errorreport?error=" . $info;
|
||||
$url = UpdateManager::URL_WEBSERVICE . "errorreport?error=" . urlencode($info);
|
||||
$success = FileUtil::loadFile($url);
|
||||
|
||||
if (!json_decode($success)) {
|
||||
|
@ -39,7 +39,7 @@ class MXMapInfo {
|
||||
$this->id = $mx->MapID;
|
||||
}
|
||||
|
||||
if (!isset($mx->GbxMapName) || $mx->GbxMapName == '') {
|
||||
if (!isset($mx->GbxMapName) || $mx->GbxMapName == '?') {
|
||||
$this->name = $mx->Name;
|
||||
} else {
|
||||
$this->name = Formatter::stripDirtyCodes($mx->GbxMapName);
|
||||
|
@ -3,6 +3,7 @@
|
||||
namespace ManiaControl\Server;
|
||||
|
||||
use ManiaControl\Callbacks\TimerListener;
|
||||
use ManiaControl\Formatter;
|
||||
use ManiaControl\ManiaControl;
|
||||
use ManiaControl\UpdateManager;
|
||||
|
||||
@ -52,7 +53,7 @@ class UsageReporter implements TimerListener {
|
||||
$properties['PHPVersion'] = phpversion();
|
||||
$properties['ServerLogin'] = $this->maniaControl->server->login;
|
||||
$properties['TitleId'] = $this->maniaControl->server->titleId;
|
||||
$properties['ServerName'] = $this->maniaControl->server->getName();
|
||||
$properties['ServerName'] = Formatter::stripDirtyCodes($this->maniaControl->server->getName());
|
||||
$properties['PlayerCount'] = $this->maniaControl->playerManager->getPlayerCount();
|
||||
|
||||
try {
|
||||
@ -72,7 +73,7 @@ class UsageReporter implements TimerListener {
|
||||
$json = json_encode($properties);
|
||||
$info = base64_encode($json);
|
||||
|
||||
$this->maniaControl->fileReader->loadFile(UpdateManager::URL_WEBSERVICE . "/usagereport?info=" . $info, function ($response, $error) {
|
||||
$this->maniaControl->fileReader->loadFile(UpdateManager::URL_WEBSERVICE . "/usagereport?info=" . urlencode($info), function ($response, $error) {
|
||||
$response = json_decode($response);
|
||||
if ($error || !$response) {
|
||||
$this->maniaControl->log("Error while Sending data: " . $error);
|
||||
|
Loading…
Reference in New Issue
Block a user