Code cleanup

This commit is contained in:
Shoghi Cervantes
2014-08-21 17:26:41 +02:00
parent e1ef86074e
commit db7222976e
105 changed files with 932 additions and 896 deletions

View File

@ -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("----- -------------------------- -----");
}