Collections functions
General functions
Node functions
Render functions
Theme permission functions
User 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 5105 to 5125

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