bugfix
This commit is contained in:
parent
46d7adbf17
commit
bc67ba224b
@ -303,9 +303,9 @@ class ManiaControlSettings implements ConfiguratorMenu, CallbackListener {
|
|||||||
|
|
||||||
//Toggle value
|
//Toggle value
|
||||||
if ($oldSetting->value == "1") {
|
if ($oldSetting->value == "1") {
|
||||||
$this->maniaControl->settingManager->updateSetting($oldSetting->class, $oldSetting->setting, "0");
|
$this->maniaControl->settingManager->setSetting($oldSetting->class, $oldSetting->setting, "0");
|
||||||
} else {
|
} else {
|
||||||
$this->maniaControl->settingManager->updateSetting($oldSetting->class, $oldSetting->setting, "1");
|
$this->maniaControl->settingManager->setSetting($oldSetting->class, $oldSetting->setting, "1");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -196,7 +196,7 @@ class Client
|
|||||||
{
|
{
|
||||||
$size = 0;
|
$size = 0;
|
||||||
$recvhandle = 0;
|
$recvhandle = 0;
|
||||||
@stream_set_timeout($this->socket, 0, $this->timeout * 1000 * 50);
|
@stream_set_timeout($this->socket, 0, $this->timeout * 1000 * 100);
|
||||||
// Get result
|
// Get result
|
||||||
if ($this->protocol == 1)
|
if ($this->protocol == 1)
|
||||||
{
|
{
|
||||||
@ -211,12 +211,16 @@ class Client
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$contents = fread($this->socket, 8);
|
$contents = '';
|
||||||
if (strlen($contents) == 0 || $contents === false)
|
while(strlen($contents) < 8){
|
||||||
{
|
$contents .= fread($this->socket, 8 - strlen($contents));
|
||||||
var_dump($contents);
|
if (strlen($contents) == 0 || $contents === false)
|
||||||
throw new FatalException('deb1 transport error - connection interrupted!', FatalException::INTERRUPTED);
|
{
|
||||||
|
//var_dump("deb6 transport error");
|
||||||
|
throw new FatalException('deb1 transport error - connection interrupted!', FatalException::INTERRUPTED);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$array_result = unpack('Vsize/Vhandle', $contents);
|
$array_result = unpack('Vsize/Vhandle', $contents);
|
||||||
$size = $array_result['size'];
|
$size = $array_result['size'];
|
||||||
$recvhandle = $array_result['handle'];
|
$recvhandle = $array_result['handle'];
|
||||||
|
@ -344,6 +344,9 @@ class PluginMenu implements CallbackListener, ConfiguratorMenu, ManialinkPageAns
|
|||||||
foreach($configData[3] as $setting) {
|
foreach($configData[3] as $setting) {
|
||||||
$settingName = substr($setting['Name'], $prefixLength + 1);
|
$settingName = substr($setting['Name'], $prefixLength + 1);
|
||||||
|
|
||||||
|
if(!isset($maniaControlSettings[$settingName]))
|
||||||
|
continue;
|
||||||
|
|
||||||
$oldSetting = $maniaControlSettings[$settingName];
|
$oldSetting = $maniaControlSettings[$settingName];
|
||||||
if ($setting['Value'] == $oldSetting->value || $oldSetting->type == 'bool') {
|
if ($setting['Value'] == $oldSetting->value || $oldSetting->type == 'bool') {
|
||||||
continue;
|
continue;
|
||||||
|
@ -611,7 +611,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
|
|||||||
$query .= '?sessionKey=' . urlencode($this->mxKarma['session']->sessionKey);
|
$query .= '?sessionKey=' . urlencode($this->mxKarma['session']->sessionKey);
|
||||||
$query .= '&activationHash=' . urlencode($hash);
|
$query .= '&activationHash=' . urlencode($hash);
|
||||||
|
|
||||||
$this->maniaControl->fileReader->loadFile($query, function ($data, $error) {
|
$this->maniaControl->fileReader->loadFile($query, function ($data, $error) use($query) {
|
||||||
if (!$error) {
|
if (!$error) {
|
||||||
$data = json_decode($data);
|
$data = json_decode($data);
|
||||||
if ($data->success && $data->data->activated) {
|
if ($data->success && $data->data->activated) {
|
||||||
@ -619,7 +619,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
|
|||||||
} else {
|
} else {
|
||||||
$this->maniaControl->log("Error while authenticating on Mania-Exchange Karma " . $data->data->message);
|
$this->maniaControl->log("Error while authenticating on Mania-Exchange Karma " . $data->data->message);
|
||||||
//TODO remove temp trigger
|
//TODO remove temp trigger
|
||||||
$this->maniaControl->errorHandler->triggerDebugNotice("Error while authenticating on Mania-Exchange Karma " . $data->data->message);
|
$this->maniaControl->errorHandler->triggerDebugNotice("Error while authenticating on Mania-Exchange Karma " . $data->data->message . " url Query " . $query);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
//TODO remove temp trigger
|
//TODO remove temp trigger
|
||||||
|
Loading…
Reference in New Issue
Block a user