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