Made some changes to support external Karma viewing

This commit is contained in:
Max Klaversma 2014-04-19 16:54:30 +02:00 committed by Steffen Schröder
parent 6f17ebd50e
commit 2b25f60398

View File

@ -32,6 +32,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
const MLID_KARMA = 'KarmaPlugin.MLID';
const TABLE_KARMA = 'mc_karma';
const CB_KARMA_CHANGED = 'KarmaPlugin.Changed';
const CB_KARMA_MXUPDATED = 'KarmaPlugin.MXUpdated';
const SETTING_AVAILABLE_VOTES = 'Available Votes (X-Y: Comma separated)';
const SETTING_WIDGET_ENABLE = 'Enable Karma Widget';
const SETTING_WIDGET_TITLE = 'Widget-Title';
@ -773,6 +774,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
}
$this->updateManialink = true;
$this->maniaControl->callbackManager->triggerCallback(self::CB_KARMA_MXUPDATED, $this->mxKarma);
$this->maniaControl->log("MX-Karma Votes successfully fetched");
} else {
$this->maniaControl->log("Error while fetching votes: " . $data->data->message);
@ -785,7 +787,6 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
}, $content, false, 'application/json');
}
/**
* Import old Karma votes to Mania-Exchange Karma
*