Collections functions
Encryption functions
General functions
Theme permission functions
Resource functions

get_collection_resources()

Description

Returns all resources in collection

Parameters

ColumnTypeDefaultDescription
$collection int ID of collection being requested

Return

void

Location

include/collections_functions.php lines 184 to 207

Definition

 
function get_collection_resources($collection)
    {
    global 
$userref;

    
# For many cases (e.g. when displaying a collection for a user) a search is used instead so permissions etc. are honoured.
    
if((string)(int)$collection != (string)$collection)
        {
        return 
false;
        }

    
# Check if review collection if so delete any resources moved out of users archive status permissions by other users
    
if((string)$collection == "-".$userref)
        {
        
collection_cleanup_inaccessible_resources($collection);
        }
    
    
$plugin_collection_resources=hook('replace_get_collection_resources'"", array($collection));
    if(
is_array($plugin_collection_resources))
        {
        return 
$plugin_collection_resources;
        }    

    return 
sql_array("select resource value from collection_resource where collection='" escape_check($collection) . "' order by sortorder asc, date_added desc, resource desc"); 
    }

This article was last updated 10th July 2020 20:35 Europe/London time based on the source file dated 9th July 2020 17:22 Europe/London time.