From bba4b09ee995bd1ed7a096415285002db13096ce Mon Sep 17 00:00:00 2001 From: Geoffrey Frogeye Date: Wed, 5 Apr 2017 08:40:30 +0200 Subject: [PATCH] =?UTF-8?q?Version=202=20trouv=C3=A9e?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- addrelease.php | 31 +--- data.xml | 4 +- index.php | 470 +++++++++++++++++++++++------------------------ lastVersions.txt | 2 +- preRelease.php | 354 +++++++++++++++++------------------ test.php | 4 +- 6 files changed, 425 insertions(+), 440 deletions(-) diff --git a/addrelease.php b/addrelease.php index 805bccf..af15223 100755 --- a/addrelease.php +++ b/addrelease.php @@ -20,7 +20,7 @@ function addRelease($input) { $url = 'http://s3.amazonaws.com/MinecraftDownload/minecraft.jar'; } else { $type = 'apr'; - $url = 'http://assets.minecraft.net/'.$input.'/minecraft.zip'; + $url = 'http://assets.minecraft.net/'.$input.'/minecraft.jar'; } // Chargement du XML @@ -43,28 +43,13 @@ function addRelease($input) { // Extraction et copie de minecraft.jar $directory = $id.' - '.$lastVersions_e[0].' ('.rand(1, 1000).')'; if (!mkdir($directory) OR !copy($url, $directory.'/minecraft.jar')) { return 'ERREUR Impossible de copier le fichier ou de cr�er un nouveau dossier.';} - if ($type == 'r') { - $zip = new ZipArchive; - if ($zip->open($directory.'/minecraft.jar') AND mkdir($directory.'/content')) { - $zip->extractTo($directory.'/content'); - $zip->close(); - } - } else { - $zip = new ZipArchive; - if ($zip->open($directory.'/minecraft.jar') AND mkdir($directory.'/extract')) { - $zip->extractTo($directory.'/extract'); - $zip->close(); - $zip2 = new ZipArchive; - if ($zip2->open($directory.'/extract/bin/minecraft.jar') AND mkdir($directory.'/content')) { - $zip2->extractTo($directory.'/content'); - $zip2->close(); - } else { - return 'ERREUR Impossible d\'extraire le fichier ou de cr�er un nouveau dossier².'; - } - } else { - return 'ERREUR Impossible d\'extraire le fichier ou de cr�er un nouveau dossier.'; - } - } + $zip = new ZipArchive; + if ($zip->open($directory.'/minecraft.jar') AND mkdir($directory.'/content')) { + $zip->extractTo($directory.'/content'); + $zip->close(); + } else { + return 'ERREUR Impossible d\'extraire le fichier ou de cr�er un nouveau dossier.'; + } $md5 = md5_file($directory.'/minecraft.jar'); directoryConstruct($directory.'/content', $files, $data, directoryOld($release)); diff --git a/data.xml b/data.xml index 10aa7c3..8e36723 100755 --- a/data.xml +++ b/data.xml @@ -1,5 +1,5 @@ - + @@ -24,4 +24,4 @@ - +