Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video 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 4053 to 4069

Definition

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


    
//update_progress_file("writing zip command");  
    
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 24th November 2020 05:35 Europe/London time based on the source file dated 23rd November 2020 16:00 Europe/London time.