Collections functions
General functions
Render functions
Theme permission functions
Resource functions

cleanup_dash_tiles()

Parameters

This function accepts no parameters.

Location

include/dash_functions.php lines 303 to 326

Definition

 
function cleanup_dash_tiles()
    {
    global 
$lang;
    
$tiles ps_query(
        
"SELECT * FROM dash_tile 
            WHERE allow_delete = 1
                AND all_users = 0
                AND ref NOT IN (SELECT DISTINCT dash_tile FROM user_dash_tile)
                AND ref NOT IN (SELECT DISTINCT dash_tile FROM usergroup_dash_tile)"
    
);

    
ps_query(
        
"DELETE FROM dash_tile 
            WHERE allow_delete = 1
                AND all_users = 0
                AND ref NOT IN (SELECT DISTINCT dash_tile FROM user_dash_tile)
                AND ref NOT IN (SELECT DISTINCT dash_tile FROM usergroup_dash_tile)"
    
);

    foreach (
$tiles as $tile)
        {
        
log_activity($lang['manage_all_dash'],LOG_CODE_DELETED,$tile["title"],'dash_tile',NULL,$tile["ref"]);
        }
    }

This article was last updated 26th June 2022 02:35 Europe/London time based on the source file dated 1st June 2022 17:00 Europe/London time.