php 5.3 compatibility
This commit is contained in:
parent
79a771583e
commit
7dd88a2e18
@ -75,10 +75,10 @@ class UsageReporter implements TimerListener {
|
|||||||
|
|
||||||
$activePlugins = array();
|
$activePlugins = array();
|
||||||
|
|
||||||
if(is_array($this->maniaControl->pluginManager->getActivePlugins())) {
|
if (is_array($this->maniaControl->pluginManager->getActivePlugins())) {
|
||||||
foreach($this->maniaControl->pluginManager->getActivePlugins() as $plugin) {
|
foreach($this->maniaControl->pluginManager->getActivePlugins() as $plugin) {
|
||||||
/** @var Plugin $plugin */
|
/** @var Plugin $plugin */
|
||||||
if(!is_null($plugin::getId()) && is_numeric($plugin::getId())) {
|
if (!is_null($plugin::getId()) && is_numeric($plugin::getId())) {
|
||||||
$activePlugins[] = $plugin::getId();
|
$activePlugins[] = $plugin::getId();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -65,10 +65,12 @@ class ServerRankingPlugin implements Plugin, CallbackListener, CommandListener {
|
|||||||
$maniaControl->settingManager->initSetting($this, self::SETTING_MIN_REQUIRED_RECORDS, 3);
|
$maniaControl->settingManager->initSetting($this, self::SETTING_MIN_REQUIRED_RECORDS, 3);
|
||||||
$maniaControl->settingManager->initSetting($this, self::SETTING_MAX_STORED_RECORDS, 50);
|
$maniaControl->settingManager->initSetting($this, self::SETTING_MAX_STORED_RECORDS, 50);
|
||||||
|
|
||||||
|
$script = $this->maniaControl->client->getScriptName();
|
||||||
|
|
||||||
if ($this->maniaControl->mapManager->getCurrentMap()->getGame() == 'tm') {
|
if ($this->maniaControl->mapManager->getCurrentMap()->getGame() == 'tm') {
|
||||||
//TODO also add obstacle here as default
|
//TODO also add obstacle here as default
|
||||||
$maniaControl->settingManager->initSetting($this, self::SETTING_MIN_RANKING_TYPE, self::RANKING_TYPE_RECORDS);
|
$maniaControl->settingManager->initSetting($this, self::SETTING_MIN_RANKING_TYPE, self::RANKING_TYPE_RECORDS);
|
||||||
} else if ($this->maniaControl->client->getScriptName()["CurrentValue"] == "InstaDM.Script.txt") {
|
} else if ($script["CurrentValue"] == "InstaDM.Script.txt") {
|
||||||
$maniaControl->settingManager->initSetting($this, self::SETTING_MIN_RANKING_TYPE, self::RANKING_TYPE_RATIOS);
|
$maniaControl->settingManager->initSetting($this, self::SETTING_MIN_RANKING_TYPE, self::RANKING_TYPE_RATIOS);
|
||||||
} else {
|
} else {
|
||||||
$maniaControl->settingManager->initSetting($this, self::SETTING_MIN_RANKING_TYPE, self::RANKING_TYPE_POINTS);
|
$maniaControl->settingManager->initSetting($this, self::SETTING_MIN_RANKING_TYPE, self::RANKING_TYPE_POINTS);
|
||||||
|
Loading…
Reference in New Issue
Block a user