Collections functions
General functions
Render functions
Theme permission functions
Resource functions

import_resource()

Parameters

ColumnTypeDefaultDescription
$path
$type
$title
$ingest false
$createPreviews true
$extension ''

Location

include/resource_functions.php lines 4812 to 4830

Definition

 
function import_resource($path,$type,$title,$ingest=false,$createPreviews=true$extension='')
    {
    global 
$syncdir,$lang;
    
// Import the resource at the given path
    // This is used by staticsync.php and Camillo's SOAP API
    // Note that the file will be used at it's present location and will not be copied.

    
$r=create_resource($type);
    
// Log this in case the original location is not stored anywhere else
    
resource_log(
        
RESOURCE_LOG_APPEND_PREVIOUS,
        
LOG_CODE_CREATED,
        
'',
        
$lang["createdfromstaticsync"],
        
'',
        
$syncdir DIRECTORY_SEPARATOR $path
    
);
    return 
update_resource($r$path$type$title$ingest$createPreviews$extension);
    }

This article was last updated 31st January 2023 11:05 Europe/London time based on the source file dated 26th January 2023 19:05 Europe/London time.