Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource functions

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 5079 to 5093

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 19th March 2024 05:35 Europe/London time based on the source file dated 15th March 2024 17:00 Europe/London time.