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

collection_log()

Description

Add a new row to the collection log (e.g. after an action on that collection)

Parameters

ColumnTypeDefaultDescription
$collection integer
$type string Action type
$resource integer
$notes string ""

Return

void

Location

include/collections_functions.php lines 3343 to 3356

Definition

 
function collection_log($collection$type$resource$notes "")
{
    global 
$userref;

    if (!
is_numeric($collection)) {
        return 
false;
    }

    
$user = ($userref ?: null);
    
$resource = ($resource ?: null);
    
$notes mb_strcut($notes0255);

    
ps_query("INSERT INTO collection_log (date, user, collection, type, resource, notes) VALUES (now(), ?, ?, ?, ?, ?)", array("i",$user,"i",$collection,"s",$type,"i",$resource,"s",$notes));
}

This article was last updated 12th February 2025 06:05 Europe/London time based on the source file dated 11th February 2025 11:40 Europe/London time.