karma fix
This commit is contained in:
parent
1a366dcb50
commit
80ccc1a838
@ -145,7 +145,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
|
||||
* @see \ManiaControl\Plugins\Plugin::getAuthor()
|
||||
*/
|
||||
public static function getAuthor() {
|
||||
return 'steeffeen';
|
||||
return 'steeffeen and kremsy';
|
||||
}
|
||||
|
||||
/**
|
||||
@ -603,7 +603,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
|
||||
return;
|
||||
}
|
||||
|
||||
if (count($this->mxKarma['votes']) == 0) {
|
||||
if (!isset($this->mxKarma['votes']) || count($this->mxKarma['votes']) == 0) {
|
||||
return;
|
||||
}
|
||||
|
||||
@ -633,7 +633,6 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
|
||||
$this->maniaControl->fileReader->postData(self::MX_KARMA_URL . self::MX_KARMA_SAVEVOTES . "?sessionKey=" . urlencode($this->mxKarma['session']->sessionKey), function ($data, $error) {
|
||||
if (!$error) {
|
||||
$data = json_decode($data);
|
||||
var_dump($data);
|
||||
if ($data->success) {
|
||||
$this->maniaControl->log("Votes successfully permitted");
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user