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

get_collection_log()

Description

Return the log for $collection

Parameters

ColumnTypeDefaultDescription
$collection integer
$fetchrows integer -1 How many rows to fetch

Return

array

Location

include/collections_functions.php lines 3626 to 3657

Definition

 
function get_collection_log($collection$fetchrows = -1)
    {
    
debug_function_call("get_collection_log"func_get_args());

    global 
$view_title_field;

    
$extra_fields hook("collection_log_extra_fields");
    if(!
$extra_fields)
        {
        
$extra_fields "";
        }

    
$log_query = new PreparedStatementQuery(
        
"SELECT c.ref,
                        c.date,
                        u.username,
                        u.fullname,
                        c.type,
                        r.field
{$view_title_field} AS title,
                        c.resource,
                        c.notes
                        
{$extra_fields}
                   FROM collection_log AS c
        LEFT OUTER JOIN user AS u ON u.ref = c.user
        LEFT OUTER JOIN resource AS r ON r.ref = c.resource
                  WHERE collection = ?
               ORDER BY c.ref DESC"
,
        array(
"i",$collection)
    );

    return 
sql_limit_with_total_count($log_query$fetchrows0falsenull);
    }

This article was last updated 4th December 2024 09:05 Europe/London time based on the source file dated 27th November 2024 15:30 Europe/London time.