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_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 5155 to 5175

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