30 $mail_only_inbox_trash = (int)$ilSetting->get(
'mail_only_inbox_trash');
31 $last_cron_start_ts = (int)$ilSetting->get(
'last_cronjob_start_ts');
33 $mail_notify_orphaned = (int)$ilSetting->get(
'mail_notify_orphaned');
37 if($mail_notify_orphaned > 0)
39 if($last_cron_start_ts != NULL)
41 if($mail_only_inbox_trash)
45 $res = $ilDB->queryF(
" 46 SELECT * FROM mail_cron_orphaned 47 INNER JOIN mail_obj_data mdata ON obj_id = folder_id 48 WHERE ts_do_delete <= %s 49 AND (mdata.m_type = %s OR mdata.m_type = %s)",
50 array(
'integer',
'text',
'text'),
51 array($now,
'inbox',
'trash'));
56 $res = $ilDB->queryF(
" 57 SELECT * FROM mail_cron_orphaned 58 WHERE ts_do_delete <= %s",
63 while(
$row = $ilDB->fetchAssoc(
$res))
72 $mail_threshold = (int)$ilSetting->get(
'mail_threshold');
74 $ts_notify = strtotime(
"- ".$mail_threshold.
" days");
75 $ts_for_deletion =
date(
'Y-m-d', $ts_notify).
' 23:59:59';
77 $types =
array(
'timestamp');
81 SELECT mail_id, m.user_id, folder_id, send_time, m_subject, mdata.title 83 INNER JOIN mail_obj_data mdata ON obj_id = folder_id 84 WHERE send_time <= %s";
86 if((
int)$ilSetting->get(
'mail_only_inbox_trash') > 0)
88 $mails_query .=
" AND (mdata.m_type = %s OR mdata.m_type = %s)";
89 $types =
array(
'timestamp',
'text',
'text');
90 $data =
array($ts_for_deletion,
'inbox',
'trash');
93 $res = $ilDB->queryF($mails_query, $types,
$data);
95 while(
$row = $ilDB->fetchAssoc(
$res))
107 $this->mail_ids[] = (int)$mail_id;
addMailIdToDelete($mail_id)
date( 'd-M-Y', $objPHPExcel->getProperties() ->getCreated())
ilMailCronOrphanedMailsDeletionCollector
Create styles array
The data for the language used.
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.