Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test 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 5129 to 5143

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 15th December 2024 17:35 Europe/London time based on the source file dated 12th December 2024 10:55 Europe/London time.