added gbxdatafetcher

This commit is contained in:
kremsy 2013-11-10 17:20:32 +01:00
parent 222972808d
commit bc5b1842c2
3 changed files with 1458 additions and 6 deletions

File diff suppressed because it is too large Load Diff

View File

@ -18,6 +18,9 @@ require_once __DIR__ . '/server.php';
require_once __DIR__ . '/settingManager.php'; require_once __DIR__ . '/settingManager.php';
require_once __DIR__ . '/settingConfigurator.php'; require_once __DIR__ . '/settingConfigurator.php';
require_once __DIR__ . '/mapHandler.php'; require_once __DIR__ . '/mapHandler.php';
require_once __DIR__ . '/GbxDataFetcher/gbxdatafetcher.inc.php';
list($endiantest) = array_values(unpack('L1L', pack('V', 1))); list($endiantest) = array_values(unpack('L1L', pack('V', 1)));
if ($endiantest == 1) { if ($endiantest == 1) {
require_once __DIR__ . '/PhpRemote/GbxRemote.inc.php'; require_once __DIR__ . '/PhpRemote/GbxRemote.inc.php';

View File

@ -1,10 +1,4 @@
<?php <?php
/**
* Created by PhpStorm.
* User: Lukas
* Date: 10.11.13
* Time: 16:46
*/
namespace ManiaControl; namespace ManiaControl;
@ -65,6 +59,30 @@ class map {
$this->name = 'undefined'; $this->name = 'undefined';
} }
/*
* aseco trash:
* // obtain map's GBX data, MX info & records
$map_item->mx = findMXdata($map_item->uid, true);
// titleuid (is not in the GetMapInfos method..)
$map_item->titleuid = $map_item->gbx->titleUid;
// author Informations from the GBXBaseFetcher
$map_item->authorNick = $map_item->gbx->authorNick;
$map_item->authorZone = $map_item->gbx->authorZone;
$map_item->authorEInfo = $map_item->gbx->authorEInfo;
*
*/
$mapFetcher = new \GBXChallMapFetcher(true);
try{
$mapFetcher->processFile($this->server->mapdir . $this->filename);
} catch (Exception $e)
{
trigger_error($e->getMessage(), E_USER_WARNING);
}
$this->authorNick = $mapFetcher->authorNick;
$this->authorEInfo = $mapFetcher->authorEInfo;
$this->authorZone = $mapFetcher->authorZone;
} }
} }