Fixed Dedimania:: problems
This commit is contained in:
parent
5959135a1b
commit
6f67af86f6
@ -184,7 +184,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
|
|||||||
if (is_array($data)) {
|
if (is_array($data)) {
|
||||||
foreach ($data as $index => $methodResponse) {
|
foreach ($data as $index => $methodResponse) {
|
||||||
if (xmlrpc_is_fault($methodResponse)) {
|
if (xmlrpc_is_fault($methodResponse)) {
|
||||||
$self->handleXmlRpcFault($methodResponse, Dedimania::DEDIMANIA_OPENSESSION);
|
$self->handleXmlRpcFault($methodResponse, self::DEDIMANIA_OPENSESSION);
|
||||||
} else if ($index <= 0) {
|
} else if ($index <= 0) {
|
||||||
$responseData = $methodResponse[0];
|
$responseData = $methodResponse[0];
|
||||||
$self->dedimaniaData->sessionId = $responseData['SessionId'];
|
$self->dedimaniaData->sessionId = $responseData['SessionId'];
|
||||||
@ -272,7 +272,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
|
|||||||
if (is_array($data)) {
|
if (is_array($data)) {
|
||||||
foreach ($data as $index => $methodResponse) {
|
foreach ($data as $index => $methodResponse) {
|
||||||
if (xmlrpc_is_fault($methodResponse)) {
|
if (xmlrpc_is_fault($methodResponse)) {
|
||||||
$self->handleXmlRpcFault($methodResponse, Dedimania::DEDIMANIA_GETRECORDS);
|
$self->handleXmlRpcFault($methodResponse, self::DEDIMANIA_GETRECORDS);
|
||||||
return false;
|
return false;
|
||||||
} else if ($index <= 0) {
|
} else if ($index <= 0) {
|
||||||
$responseData = $methodResponse[0];
|
$responseData = $methodResponse[0];
|
||||||
@ -290,7 +290,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
$self->updateManialink = true;
|
$self->updateManialink = true;
|
||||||
$self->maniaControl->callbackManager->triggerCallback(Dedimania::CB_DEDIMANIA_UPDATED, $self->dedimaniaData->records);
|
$self->maniaControl->callbackManager->triggerCallback(self::CB_DEDIMANIA_UPDATED, $self->dedimaniaData->records);
|
||||||
return true;
|
return true;
|
||||||
}, $content, true);
|
}, $content, true);
|
||||||
|
|
||||||
@ -536,7 +536,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
|
|||||||
if (is_array($data)) {
|
if (is_array($data)) {
|
||||||
foreach ($data as $methodResponse) {
|
foreach ($data as $methodResponse) {
|
||||||
if (xmlrpc_is_fault($methodResponse)) {
|
if (xmlrpc_is_fault($methodResponse)) {
|
||||||
$self->handleXmlRpcFault($methodResponse, Dedimania::DEDIMANIA_CHECKSESSION);
|
$self->handleXmlRpcFault($methodResponse, self::DEDIMANIA_CHECKSESSION);
|
||||||
} else {
|
} else {
|
||||||
$responseData = $methodResponse[0];
|
$responseData = $methodResponse[0];
|
||||||
if (is_bool($responseData)) {
|
if (is_bool($responseData)) {
|
||||||
@ -571,7 +571,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
|
|||||||
if (is_array($data)) {
|
if (is_array($data)) {
|
||||||
foreach ($data as $index => $methodResponse) {
|
foreach ($data as $index => $methodResponse) {
|
||||||
if (xmlrpc_is_fault($methodResponse)) {
|
if (xmlrpc_is_fault($methodResponse)) {
|
||||||
$self->handleXmlRpcFault($methodResponse, Dedimania::DEDIMANIA_PLAYERCONNECT);
|
$self->handleXmlRpcFault($methodResponse, self::DEDIMANIA_PLAYERCONNECT);
|
||||||
} else if ($index <= 0) {
|
} else if ($index <= 0) {
|
||||||
$responseData = $methodResponse[0];
|
$responseData = $methodResponse[0];
|
||||||
$self->dedimaniaData->addPlayer(new DedimaniaPlayer($responseData));
|
$self->dedimaniaData->addPlayer(new DedimaniaPlayer($responseData));
|
||||||
@ -581,7 +581,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
|
|||||||
$self->fetchDedimaniaRecords(true);
|
$self->fetchDedimaniaRecords(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if ($self->maniaControl->settingManager->getSetting($self, Dedimania::SETTING_WIDGET_ENABLE)) {
|
if ($self->maniaControl->settingManager->getSetting($self, self::SETTING_WIDGET_ENABLE)) {
|
||||||
$manialink = $self->buildManialink();
|
$manialink = $self->buildManialink();
|
||||||
$self->maniaControl->manialinkManager->sendManialink($manialink, $player->login);
|
$self->maniaControl->manialinkManager->sendManialink($manialink, $player->login);
|
||||||
}
|
}
|
||||||
@ -618,7 +618,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
|
|||||||
if (is_array($data)) {
|
if (is_array($data)) {
|
||||||
foreach ($data as $methodResponse) {
|
foreach ($data as $methodResponse) {
|
||||||
if (xmlrpc_is_fault($methodResponse)) {
|
if (xmlrpc_is_fault($methodResponse)) {
|
||||||
$self->handleXmlRpcFault($methodResponse, Dedimania::DEDIMANIA_PLAYERDISCONNECT);
|
$self->handleXmlRpcFault($methodResponse, self::DEDIMANIA_PLAYERDISCONNECT);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -696,7 +696,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
|
|||||||
if (is_array($data)) {
|
if (is_array($data)) {
|
||||||
foreach ($data as $index => $methodResponse) {
|
foreach ($data as $index => $methodResponse) {
|
||||||
if (xmlrpc_is_fault($methodResponse)) {
|
if (xmlrpc_is_fault($methodResponse)) {
|
||||||
$self->handleXmlRpcFault($methodResponse, Dedimania::DEDIMANIA_SETCHALLENGETIMES);
|
$self->handleXmlRpcFault($methodResponse, self::DEDIMANIA_SETCHALLENGETIMES);
|
||||||
} else {
|
} else {
|
||||||
if ($index <= 0) {
|
if ($index <= 0) {
|
||||||
// Called method response
|
// Called method response
|
||||||
@ -746,7 +746,7 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
|
|||||||
if (is_array($data)) {
|
if (is_array($data)) {
|
||||||
foreach ($data as $methodResponse) {
|
foreach ($data as $methodResponse) {
|
||||||
if (xmlrpc_is_fault($methodResponse)) {
|
if (xmlrpc_is_fault($methodResponse)) {
|
||||||
$self->handleXmlRpcFault($methodResponse, Dedimania::DEDIMANIA_UPDATESERVERPLAYERS);
|
$self->handleXmlRpcFault($methodResponse, self::DEDIMANIA_UPDATESERVERPLAYERS);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
@ -1161,8 +1161,8 @@ class DedimaniaPlugin implements CallbackListener, CommandListener, TimerListene
|
|||||||
/**
|
/**
|
||||||
* Compare function for sorting dedimania records
|
* Compare function for sorting dedimania records
|
||||||
*
|
*
|
||||||
* @param \Dedimania\RecordData $first
|
* @param \MCTeam\Dedimania\RecordData $first
|
||||||
* @param \Dedimania\RecordData $second
|
* @param \MCTeam\Dedimania\RecordData $second
|
||||||
* @return int
|
* @return int
|
||||||
*/
|
*/
|
||||||
private function compareRecords(RecordData $first, RecordData $second) {
|
private function compareRecords(RecordData $first, RecordData $second) {
|
||||||
|
Loading…
Reference in New Issue
Block a user