merge Maniacontrol official repository changes

This commit is contained in:
Beu
2025-01-23 19:33:22 +01:00
parent a6875cabc8
commit e6444a5a47
6 changed files with 17 additions and 7 deletions

View File

@@ -44,7 +44,7 @@ class MXMapInfo {
} else {
$this->dir = 'maps';
$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 === '?') {

View File

@@ -23,7 +23,7 @@ class ManiaExchangeManager implements UsageInformationAble {
* 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_TRACK_NAME = 0;
const SEARCH_ORDER_AUTHOR = 1;
@@ -190,7 +190,7 @@ class ManiaExchangeManager implements UsageInformationAble {
}
// 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)) {
$url .= "&key=" . $key;
@@ -300,7 +300,7 @@ class ManiaExchangeManager implements UsageInformationAble {
}
// 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)) {
$url .= "&key=" . $key;

View File

@@ -18,7 +18,7 @@ use Maniaplanet\DedicatedServer\Xmlrpc\GameModeException;
class ManiaExchangeMapSearch implements UsageInformationAble {
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_TRACK_NAME = 0;
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_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_USER_TRACKS = 1;
const SEARCH_ORDER_SPECIAL_LATEST_TRACKS = 2;