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