function PclTarUpdate($p_tarname, $p_filelist, $p_mode = "", $p_add_dir = "", $p_remove_dir = "") { TrFctStart(__FILE__, __LINE__, "PclTarUpdate", "tar='{$p_tarname}', list='{$p_filelist}', mode='{$p_mode}'"); $v_result = 1; // ----- Extract the tar format from the extension if ($p_mode == "" || $p_mode != "tar" && $p_mode != "tgz") { if (($p_mode = PclTarHandleExtension($p_tarname)) == "") { // ----- Return TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); return 0; } } // ----- Look if the $p_filelist is really an array if (is_array($p_filelist)) { // ----- Call the extracting fct if (($v_result = PclTarHandleUpdate($p_tarname, $p_filelist, $p_list, $p_mode, $p_add_dir, $p_remove_dir)) != 1) { TrFctEnd(__FILE__, __LINE__, 0, PclErrorString()); return 0; } } else { if (is_string($p_filelist)) { // ----- Create a list with the elements from the string $v_list = explode(" ", $p_filelist); // ----- Call the extracting fct if (($v_result = PclTarHandleUpdate($p_tarname, $v_list, $p_list, $p_mode, $p_add_dir, $p_remove_dir)) != 1) { TrFctEnd(__FILE__, __LINE__, 0, PclErrorString()); return 0; } } else { // ----- Error log PclErrorLog(-3, "Invalid variable type p_filelist"); // ----- Return TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); return 0; } } // ----- Return TrFctEnd(__FILE__, __LINE__, $p_list); return $p_list; }
function PclTarUpdate($p_tarname, $p_filelist, $p_mode = "", $p_add_dir = "", $p_remove_dir = "") { TrFctStart(__FILE__, __LINE__, "PclTarUpdate", "tar='{$p_tarname}', list='{$p_filelist}', mode='{$p_mode}'"); $v_result = 1; if ($p_mode == "" || $p_mode != "tar" && $p_mode != "tgz") { if (($p_mode = PclTarHandleExtension($p_tarname)) == "") { TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); return 0; } } if (is_array($p_filelist)) { if (($v_result = PclTarHandleUpdate($p_tarname, $p_filelist, $p_list, $p_mode, $p_add_dir, $p_remove_dir)) != 1) { TrFctEnd(__FILE__, __LINE__, 0, PclErrorString()); return 0; } } else { if (is_string($p_filelist)) { $v_list = explode(" ", $p_filelist); if (($v_result = PclTarHandleUpdate($p_tarname, $v_list, $p_list, $p_mode, $p_add_dir, $p_remove_dir)) != 1) { TrFctEnd(__FILE__, __LINE__, 0, PclErrorString()); return 0; } } else { PclErrorLog(-3, "Invalid variable type p_filelist"); TrFctEnd(__FILE__, __LINE__, PclErrorCode(), PclErrorString()); return 0; } } TrFctEnd(__FILE__, __LINE__, $p_list); return $p_list; }