collection_download_process_command_to_file()

Description

Write the batch download command parameters to a file ready for execution.

Parameters

ColumnTypeDefaultDescription
$use_zip_extension boolean
$collection_download_tar boolean
$id integer
$collection integer
$size string
&$path
$path string

Return

void

Location

include/collections_functions.php lines 4746 to 4760

Definition

 
function collection_download_process_command_to_file($use_zip_extension$collection_download_tar$id$collection$size, &$path)
{
    global 
$config_windows$cmdfile;

    if (!
$use_zip_extension && !$collection_download_tar) {
        
$cmdfile get_temp_dir(false$id) . "/zipcmd" $collection "-" $size ".txt";
        
$fh fopen($cmdfile'w') or die("can't open file");
        
# Remove Windows line endings - fixes an issue with using tar command - somehow the file has got Windows line breaks
        
if (!$config_windows) {
            
$path preg_replace('/\r\n/'"\n"$path);
        }
        
fwrite($fh$path);
        
fclose($fh);
    }
}

This article was last updated 25th March 2025 10:35 Europe/London time based on the source file dated 11th March 2025 11:35 Europe/London time.