mx https update

This commit is contained in:
kremsy 2015-11-16 22:07:06 +01:00
parent a06e0b90b3
commit 458ff45f85
5 changed files with 15 additions and 11 deletions

View File

@ -1,3 +1,7 @@
##v0.16x###
# Additions
- updated mx links to https
###v0.163### ###v0.163###
#Additions #Additions
- completely reworked the filereader (new version, way more flexible), old methods are still working but deprecated - completely reworked the filereader (new version, way more flexible), old methods are still working but deprecated

View File

@ -93,23 +93,23 @@ class MXMapInfo {
$this->lbrating = $this->trkvalue; $this->lbrating = $this->trkvalue;
} }
$this->pageurl = 'http://' . $this->prefix . '.mania-exchange.com/' . $this->dir . '/view/' . $this->id; $this->pageurl = 'https://' . $this->prefix . '.mania-exchange.com/' . $this->dir . '/view/' . $this->id;
$this->downloadurl = 'http://' . $this->prefix . '.mania-exchange.com/' . $this->dir . '/download/' . $this->id; $this->downloadurl = 'https://' . $this->prefix . '.mania-exchange.com/' . $this->dir . '/download/' . $this->id;
if ($mx->HasScreenshot) { if ($mx->HasScreenshot) {
$this->imageurl = 'http://' . $this->prefix . '.mania-exchange.com/' . $this->dir . '/screenshot/normal/' . $this->id; $this->imageurl = 'https://' . $this->prefix . '.mania-exchange.com/' . $this->dir . '/screenshot/normal/' . $this->id;
} else { } else {
$this->imageurl = ''; $this->imageurl = '';
} }
if ($mx->HasThumbnail) { if ($mx->HasThumbnail) {
$this->thumburl = 'http://' . $this->prefix . '.mania-exchange.com/' . $this->dir . '/thumbnail/' . $this->id; $this->thumburl = 'https://' . $this->prefix . '.mania-exchange.com/' . $this->dir . '/thumbnail/' . $this->id;
} else { } else {
$this->thumburl = ''; $this->thumburl = '';
} }
if ($this->prefix === 'tm' && $this->replayid > 0) { if ($this->prefix === 'tm' && $this->replayid > 0) {
$this->replayurl = 'http://' . $this->prefix . '.mania-exchange.com/replays/download/' . $this->replayid; $this->replayurl = 'https://' . $this->prefix . '.mania-exchange.com/replays/download/' . $this->replayid;
} else { } else {
$this->replayurl = ''; $this->replayurl = '';
} }

View File

@ -20,7 +20,7 @@ class ManiaExchangeManager {
* Constants * Constants
* @deprecated SEARCH Constants * @deprecated SEARCH Constants
*/ */
//Search orders (prior parameter) http://api.mania-exchange.com/documents/enums#orderings //Search orders (prior parameter) https://api.mania-exchange.com/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;
@ -157,7 +157,7 @@ class ManiaExchangeManager {
$titlePrefix = $this->maniaControl->getMapManager()->getCurrentMap()->getGame(); $titlePrefix = $this->maniaControl->getMapManager()->getCurrentMap()->getGame();
// compile search URL // compile search URL
$url = "http://api.mania-exchange.com/{$titlePrefix}/maps/?ids={$string}"; $url = "https://api.mania-exchange.com/{$titlePrefix}/maps/?ids={$string}";
$this->maniaControl->getFileReader()->loadFile($url, function ($mapInfo, $error) use ($titlePrefix, $url) { $this->maniaControl->getFileReader()->loadFile($url, function ($mapInfo, $error) use ($titlePrefix, $url) {
if ($error) { if ($error) {
@ -250,7 +250,7 @@ class ManiaExchangeManager {
$titlePrefix = $this->maniaControl->getMapManager()->getCurrentMap()->getGame(); $titlePrefix = $this->maniaControl->getMapManager()->getCurrentMap()->getGame();
// compile search URL // compile search URL
$url = 'http://api.mania-exchange.com/' . $titlePrefix . '/maps/?ids=' . $mapId; $url = 'https://api.mania-exchange.com/' . $titlePrefix . '/maps/?ids=' . $mapId;
$this->maniaControl->getFileReader()->loadFile($url, function ($mapInfo, $error) use (&$function, $titlePrefix, $url) { $this->maniaControl->getFileReader()->loadFile($url, function ($mapInfo, $error) use (&$function, $titlePrefix, $url) {
$mxMapInfo = null; $mxMapInfo = null;

View File

@ -13,7 +13,7 @@ use Maniaplanet\DedicatedServer\Xmlrpc\GameModeException;
* @license http://www.gnu.org/licenses/ GNU General Public License, Version 3 * @license http://www.gnu.org/licenses/ GNU General Public License, Version 3
*/ */
class ManiaExchangeMapSearch { class ManiaExchangeMapSearch {
//Search orders (prior parameter) http://api.mania-exchange.com/documents/enums#orderings //Search orders (prior parameter) https://api.mania-exchange.com/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;
@ -36,7 +36,7 @@ class ManiaExchangeMapSearch {
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): http://api.mania-exchange.com/documents/enums#modes //Special Search Orders (mode parameter): https://api.mania-exchange.com/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;

View File

@ -59,7 +59,7 @@ class KarmaPlugin implements CallbackListener, TimerListener, Plugin {
const SETTING_MX_KARMA_ACTIVATED = 'Activate MX-Karma'; const SETTING_MX_KARMA_ACTIVATED = 'Activate MX-Karma';
const SETTING_MX_KARMA_IMPORTING = 'Import old MX-Karma'; const SETTING_MX_KARMA_IMPORTING = 'Import old MX-Karma';
const MX_IMPORT_TABLE = 'mc_karma_mximport'; const MX_IMPORT_TABLE = 'mc_karma_mximport';
const MX_KARMA_URL = 'http://karma.mania-exchange.com/api2/'; const MX_KARMA_URL = 'https://karma.mania-exchange.com/api2/';
const MX_KARMA_START_SESSION = 'startSession'; const MX_KARMA_START_SESSION = 'startSession';
const MX_KARMA_ACTIVATE_SESSION = 'activateSession'; const MX_KARMA_ACTIVATE_SESSION = 'activateSession';
const MX_KARMA_SAVE_VOTES = 'saveVotes'; const MX_KARMA_SAVE_VOTES = 'saveVotes';