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

resource_type_config_override()

Parameters

ColumnTypeDefaultDescription
$resource_type

Location

include/resource_functions.php lines 5932 to 5951

Definition

 
function resource_type_config_override($resource_type)
    {
    
# Pull in the necessary config for a given resource type
    # As this could be called many times, e.g. during search result display, only execute if the passed resourcetype is different from the previous.
    
global $resource_type_config_override_last,$resource_type_config_override_snapshot$ffmpeg_alternatives;

    
# If the resource type has changed or if this is the first resource....
    
if (!isset($resource_type_config_override_last) || $resource_type_config_override_last!=$resource_type)
        {
        
# Look for config and execute.
        
$config_options=sql_value("select config_options value from resource_type where ref='" escape_check($resource_type) . "'","","schema");
        if (
$config_options!="")
            {
            
# Switch to global context and execute.
            
extract($GLOBALSEXTR_REFS EXTR_SKIP);
            eval(
$config_options);
            }
        
$resource_type_config_override_last=$resource_type;
        }
    }

This article was last updated 24th November 2020 20:05 Europe/London time based on the source file dated 13th November 2020 16:50 Europe/London time.