small fix
This commit is contained in:
parent
706f30636e
commit
1f589e9e93
@ -274,8 +274,10 @@ class ManiaExchangeManager {
|
||||
// compile search URL
|
||||
$url = 'http://' . $titlePrefix . '.mania-exchange.com/tracksearch?api=on';
|
||||
|
||||
if ($env != '') {
|
||||
$url .= '&environments=' . $this->getEnvironment($env);
|
||||
$game = explode('@', $titleId);
|
||||
$envNumber = $this->getEnvironment($game[0]);
|
||||
if($env != '' || $envNumber != -1){
|
||||
$url .= '&environments=' . $envNumber;
|
||||
}
|
||||
if ($name != '') {
|
||||
$url .= '&trackname=' . str_replace(" ", "%20", $name);
|
||||
@ -287,6 +289,7 @@ class ManiaExchangeManager {
|
||||
$url .= '&priord=' . $searchOrder;
|
||||
$url .= '&limit=' . $maxMapsReturned;
|
||||
|
||||
|
||||
// Get MapTypes
|
||||
try {
|
||||
$scriptInfos = $this->maniaControl->client->getModeScriptInfo();
|
||||
@ -334,7 +337,6 @@ class ManiaExchangeManager {
|
||||
private function getEnvironment($env) {
|
||||
switch($env) {
|
||||
case 'TMCanyon':
|
||||
case 'SMStorm':
|
||||
return 1;
|
||||
case 'TMStadium':
|
||||
return 2;
|
||||
|
Loading…
Reference in New Issue
Block a user