Coding standards
Security in ResourceSpace
Developer reference
Database
Action functions
Admin functions
Ajax functions
Annotation functions
API functions
Collections functions
Comment functions
Config functions
CSV export functions
Dash functions
Debug functions
Encryption functions
Facial recognition functions
File functions
General functions
Language functions
Log functions
Login functions
Message functions
Migration functions
Node functions
PDF functions
Plugin functions
Render functions
Reporting functions
Request functions
Research functions
Slideshow functions
Theme permission functions
User functions
Video functions
Database functions
Metadata functions
Resource functions
Search functions
Map functions
Job functions
Tab functions
Test functions

is_collection_approved()

Description

Return an array of distinct archive/workflow states for resources in $collection

Parameters

ColumnTypeDefaultDescription
$collection integer

Return

array

Location

include/collections_functions.php lines 3823 to 3841

Definition

 
function is_collection_approved($collection)
        {
        if (
is_array($collection)){$result=$collection;}
        else
            {
            
$result=do_search("!collection" $collection,"","relevance",0,-1,"desc",false,"",false,"");
            }   
        if (!
is_array($result) || count($result)==0){return true;}
        
        
$collectionstates=array();
        global 
$collection_allow_not_approved_share;
        for (
$n=0;$n<count($result);$n++)
            {
            
$archivestatus=$result[$n]["archive"];
            if (
$archivestatus<&& !$collection_allow_not_approved_share) {return false;}
            
$collectionstates[]=$archivestatus;
            }
        return 
array_unique($collectionstates);
        }

This article was last updated 17th November 2024 15:05 Europe/London time based on the source file dated 13th November 2024 15:50 Europe/London time.