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

delete_slideshow()

Description

Delete slideshow record

Parameters

ColumnTypeDefaultDescription
$ref integer ID of the slideshow

Return

boolean

Location

include/slideshow_functions.php lines 73 to 92

Definition

 
function delete_slideshow($ref)
    {
    
$file_path get_slideshow_image_file_path($ref);
    if(
$file_path != '' && unlink($file_path) === false)
        {
        return 
false;
        }

    
$query "DELETE FROM slideshow WHERE ref = ?";
    
$query_params = ["i",$ref];
    
ps_query($query,$query_params);

    
log_activity("Deleted slideshow image"LOG_CODE_DELETEDnull'slideshow''ref'$ref);

    
// Clear cache
    
clear_query_cache("slideshow");


    return 
true;
    }

This article was last updated 17th November 2024 15:35 Europe/London time based on the source file dated 15th April 2024 14:55 Europe/London time.