Collections functions
Encryption functions
General functions
Theme permission functions
Resource functions

collection_download_process_collection_download_name()

Description

Modifies the filename for downloading as part of the specified collection

Parameters

ColumnTypeDefaultDescription
&$filename string Filename (passed by reference)
$collection integer Collection ID
$size string Size code e.g scr,pre
$suffix string String suffix to add (before file extension)
$collectiondata array Collection data obtained by get_collection()

Return

void

Location

include/collections_functions.php lines 3863 to 3883

Definition

 
function collection_download_process_collection_download_name(&$filename$collection$size$suffix, array $collectiondata)
    {
    global 
$lang$use_collection_name_in_zip_name;

    
$filename hook('changecollectiondownloadname'null, array($collection$size$suffix));
    if (empty(
$filename))
        {
        if (
$use_collection_name_in_zip_name)
            {
            
# Use collection name (if configured)
            
$filename $lang["collectionidprefix"] . $collection "-"
                    
safe_file_name(i18n_get_collection_name($collectiondata)) . "-" $size
                    
$suffix;
            }
        else
            {
            
# Do not include the collection name in the filename (default)
            
$filename $lang["collectionidprefix"] . $collection "-" $size $suffix;
            }
        }
    }

This article was last updated 13th July 2020 14:05 Europe/London time based on the source file dated 9th July 2020 17:22 Europe/London time.