Collections functions
General functions
Node functions
Render functions
Theme permission functions
User functions
Resource functions

import_resource()

Parameters

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

Location

include/resource_functions.php lines 4967 to 4990

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);
    if(
$r === false)
        {
        return 
false;
        }

    
// 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 24th May 2024 12:05 Europe/London time based on the source file dated 24th May 2024 10:10 Europe/London time.