{
global $prefs, $notification;
- $imp_folder = &IMP_Folder::singleton();
- $imp_message = &IMP_Message::singleton();
+ $imp_folder = IMP_Folder::singleton();
+ $imp_message = IMP_Message::singleton();
$mbox_list = Maintenance_Task_purge_sentmail::_getFolders();
/* Get the current UNIX timestamp minus the number of days specified
* in 'purge_sentmail_keep'. If a message has a timestamp prior to
* this value, it will be deleted. */
- $del_time = new DateTime(time() - ($prefs->getValue('purge_sentmail_keep') * 86400));
+ $del_time = new Horde_Date(time() - ($prefs->getValue('purge_sentmail_keep') * 86400));
$month = $del_time->format('n');
$day = $del_time->format('j');
$year = $del_time->format('Y');
*/
function _getFolders()
{
- include_once 'Horde/Identity.php';
- $identity = &Identity::singleton(array('imp', 'imp'));
- return $identity->getAllSentmailfolders();
+ require_once 'Horde/Identity.php';
+ return Identity::singleton(array('imp', 'imp'))->getAllSentmailfolders();
}
}
}
/* Make sure the Spam folder exists. */
- $imp_folder = &IMP_Folder::singleton();
+ $imp_folder = IMP_Folder::singleton();
if (!$imp_folder->exists($spam_folder)) {
return false;
}
/* Get the current UNIX timestamp minus the number of days
specified in 'purge_spam_keep'. If a message has a
timestamp prior to this value, it will be deleted. */
- $del_time = new DateTime(time() - ($prefs->getValue('purge_spam_keep') * 86400));
+ $del_time = new Horde_Date(time() - ($prefs->getValue('purge_spam_keep') * 86400));
$month = $del_time->format('n');
$day = $del_time->format('j');
$year = $del_time->format('Y');
}
/* Go through the message list and delete the messages. */
- $imp_message = &IMP_Message::singleton();
+ $imp_message = IMP_Message::singleton();
if ($imp_message->delete(array($spam_folder => $msg_ids), true)) {
$msgcount = count($msg_ids);
if ($msgcount == 1) {
}
/* Make sure the Trash folder exists. */
- $imp_folder = &IMP_Folder::singleton();
+ $imp_folder = IMP_Folder::singleton();
if (!$imp_folder->exists($trash_folder)) {
return false;
}
/* Get the current UNIX timestamp minus the number of days
specified in 'purge_trash_keep'. If a message has a
timestamp prior to this value, it will be deleted. */
- $del_time = new DateTime(time() - ($prefs->getValue('purge_trash_keep') * 86400));
+ $del_time = new Horde_Date(time() - ($prefs->getValue('purge_trash_keep') * 86400));
$month = $del_time->format('n');
$day = $del_time->format('j');
$year = $del_time->format('Y');
}
/* Go through the message list and delete the messages. */
- $imp_message = &IMP_Message::singleton();
+ $imp_message = IMP_Message::singleton();
if ($imp_message->delete(array($trash_folder => $msg_ids), true)) {
$msgcount = count($msg_ids);
if ($msgcount == 1) {