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 4911 to 4934

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 19th March 2024 03:35 Europe/London time based on the source file dated 11th March 2024 14:25 Europe/London time.