Improve share features: default modal to 1, cleanup expired/used links

This commit is contained in:
Marcus Hill
2022-04-02 15:37:17 +01:00
parent cf739accc9
commit cab2cc923a
4 changed files with 58 additions and 48 deletions

View File

@@ -48,7 +48,7 @@ while($row = mysqli_fetch_array($sql_companies)){
if($config_backup_enable == 1){
// DATABASE BACKUP
// This needs to be set to the full file sytem path or else when cron runs php it will break cron.php and cron will not run properly
// This needs to be set to the full file system path or else when cron runs php it will break cron.php and cron will not run properly
//$backup_dir = "backups/";
$backup_dir = "$config_backup_path/";
@@ -265,6 +265,12 @@ while($row = mysqli_fetch_array($sql_companies)){
// Clean-up ticket views table used for collision detection
mysqli_query($mysqli, "TRUNCATE TABLE ticket_views");
// Clean-up shared items that have been used
mysqli_query($mysqli, "DELETE FROM shared_items WHERE item_views = item_view_limit");
// Clean-up shared items that have expired
mysqli_query($mysqli, "DELETE FROM shared_items WHERE item_expire_at < NOW()");
// PAST DUE INVOICE Notifications
//$invoiceAlertArray = [$config_invoice_overdue_reminders];
$invoiceAlertArray = [30,60,90,120,150,180,210,240,270,300,330,360,390,420,450,480,510,540,570,590,620];