merge Maniacontrol official repository changes
This commit is contained in:
parent
a6875cabc8
commit
e6444a5a47
@ -1,3 +1,10 @@
|
|||||||
|
###v0.258###
|
||||||
|
#Changes
|
||||||
|
- MC compatibility with MX v2 api
|
||||||
|
###v0.257###
|
||||||
|
#Changes
|
||||||
|
- MC now supports php 8.0 and 8.1
|
||||||
|
|
||||||
###v0.255###
|
###v0.255###
|
||||||
#Additions
|
#Additions
|
||||||
- added optional descriptions to Settings (but no MC-settings have descriptions yet)
|
- added optional descriptions to Settings (but no MC-settings have descriptions yet)
|
||||||
|
@ -44,6 +44,9 @@ class Database implements TimerListener {
|
|||||||
// Enable mysqli Reconnect
|
// Enable mysqli Reconnect
|
||||||
ini_set('mysqli.reconnect', 'on');
|
ini_set('mysqli.reconnect', 'on');
|
||||||
|
|
||||||
|
// Change error report mechanism -> used to set compatibility to php < 8.1
|
||||||
|
mysqli_report(MYSQLI_REPORT_OFF);
|
||||||
|
|
||||||
// Open database connection
|
// Open database connection
|
||||||
$this->loadConfig();
|
$this->loadConfig();
|
||||||
$this->mysqli = @new \mysqli($this->config->host, $this->config->user, $this->config->pass, null, $this->config->port);
|
$this->mysqli = @new \mysqli($this->config->host, $this->config->user, $this->config->pass, null, $this->config->port);
|
||||||
|
@ -56,7 +56,7 @@ class ManiaControl implements CallbackListener, CommandListener, TimerListener,
|
|||||||
/*
|
/*
|
||||||
* Constants
|
* Constants
|
||||||
*/
|
*/
|
||||||
const VERSION = '0.256';
|
const VERSION = '0.258';
|
||||||
const ISTRACKMANIACONTROL = True;
|
const ISTRACKMANIACONTROL = True;
|
||||||
const API_VERSION = '2038-01-19';
|
const API_VERSION = '2038-01-19';
|
||||||
const MIN_DEDIVERSION = '2020-07-01_00_00';
|
const MIN_DEDIVERSION = '2020-07-01_00_00';
|
||||||
|
@ -44,7 +44,7 @@ class MXMapInfo {
|
|||||||
} else {
|
} else {
|
||||||
$this->dir = 'maps';
|
$this->dir = 'maps';
|
||||||
$this->id = $mx->MapID;
|
$this->id = $mx->MapID;
|
||||||
$this->uid = isset($mx->MapUID) ? $mx->MapUID : '';
|
$this->uid = isset($mx->TrackUID) ? $mx->TrackUID : ''; // TODO: fix when migrating to new api; TrackUID is equal to MapUID
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!isset($mx->GbxMapName) || $mx->GbxMapName === '?') {
|
if (!isset($mx->GbxMapName) || $mx->GbxMapName === '?') {
|
||||||
|
@ -23,7 +23,7 @@ class ManiaExchangeManager implements UsageInformationAble {
|
|||||||
* Constants
|
* Constants
|
||||||
* @deprecated SEARCH Constants
|
* @deprecated SEARCH Constants
|
||||||
*/
|
*/
|
||||||
//Search orders (prior parameter) https://api.mania-exchange.com/documents/enums#orderings
|
//Search orders (prior parameter) https://api2.mania.exchange/documents/enums#orderings
|
||||||
const SEARCH_ORDER_NONE = -1;
|
const SEARCH_ORDER_NONE = -1;
|
||||||
const SEARCH_ORDER_TRACK_NAME = 0;
|
const SEARCH_ORDER_TRACK_NAME = 0;
|
||||||
const SEARCH_ORDER_AUTHOR = 1;
|
const SEARCH_ORDER_AUTHOR = 1;
|
||||||
@ -190,7 +190,7 @@ class ManiaExchangeManager implements UsageInformationAble {
|
|||||||
|
|
||||||
}
|
}
|
||||||
// compile search URL
|
// compile search URL
|
||||||
$url = "https://{$titlePrefix}/api/maps/get_map_info/multi/{$string}";
|
$url = 'https://' . $titlePrefix . ".mania.exchange/api/maps/get_map_info/multi/{$string}";
|
||||||
|
|
||||||
/*if ($key = $this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_MX_KEY)) {
|
/*if ($key = $this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_MX_KEY)) {
|
||||||
$url .= "&key=" . $key;
|
$url .= "&key=" . $key;
|
||||||
@ -300,7 +300,7 @@ class ManiaExchangeManager implements UsageInformationAble {
|
|||||||
|
|
||||||
}
|
}
|
||||||
// compile search URL
|
// compile search URL
|
||||||
$url = "https://{$titlePrefix}/api/maps/get_map_info/multi/{$mapId}";
|
$url = 'https://' . $titlePrefix . '.mania.exchange/' . 'api/maps/get_map_info/multi/' . $mapId;
|
||||||
|
|
||||||
/*if ($key = $this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_MX_KEY)) {
|
/*if ($key = $this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_MX_KEY)) {
|
||||||
$url .= "&key=" . $key;
|
$url .= "&key=" . $key;
|
||||||
|
@ -18,7 +18,7 @@ use Maniaplanet\DedicatedServer\Xmlrpc\GameModeException;
|
|||||||
class ManiaExchangeMapSearch implements UsageInformationAble {
|
class ManiaExchangeMapSearch implements UsageInformationAble {
|
||||||
use UsageInformationTrait;
|
use UsageInformationTrait;
|
||||||
|
|
||||||
//Search orders (prior parameter) https://api.mania-exchange.com/documents/enums#orderings
|
//Search orders (prior parameter) https://api2.mania.exchange/documents/enums#orderings
|
||||||
const SEARCH_ORDER_NONE = -1;
|
const SEARCH_ORDER_NONE = -1;
|
||||||
const SEARCH_ORDER_TRACK_NAME = 0;
|
const SEARCH_ORDER_TRACK_NAME = 0;
|
||||||
const SEARCH_ORDER_AUTHOR = 1;
|
const SEARCH_ORDER_AUTHOR = 1;
|
||||||
@ -41,7 +41,7 @@ class ManiaExchangeMapSearch implements UsageInformationAble {
|
|||||||
const SEARCH_ORDER_ONLINE_RATING_LTH = 26;
|
const SEARCH_ORDER_ONLINE_RATING_LTH = 26;
|
||||||
const SEARCH_ORDER_ONLINE_RATING_HTL = 27;
|
const SEARCH_ORDER_ONLINE_RATING_HTL = 27;
|
||||||
|
|
||||||
//Special Search Orders (mode parameter): https://api.mania-exchange.com/documents/enums#modes
|
//Special Search Orders (mode parameter): https://api2.mania.exchange/documents/enums#modes
|
||||||
const SEARCH_ORDER_SPECIAL_DEFAULT = 0;
|
const SEARCH_ORDER_SPECIAL_DEFAULT = 0;
|
||||||
const SEARCH_ORDER_SPECIAL_USER_TRACKS = 1;
|
const SEARCH_ORDER_SPECIAL_USER_TRACKS = 1;
|
||||||
const SEARCH_ORDER_SPECIAL_LATEST_TRACKS = 2;
|
const SEARCH_ORDER_SPECIAL_LATEST_TRACKS = 2;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user