link to auth sites

This commit is contained in:
kremsy 2014-02-24 11:08:15 +01:00 committed by Steffen Schröder
parent c23ab78916
commit ae53958b37
2 changed files with 10 additions and 10 deletions

View File

@ -39,7 +39,7 @@ class Dedimania implements CallbackListener, TimerListener, Plugin {
const SETTING_WIDGET_WIDTH = 'Widget Width'; const SETTING_WIDGET_WIDTH = 'Widget Width';
const SETTING_WIDGET_LINESCOUNT = 'Widget Displayed Lines Count'; const SETTING_WIDGET_LINESCOUNT = 'Widget Displayed Lines Count';
const SETTING_WIDGET_LINEHEIGHT = 'Widget Line Height'; const SETTING_WIDGET_LINEHEIGHT = 'Widget Line Height';
const SETTING_DEDIMANIA_CODE = 'Dedimania Code for '; const SETTING_DEDIMANIA_CODE = '$l[http://dedimania.net/tm2stats/?do=register]Dedimania Code for ';
/** /**
* Private Properties * Private Properties
@ -61,7 +61,7 @@ class Dedimania implements CallbackListener, TimerListener, Plugin {
public static function prepare(ManiaControl $maniaControl) { public static function prepare(ManiaControl $maniaControl) {
$servers = $maniaControl->server->getAllServers(); $servers = $maniaControl->server->getAllServers();
foreach($servers as $server) { foreach($servers as $server) {
$maniaControl->settingManager->initSetting(get_class(), self::SETTING_DEDIMANIA_CODE . $server->login, ''); $maniaControl->settingManager->initSetting(get_class(), self::SETTING_DEDIMANIA_CODE . $server->login . '$l', '');
} }
} }
@ -101,7 +101,7 @@ class Dedimania implements CallbackListener, TimerListener, Plugin {
$serverVersion = $this->maniaControl->client->getVersion(); $serverVersion = $this->maniaControl->client->getVersion();
$packMask = substr($this->maniaControl->server->titleId, 2); $packMask = substr($this->maniaControl->server->titleId, 2);
$dedimaniaCode = $this->maniaControl->settingManager->getSetting($this, self::SETTING_DEDIMANIA_CODE . $serverInfo->login); $dedimaniaCode = $this->maniaControl->settingManager->getSetting($this, self::SETTING_DEDIMANIA_CODE . $serverInfo->login . '$l');
if ($dedimaniaCode == '') { if ($dedimaniaCode == '') {
throw new \Exception("No Dedimania Code Specified, check the settings!"); throw new \Exception("No Dedimania Code Specified, check the settings!");
} }

View File

@ -40,11 +40,11 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
* Constants MX Karma * Constants MX Karma
*/ */
const SETTING_MX_KARMA_ACTIVATED = 'Aktivate MX-Karma'; const SETTING_MX_KARMA_ACTIVATED = 'Aktivate MX-Karma';
const MX_KARMA_SETTING_CODE = 'MX Karma Code for '; //const MX_KARMA_SETTING_CODE = '$l[http://karma.mania-exchange.com/auth/getapikey?server={serverlogin}]MX Karma Code for ';
const MX_KARMA_URL = 'http://karma.mania-exchange.com/api2/'; const MX_KARMA_URL = 'http://karma.mania-exchange.com/api2/';
const MX_KARMA_STARTSESSION = 'startSession'; const MX_KARMA_STARTSESSION = 'startSession';
const MX_KARMA_ACTIVATESESSION = 'activateSession'; const MX_KARMA_ACTIVATESESSION = 'activateSession';
const MX_KARMA_SAVEVOTES = 'saveVotes'; const MX_KARMA_SAVEVOTES = 'saveVotes';
/** /**
* Private properties * Private properties
@ -68,7 +68,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
$maniaControl->settingManager->initSetting(get_class(), self::SETTING_MX_KARMA_ACTIVATED, true); $maniaControl->settingManager->initSetting(get_class(), self::SETTING_MX_KARMA_ACTIVATED, true);
$servers = $maniaControl->server->getAllServers(); $servers = $maniaControl->server->getAllServers();
foreach($servers as $server) { foreach($servers as $server) {
$maniaControl->settingManager->initSetting(get_class(), self::MX_KARMA_SETTING_CODE . $server->login, ''); $maniaControl->settingManager->initSetting(get_class(), '$l[http://karma.mania-exchange.com/auth/getapikey?server=' . $server->login . ']MX Karma Code for ' . $server->login . '$l', '');
} }
} }
@ -534,7 +534,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
$serverLogin = $this->maniaControl->server->login; $serverLogin = $this->maniaControl->server->login;
$mxKarmaCode = $this->maniaControl->settingManager->getSetting($this, self::MX_KARMA_SETTING_CODE . $serverLogin); $mxKarmaCode = $this->maniaControl->settingManager->getSetting($this, '$l[http://karma.mania-exchange.com/auth/getapikey?server=' . $serverLogin . ']MX Karma Code for ' . $serverLogin . '$l');
if ($mxKarmaCode == '') { if ($mxKarmaCode == '') {
return; return;
} }