performed code formatting

This commit is contained in:
Steffen Schröder 2014-08-25 15:33:22 +02:00
parent a224bba6b9
commit 8612521559
12 changed files with 275 additions and 283 deletions

View File

@ -208,8 +208,7 @@ class Chat {
* @param int $minLevel
* @param bool|string $prefix
*/
public function sendExceptionToAdmins(\Exception $exception, $minLevel = AuthenticationManager::AUTH_LEVEL_MODERATOR,
$prefix = true) {
public function sendExceptionToAdmins(\Exception $exception, $minLevel = AuthenticationManager::AUTH_LEVEL_MODERATOR, $prefix = true) {
$format = $this->maniaControl->getSettingManager()->getSettingValue($this, self::SETTING_FORMAT_ERROR);
$message = $format . "Exception: '{$exception->getMessage()}' ({$exception->getCode()})";
$this->sendMessageToAdmins($message, $minLevel, $prefix);

View File

@ -61,8 +61,7 @@ class CommandManager implements CallbackListener {
* @param string $description
* @return bool
*/
public function registerCommandListener($commandName, CommandListener $listener, $method, $adminCommand = false,
$description = null) {
public function registerCommandListener($commandName, CommandListener $listener, $method, $adminCommand = false, $description = null) {
if (is_array($commandName)) {
$success = false;
foreach ($commandName as $command) {

View File

@ -120,8 +120,7 @@ class AsynchronousFileReader {
array_push($this->requests, $request);
}
public function postDataTest(Request $request, $url, callable $function, $content, $compression = false,
$contentType = 'text/xml; charset=UTF-8;') {
public function postDataTest(Request $request, $url, callable $function, $content, $compression = false, $contentType = 'text/xml; charset=UTF-8;') {
$headers = array();
array_push($headers, 'Content-Type: ' . $contentType);
@ -163,8 +162,7 @@ class AsynchronousFileReader {
* @param bool $compression
* @param string $contentType
*/
public function postData($url, callable $function, $content, $compression = false,
$contentType = 'text/xml; charset=UTF-8;') {
public function postData($url, callable $function, $content, $compression = false, $contentType = 'text/xml; charset=UTF-8;') {
$headers = array();
array_push($headers, 'Content-Type: ' . $contentType);

View File

@ -68,8 +68,7 @@ abstract class BackupUtil {
* @param array $baseFileNames
* @return bool
*/
private static function zipDirectory(\ZipArchive &$zipArchive, $folderName, $prefixLength, array $excludes = array(),
array $baseFileNames = array()) {
private static function zipDirectory(\ZipArchive &$zipArchive, $folderName, $prefixLength, array $excludes = array(), array $baseFileNames = array()) {
$folderHandle = opendir($folderName);
if (!is_resource($folderHandle)) {
Logger::logError("Couldn't open folder '{$folderName}' for backup!");

View File

@ -132,12 +132,12 @@ class ManiaExchangeList implements CallbackListener, ManialinkPageAnswerListener
// search for matching maps
$this->maniaControl->getMapManager()->getMXManager()->fetchMapsAsync(function (array $maps) use (&$player) {
if (!$maps) {
$this->maniaControl->getChat()->sendError('No maps found, or MX is down!', $player->login);
return;
}
$this->showManiaExchangeList($maps, $player);
}, $searchString, $author, $environment);
if (!$maps) {
$this->maniaControl->getChat()->sendError('No maps found, or MX is down!', $player->login);
return;
}
$this->showManiaExchangeList($maps, $player);
}, $searchString, $author, $environment);
}
/**

View File

@ -159,32 +159,32 @@ class ManiaExchangeManager {
$url = "http://api.mania-exchange.com/{$titlePrefix}/maps/?ids={$string}";
$this->maniaControl->getFileReader()->loadFile($url, function ($mapInfo, $error) use ($titlePrefix, $url) {
if ($error) {
trigger_error("Error: '{$error}' for Url '{$url}'");
return;
}
if (!$mapInfo) {
return;
}
if ($error) {
trigger_error("Error: '{$error}' for Url '{$url}'");
return;
}
if (!$mapInfo) {
return;
}
$mxMapList = json_decode($mapInfo);
if ($mxMapList === null) {
trigger_error("Can't decode searched JSON Data from Url '{$url}'");
return;
}
$mxMapList = json_decode($mapInfo);
if ($mxMapList === null) {
trigger_error("Can't decode searched JSON Data from Url '{$url}'");
return;
}
$maps = array();
foreach ($mxMapList as $map) {
if ($map) {
$mxMapObject = new MXMapInfo($titlePrefix, $map);
if ($mxMapObject) {
array_push($maps, $mxMapObject);
}
}
}
$maps = array();
foreach ($mxMapList as $map) {
if ($map) {
$mxMapObject = new MXMapInfo($titlePrefix, $map);
if ($mxMapObject) {
array_push($maps, $mxMapObject);
}
}
}
$this->updateMapObjectsWithManiaExchangeIds($maps);
}, AsynchronousFileReader::CONTENT_TYPE_JSON);
$this->updateMapObjectsWithManiaExchangeIds($maps);
}, AsynchronousFileReader::CONTENT_TYPE_JSON);
}
/**
@ -252,27 +252,26 @@ class ManiaExchangeManager {
$url = 'http://api.mania-exchange.com/' . $titlePrefix . '/maps/?ids=' . $mapId;
$this->maniaControl->getFileReader()->loadFile($url, function ($mapInfo, $error) use (&$function, $titlePrefix, $url) {
$mxMapInfo = null;
if ($error) {
trigger_error($error);
} else {
$mxMapList = json_decode($mapInfo);
if (!is_array($mxMapList)) {
trigger_error('Cannot decode searched JSON data from ' . $url);
} else if (!empty($mxMapList)) {
$mxMapInfo = new MXMapInfo($titlePrefix, $mxMapList[0]);
}
}
call_user_func($function, $mxMapInfo);
}, AsynchronousFileReader::CONTENT_TYPE_JSON);
$mxMapInfo = null;
if ($error) {
trigger_error($error);
} else {
$mxMapList = json_decode($mapInfo);
if (!is_array($mxMapList)) {
trigger_error('Cannot decode searched JSON data from ' . $url);
} else if (!empty($mxMapList)) {
$mxMapInfo = new MXMapInfo($titlePrefix, $mxMapList[0]);
}
}
call_user_func($function, $mxMapInfo);
}, AsynchronousFileReader::CONTENT_TYPE_JSON);
}
/**
* @deprecated
* @see \ManiaControl\ManiaExchange\ManiaExchangeManager::fetchMapsAsync()
*/
public function getMapsAsync(callable $function, $name = '', $author = '', $env = '', $maxMapsReturned = 100,
$searchOrder = self::SEARCH_ORDER_UPDATED_NEWEST) {
public function getMapsAsync(callable $function, $name = '', $author = '', $env = '', $maxMapsReturned = 100, $searchOrder = self::SEARCH_ORDER_UPDATED_NEWEST) {
$this->fetchMapsAsync($function, $name, $author, $env, $maxMapsReturned, $searchOrder);
return true;
}
@ -287,8 +286,7 @@ class ManiaExchangeManager {
* @param int $maxMapsReturned
* @param int $searchOrder
*/
public function fetchMapsAsync(callable $function, $name = '', $author = '', $env = '', $maxMapsReturned = 100,
$searchOrder = self::SEARCH_ORDER_UPDATED_NEWEST) {
public function fetchMapsAsync(callable $function, $name = '', $author = '', $env = '', $maxMapsReturned = 100, $searchOrder = self::SEARCH_ORDER_UPDATED_NEWEST) {
// TODO: remove $env because it's not really used?
// Get Title Id
@ -326,34 +324,34 @@ class ManiaExchangeManager {
}
$this->maniaControl->getFileReader()->loadFile($url, function ($mapInfo, $error) use (&$function, $titlePrefix) {
if ($error) {
trigger_error($error);
return;
}
if ($error) {
trigger_error($error);
return;
}
$mxMapList = json_decode($mapInfo);
$mxMapList = json_decode($mapInfo);
if (!isset($mxMapList->results)) {
trigger_error('Cannot decode searched JSON data');
return;
}
if (!isset($mxMapList->results)) {
trigger_error('Cannot decode searched JSON data');
return;
}
$mxMapList = $mxMapList->results;
$mxMapList = $mxMapList->results;
if ($mxMapList === null) {
trigger_error('Cannot decode searched JSON data');
return;
}
if ($mxMapList === null) {
trigger_error('Cannot decode searched JSON data');
return;
}
$maps = array();
foreach ($mxMapList as $map) {
if (!empty($map)) {
array_push($maps, new MXMapInfo($titlePrefix, $map));
}
}
$maps = array();
foreach ($mxMapList as $map) {
if (!empty($map)) {
array_push($maps, new MXMapInfo($titlePrefix, $map));
}
}
call_user_func($function, $maps);
}, AsynchronousFileReader::CONTENT_TYPE_JSON);
call_user_func($function, $maps);
}, AsynchronousFileReader::CONTENT_TYPE_JSON);
}
/**

View File

@ -87,8 +87,8 @@ class CustomUIManager implements CallbackListener, TimerListener {
//TODO: validate necessity
//send it again after 500ms
$this->maniaControl->getTimerManager()->registerOneTimeListening($this, function () use (&$player) {
$this->updateManialink($player);
}, 500);
$this->updateManialink($player);
}, 500);
}
/**

View File

@ -179,8 +179,7 @@ class PlayerActions {
* @param int $spectatorState
* @param bool $releaseSlot
*/
public function forcePlayerToSpectator($adminLogin, $targetLogin, $spectatorState = self::SPECTATOR_BUT_KEEP_SELECTABLE,
$releaseSlot = true) {
public function forcePlayerToSpectator($adminLogin, $targetLogin, $spectatorState = self::SPECTATOR_BUT_KEEP_SELECTABLE, $releaseSlot = true) {
$admin = $this->maniaControl->getPlayerManager()->getPlayer($adminLogin);
if (!$this->maniaControl->getAuthenticationManager()->checkPermission($admin, self::SETTING_PERMISSION_FORCE_PLAYER_SPEC)
) {

View File

@ -475,8 +475,8 @@ class PluginManager {
public function fetchPluginList(callable $function) {
$url = ManiaControl::URL_WEBSERVICE . 'plugins';
$this->maniaControl->getFileReader()->loadFile($url, function ($dataJson, $error) use (&$function) {
$data = json_decode($dataJson);
call_user_func($function, $data, $error);
});
$data = json_decode($dataJson);
call_user_func($function, $data, $error);
});
}
}

View File

@ -81,10 +81,10 @@ class UsageReporter implements TimerListener {
$url = ManiaControl::URL_WEBSERVICE . '/usagereport?info=' . urlencode($info);
$this->maniaControl->getFileReader()->loadFile($url, function ($response, $error) {
$response = json_decode($response);
if ($error || !$response) {
Logger::logError('Error while Sending data: ' . print_r($error, true));
}
});
$response = json_decode($response);
if ($error || !$response) {
Logger::logError('Error while Sending data: ' . print_r($error, true));
}
});
}
}

View File

@ -76,53 +76,53 @@ class PluginUpdateManager implements CallbackListener, CommandListener, TimerLis
Logger::log($message);
$this->maniaControl->getPluginManager()->fetchPluginList(function ($data, $error) use (&$player) {
if (!$data || $error) {
$message = 'Error while checking Plugins for newer Versions!';
if ($player) {
$this->maniaControl->getChat()->sendError($message, $player);
}
Logger::logError($message);
return;
}
if (!$data || $error) {
$message = 'Error while checking Plugins for newer Versions!';
if ($player) {
$this->maniaControl->getChat()->sendError($message, $player);
}
Logger::logError($message);
return;
}
$pluginsData = $this->parsePluginsData($data);
$pluginClasses = $this->maniaControl->getPluginManager()->getPluginClasses();
$pluginUpdates = array();
$pluginsData = $this->parsePluginsData($data);
$pluginClasses = $this->maniaControl->getPluginManager()->getPluginClasses();
$pluginUpdates = array();
foreach ($pluginClasses as $pluginClass) {
/** @var Plugin $pluginClass */
$pluginId = $pluginClass::getId();
if (!isset($pluginsData[$pluginId])) {
continue;
}
/** @var PluginUpdateData $pluginData */
$pluginData = $pluginsData[$pluginId];
$pluginVersion = $pluginClass::getVersion();
if ($pluginData->isNewerThan($pluginVersion)) {
$pluginUpdates[$pluginId] = $pluginData;
$message = "There is an Update of '{$pluginData->pluginName}' available! ('{$pluginClass}' - Version {$pluginData->version})";
if ($player) {
$this->maniaControl->getChat()->sendSuccess($message, $player);
}
Logger::log($message);
}
}
foreach ($pluginClasses as $pluginClass) {
/** @var Plugin $pluginClass */
$pluginId = $pluginClass::getId();
if (!isset($pluginsData[$pluginId])) {
continue;
}
/** @var PluginUpdateData $pluginData */
$pluginData = $pluginsData[$pluginId];
$pluginVersion = $pluginClass::getVersion();
if ($pluginData->isNewerThan($pluginVersion)) {
$pluginUpdates[$pluginId] = $pluginData;
$message = "There is an Update of '{$pluginData->pluginName}' available! ('{$pluginClass}' - Version {$pluginData->version})";
if ($player) {
$this->maniaControl->getChat()->sendSuccess($message, $player);
}
Logger::log($message);
}
}
if (empty($pluginUpdates)) {
$message = 'Plugins Update Check completed: All Plugins are up-to-date!';
if ($player) {
$this->maniaControl->getChat()->sendSuccess($message, $player);
}
Logger::log($message);
} else {
$updatesCount = count($pluginUpdates);
$message = "Plugins Update Check completed: There are {$updatesCount} Updates available!";
if ($player) {
$this->maniaControl->getChat()->sendSuccess($message, $player);
}
Logger::log($message);
}
});
if (empty($pluginUpdates)) {
$message = 'Plugins Update Check completed: All Plugins are up-to-date!';
if ($player) {
$this->maniaControl->getChat()->sendSuccess($message, $player);
}
Logger::log($message);
} else {
$updatesCount = count($pluginUpdates);
$message = "Plugins Update Check completed: There are {$updatesCount} Updates available!";
if ($player) {
$this->maniaControl->getChat()->sendSuccess($message, $player);
}
Logger::log($message);
}
});
}
/**
@ -241,85 +241,85 @@ class PluginUpdateManager implements CallbackListener, CommandListener, TimerLis
*/
private function installPlugin(PluginUpdateData $pluginUpdateData, Player $player = null, $update = false) {
$this->maniaControl->getFileReader()->loadFile($pluginUpdateData->url, function ($updateFileContent, $error) use (
&$pluginUpdateData, &$player, &$update
) {
if (!$updateFileContent || $error) {
$message = "Error loading Update Data for '{$pluginUpdateData->pluginName}': {$error}!";
if ($player) {
$this->maniaControl->getChat()->sendInformation($message, $player);
}
Logger::logError($message);
return;
}
&$pluginUpdateData, &$player, &$update
) {
if (!$updateFileContent || $error) {
$message = "Error loading Update Data for '{$pluginUpdateData->pluginName}': {$error}!";
if ($player) {
$this->maniaControl->getChat()->sendInformation($message, $player);
}
Logger::logError($message);
return;
}
$actionNoun = ($update ? 'Update' : 'Install');
$actionVerb = ($update ? 'Updating' : 'Installing');
$actionVerbDone = ($update ? 'updated' : 'installed');
$actionNoun = ($update ? 'Update' : 'Install');
$actionVerb = ($update ? 'Updating' : 'Installing');
$actionVerbDone = ($update ? 'updated' : 'installed');
$message = "Now {$actionVerb} '{$pluginUpdateData->pluginName}'...";
if ($player) {
$this->maniaControl->getChat()->sendInformation($message, $player);
}
Logger::log($message);
$message = "Now {$actionVerb} '{$pluginUpdateData->pluginName}'...";
if ($player) {
$this->maniaControl->getChat()->sendInformation($message, $player);
}
Logger::log($message);
$tempDir = FileUtil::getTempFolder();
$updateFileName = $tempDir . $pluginUpdateData->zipfile;
$tempDir = FileUtil::getTempFolder();
$updateFileName = $tempDir . $pluginUpdateData->zipfile;
$bytes = file_put_contents($updateFileName, $updateFileContent);
if (!$bytes || $bytes <= 0) {
$message = "Plugin {$actionNoun} failed: Couldn't save {$actionNoun} Zip!";
if ($player) {
$this->maniaControl->getChat()->sendError($message, $player);
}
Logger::logError($message);
return;
}
$bytes = file_put_contents($updateFileName, $updateFileContent);
if (!$bytes || $bytes <= 0) {
$message = "Plugin {$actionNoun} failed: Couldn't save {$actionNoun} Zip!";
if ($player) {
$this->maniaControl->getChat()->sendError($message, $player);
}
Logger::logError($message);
return;
}
$zip = new \ZipArchive();
$result = $zip->open($updateFileName);
if ($result !== true) {
$message = "Plugin {$actionNoun} failed: Couldn't open {$actionNoun} Zip! ({$result})";
if ($player) {
$this->maniaControl->getChat()->sendError($message, $player);
}
Logger::logError($message);
return;
}
$zip = new \ZipArchive();
$result = $zip->open($updateFileName);
if ($result !== true) {
$message = "Plugin {$actionNoun} failed: Couldn't open {$actionNoun} Zip! ({$result})";
if ($player) {
$this->maniaControl->getChat()->sendError($message, $player);
}
Logger::logError($message);
return;
}
$zip->extractTo(MANIACONTROL_PATH . 'plugins' . DIRECTORY_SEPARATOR);
$zip->close();
unlink($updateFileName);
FileUtil::deleteTempFolder();
$zip->extractTo(MANIACONTROL_PATH . 'plugins' . DIRECTORY_SEPARATOR);
$zip->close();
unlink($updateFileName);
FileUtil::deleteTempFolder();
$messageExtra = '';
if ($update) {
$messageExtra = ' (Restart ManiaControl to load the new Version!)';
}
$message = "Successfully {$actionVerbDone} '{$pluginUpdateData->pluginName}'!{$messageExtra}";
if ($player) {
$this->maniaControl->getChat()->sendSuccess($message, $player);
}
Logger::log($message);
$messageExtra = '';
if ($update) {
$messageExtra = ' (Restart ManiaControl to load the new Version!)';
}
$message = "Successfully {$actionVerbDone} '{$pluginUpdateData->pluginName}'!{$messageExtra}";
if ($player) {
$this->maniaControl->getChat()->sendSuccess($message, $player);
}
Logger::log($message);
if (!$update) {
$newPluginClasses = $this->maniaControl->getPluginManager()->loadPlugins();
if (empty($newPluginClasses)) {
$message = "Loading fresh installed Plugin '{$pluginUpdateData->pluginName}' failed!";
if ($player) {
$this->maniaControl->getChat()->sendError($message, $player);
}
Logger::log($message);
} else {
$message = "Successfully loaded fresh installed Plugin '{$pluginUpdateData->pluginName}'!";
if ($player) {
$this->maniaControl->getChat()->sendSuccess($message, $player);
}
Logger::log($message);
if (!$update) {
$newPluginClasses = $this->maniaControl->getPluginManager()->loadPlugins();
if (empty($newPluginClasses)) {
$message = "Loading fresh installed Plugin '{$pluginUpdateData->pluginName}' failed!";
if ($player) {
$this->maniaControl->getChat()->sendError($message, $player);
}
Logger::log($message);
} else {
$message = "Successfully loaded fresh installed Plugin '{$pluginUpdateData->pluginName}'!";
if ($player) {
$this->maniaControl->getChat()->sendSuccess($message, $player);
}
Logger::log($message);
$this->maniaControl->getConfigurator()->showMenu($player, InstallMenu::getTitle());
}
}
});
$this->maniaControl->getConfigurator()->showMenu($player, InstallMenu::getTitle());
}
}
});
}
/**
@ -356,22 +356,22 @@ class PluginUpdateManager implements CallbackListener, CommandListener, TimerLis
$url = ManiaControl::URL_WEBSERVICE . 'plugins/' . $pluginId;
$this->maniaControl->getFileReader()->loadFile($url, function ($data, $error) use (&$player) {
if ($error || !$data) {
$message = "Error loading Plugin Install Data! {$error}";
$this->maniaControl->getChat()->sendError($message, $player);
return;
}
if ($error || !$data) {
$message = "Error loading Plugin Install Data! {$error}";
$this->maniaControl->getChat()->sendError($message, $player);
return;
}
$data = json_decode($data);
if (!$data) {
$message = "Error loading Plugin Install Data! {$error}";
$this->maniaControl->getChat()->sendError($message, $player);
return;
}
$data = json_decode($data);
if (!$data) {
$message = "Error loading Plugin Install Data! {$error}";
$this->maniaControl->getChat()->sendError($message, $player);
return;
}
$pluginUpdateData = new PluginUpdateData($data);
$this->installPlugin($pluginUpdateData, $player);
});
$pluginUpdateData = new PluginUpdateData($data);
$this->installPlugin($pluginUpdateData, $player);
});
}
}

View File

@ -141,18 +141,18 @@ class UpdateManager implements CallbackListener, CommandListener, TimerListener
$url = ManiaControl::URL_WEBSERVICE . 'versions?current=1&channel=' . $updateChannel;
$this->maniaControl->getFileReader()->loadFile($url, function ($dataJson, $error) use (&$function) {
if ($error) {
Logger::logError('Error on UpdateCheck: ' . $error);
return;
}
$versions = json_decode($dataJson);
if (!$versions || !isset($versions[0])) {
call_user_func($function);
} else {
$updateData = new UpdateData($versions[0]);
call_user_func($function, $updateData);
}
});
if ($error) {
Logger::logError('Error on UpdateCheck: ' . $error);
return;
}
$versions = json_decode($dataJson);
if (!$versions || !isset($versions[0])) {
call_user_func($function);
} else {
$updateData = new UpdateData($versions[0]);
call_user_func($function, $updateData);
}
});
}
/**
@ -329,66 +329,66 @@ class UpdateManager implements CallbackListener, CommandListener, TimerListener
$updateData = $this->coreUpdateData;
$this->maniaControl->getFileReader()->loadFile($updateData->url, function ($updateFileContent, $error) use (
$updateData, &$player
) {
if (!$updateFileContent || $error) {
$message = "Update failed: Couldn't load Update zip! {$error}";
if ($player) {
$this->maniaControl->getChat()->sendError($message, $player);
}
Logger::logError($message);
return;
}
$updateData, &$player
) {
if (!$updateFileContent || $error) {
$message = "Update failed: Couldn't load Update zip! {$error}";
if ($player) {
$this->maniaControl->getChat()->sendError($message, $player);
}
Logger::logError($message);
return;
}
$tempDir = FileUtil::getTempFolder();
if (!$tempDir) {
$message = "Update failed: Can't save Update zip!";
if ($player) {
$this->maniaControl->getChat()->sendError($message, $player);
}
Logger::logError($message);
return;
}
$updateFileName = $tempDir . basename($updateData->url);
$tempDir = FileUtil::getTempFolder();
if (!$tempDir) {
$message = "Update failed: Can't save Update zip!";
if ($player) {
$this->maniaControl->getChat()->sendError($message, $player);
}
Logger::logError($message);
return;
}
$updateFileName = $tempDir . basename($updateData->url);
$bytes = file_put_contents($updateFileName, $updateFileContent);
if (!$bytes || $bytes <= 0) {
$message = "Update failed: Couldn't save Update zip!";
if ($player) {
$this->maniaControl->getChat()->sendError($message, $player);
}
Logger::logError($message);
return;
}
$bytes = file_put_contents($updateFileName, $updateFileContent);
if (!$bytes || $bytes <= 0) {
$message = "Update failed: Couldn't save Update zip!";
if ($player) {
$this->maniaControl->getChat()->sendError($message, $player);
}
Logger::logError($message);
return;
}
$zip = new \ZipArchive();
$result = $zip->open($updateFileName);
if ($result !== true) {
$message = "Update failed: Couldn't open Update Zip. ({$result})";
if ($player) {
$this->maniaControl->getChat()->sendError($message, $player);
}
Logger::logError($message);
unlink($updateFileName);
return;
}
$zip = new \ZipArchive();
$result = $zip->open($updateFileName);
if ($result !== true) {
$message = "Update failed: Couldn't open Update Zip. ({$result})";
if ($player) {
$this->maniaControl->getChat()->sendError($message, $player);
}
Logger::logError($message);
unlink($updateFileName);
return;
}
$zip->extractTo(MANIACONTROL_PATH);
$zip->close();
unlink($updateFileName);
FileUtil::deleteTempFolder();
$zip->extractTo(MANIACONTROL_PATH);
$zip->close();
unlink($updateFileName);
FileUtil::deleteTempFolder();
// Set the Nightly Build Date
$this->setNightlyBuildDate($updateData->releaseDate);
// Set the Nightly Build Date
$this->setNightlyBuildDate($updateData->releaseDate);
$message = 'Update finished!';
if ($player) {
$this->maniaControl->getChat()->sendSuccess($message, $player);
}
Logger::log($message);
$message = 'Update finished!';
if ($player) {
$this->maniaControl->getChat()->sendSuccess($message, $player);
}
Logger::log($message);
$this->maniaControl->restart();
});
$this->maniaControl->restart();
});
return true;
}