Browse Source

implementation de retirer() sur le format tar

pull/4414/head
Cerdic 2 years ago
parent
commit
8db0a07557
  1. 11
      inc/archives.php
  2. 3
      inc/pcltar.php

11
inc/archives.php

@ -372,6 +372,17 @@ class SpipArchives
return false;
}
break;
case 'tar':
include_spip('inc/pcltar');
$ok = PclTarDelete($this->fichierArchive, $fichiers, $this->modeCompression);
if ($ok === 0){
$this->codeErreur = 1;
$this->messageErreur = "retirer() : Echec retirer fichiers ".json_encode($fichiers). " " . PclErrorString() . ' pour paquet: ' . $this->fichierArchive;
return false;
}
break;
}

3
inc/pcltar.php

@ -574,7 +574,8 @@ if (!defined("PCL_TAR")) {
// List of the files which are kept in the archive (same format as PclTarList())
// --------------------------------------------------------------------------------
function PclTarDelete($p_tarname, $p_filelist, $p_mode = "") {
TrFctStart(__FILE__, __LINE__, "PclTarDelete", "tar='$p_tarname', list='$p_filelist', mode='$p_mode'");
$trace_file_list = (is_array($p_filelist) ? implode(' ', $p_filelist) : $p_filelist);
TrFctStart(__FILE__, __LINE__, "PclTarDelete", "tar='$p_tarname', list='$trace_file_list', mode='$p_mode'");
$v_result = 1;
// ----- Extract the tar format from the extension

Loading…
Cancel
Save