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_user_dash_tile()

Parameters

ColumnTypeDefaultDescription
$usertile
$user

Location

include/dash_functions.php lines 1031 to 1049

Definition

 
function delete_user_dash_tile($usertile,$user)
    {
    global 
$lang;
    if(!
is_numeric($usertile) || !is_numeric($user)){return false;}
    
    
$row get_user_tile($usertile,$user);
    
ps_query("DELETE FROM user_dash_tile WHERE ref= ? and user= ?", ['i'$usertile'i'$user]);

    if (!isset(
$row["dash_tile"]) || !is_numeric($row["dash_tile"])) {return false;}
    
    
$existing ps_query("SELECT count(*) as 'count' FROM user_dash_tile WHERE dash_tile= ?", ['i'$row['dash_tile']]);
    
    if(
$existing[0]["count"]<1)
        {
        
$tile get_tile($row["dash_tile"]);
        
delete_dash_tile($row["dash_tile"]);
        
log_activity($lang['manage_all_dash'],LOG_CODE_DELETED,($tile["title"]??""),'dash_tile',null,$row["dash_tile"]);
        }
    }

This article was last updated 12th December 2024 20:35 Europe/London time based on the source file dated 12th December 2024 19:40 Europe/London time.