mirror of
https://github.com/pmmp/PocketMine-MP.git
synced 2025-09-09 19:24:12 +00:00
Code cleanup
This commit is contained in:
@ -57,7 +57,7 @@ class AutoUpdater{
|
||||
}
|
||||
|
||||
protected function check(){
|
||||
$response = Utils::getURL($this->endpoint . "?channel=". $this->getChannel(), 4);
|
||||
$response = Utils::getURL($this->endpoint . "?channel=" . $this->getChannel(), 4);
|
||||
$response = @json_decode($response, true);
|
||||
if(!is_array($response)){
|
||||
return;
|
||||
@ -86,11 +86,11 @@ class AutoUpdater{
|
||||
$logger = $this->server->getLogger();
|
||||
$newVersion = new VersionString($this->updateInfo["version"]);
|
||||
$logger->warning("----- PocketMine-MP Auto Updater -----");
|
||||
$logger->warning("Your version of PocketMine-MP is out of date. Version ".$newVersion->get(false)." (build #".$newVersion->getBuild().") was released on ".date("D M j h:i:s Y", $this->updateInfo["date"]));
|
||||
$logger->warning("Your version of PocketMine-MP is out of date. Version " . $newVersion->get(false) . " (build #" . $newVersion->getBuild() . ") was released on " . date("D M j h:i:s Y", $this->updateInfo["date"]));
|
||||
if($this->updateInfo["details_url"] !== null){
|
||||
$logger->warning("Details: ".$this->updateInfo["details_url"]);
|
||||
$logger->warning("Details: " . $this->updateInfo["details_url"]);
|
||||
}
|
||||
$logger->warning("Download: ".$this->updateInfo["download_url"]);
|
||||
$logger->warning("Download: " . $this->updateInfo["download_url"]);
|
||||
$logger->warning("----- -------------------------- -----");
|
||||
}
|
||||
|
||||
@ -102,7 +102,7 @@ class AutoUpdater{
|
||||
protected function showChannelSuggestionStable(){
|
||||
$logger = $this->server->getLogger();
|
||||
$logger->info("----- PocketMine-MP Auto Updater -----");
|
||||
$logger->info("It appears you're running a Stable build, when you've specified that you prefer to run ".ucfirst($this->getChannel())." builds.");
|
||||
$logger->info("It appears you're running a Stable build, when you've specified that you prefer to run " . ucfirst($this->getChannel()) . " builds.");
|
||||
$logger->info("If you would like to be kept informed about new Stable builds only, it is recommended that you change 'preferred-channel' in your pocketmine.yml to 'stable'.");
|
||||
$logger->info("----- -------------------------- -----");
|
||||
}
|
||||
|
Reference in New Issue
Block a user