Collections functions
Encryption functions
General functions
Render functions
Theme permission functions
Video functions
Resource functions

import_resource()

Parameters

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

Location

include/resource_functions.php lines 4258 to 4269

Definition

 
function import_resource($path,$type,$title,$ingest=false,$createPreviews=true$extension='')
    {
    global 
$syncdir;
    
// 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,'','',''$syncdir DIRECTORY_SEPARATOR $path);
    return 
update_resource($r$path$type$title$ingest$createPreviews$extension);
    }

This article was last updated 30th November 2020 17:35 Europe/London time based on the source file dated 30th November 2020 11:55 Europe/London time.