Commit 18538de5 authored by Laurent Joly's avatar Laurent Joly
Browse files

Update depot_upload_app.php

parent c8971fbe
......@@ -110,17 +110,31 @@ if (isset($_FILES['appliXml'])) {
}
echo "</td></tr>\n";
echo "</table>\n";
if ($i == $success + 1) {
echo "<h2>Suppression des fichiers d'installation obsolètes</h2>\n";
foreach ($package->getElementsByTagName('delete') as $del) {
if ($i == $success + 1)
{
$k=0;
foreach ($package->getElementsByTagName('delete') as $del)
{
if ($k==0)
{
echo "<h2>Suppression des fichiers d'installation obsolètes</h2>\n";
$k++;
}
$fileUrl = (string) $del->getAttribute('file');
if (file_exists($wpkgroot2 . "/" . $fileUrl)) {
if (file_exists($wpkgroot2 . "/" . $fileUrl))
{
unlink($wpkgroot2 . "/" . $fileUrl);
echo "Suppression du fichier <b>" . $fileUrl . "</b>.<br>\n";
}
}
echo "<h2>Décompression des fichiers d'installation</h2>\n";
foreach ($package->getElementsByTagName('untar') as $untar) {
$k=0;
foreach ($package->getElementsByTagName('untar') as $untar)
{
if ($k==0)
{
echo "<h2>Décompression des fichiers d'installation</h2>\n";
$k++;
}
$tar_file = (string) $untar->getAttribute('tarfile');
$tar_target = (string) $untar->getAttribute('target');
$return=untar_file($tar_file,$tar_target);
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment