ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
ilMailCronOrphanedMailsDeletionProcessor Class Reference

ilMailCronOrphanedMailsDeletionProcessor More...

+ Collaboration diagram for ilMailCronOrphanedMailsDeletionProcessor:

Public Member Functions

 __construct (ilMailCronOrphanedMailsDeletionCollector $collector)
 
 processDeletion ()
 

Protected Attributes

 $collector
 

Private Member Functions

 deleteMails ()
 
 deleteMarkedAsNotified ()
 Delete entries about notification. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilMailCronOrphanedMailsDeletionProcessor::__construct ( ilMailCronOrphanedMailsDeletionCollector  $collector)
Parameters
ilMailCronOrphanedMailsDeletionCollector$collector

Definition at line 20 of file class.ilMailCronOrphanedMailsDeletionProcessor.php.

References $collector, $file, $ilDB, $path, $res, $row, array, and ilLoggerFactory\getLogger().

+ Here is the call graph for this function:

Member Function Documentation

◆ deleteMails()

ilMailCronOrphanedMailsDeletionProcessor::deleteMails ( )
private

Definition at line 98 of file class.ilMailCronOrphanedMailsDeletionProcessor.php.

References $ilDB.

Referenced by processDeletion().

99  {
100  global $ilDB;
101 
102  $ilDB->manipulate('DELETE FROM mail WHERE ' . $ilDB->in('mail_id', $this->collector->getMailIdsToDelete(), false, 'integer'));
103  }
global $ilDB
+ Here is the caller graph for this function:

◆ deleteMarkedAsNotified()

ilMailCronOrphanedMailsDeletionProcessor::deleteMarkedAsNotified ( )
private

Delete entries about notification.

Definition at line 108 of file class.ilMailCronOrphanedMailsDeletionProcessor.php.

References $ilDB, and $ilSetting.

Referenced by processDeletion().

109  {
110  global $ilDB, $ilSetting;
111 
112  if((int)$ilSetting->get('mail_notify_orphaned') >= 1)
113  {
114  $ilDB->manipulate('DELETE FROM mail_cron_orphaned WHERE ' . $ilDB->in('mail_id', $this->collector->getMailIdsToDelete(), false, 'integer'));
115  }
116  else
117  {
118  $ilDB->manipulate('DELETE FROM mail_cron_orphaned');
119  }
120  }
global $ilSetting
Definition: privfeed.php:17
global $ilDB
+ Here is the caller graph for this function:

◆ processDeletion()

ilMailCronOrphanedMailsDeletionProcessor::processDeletion ( )

Definition at line 125 of file class.ilMailCronOrphanedMailsDeletionProcessor.php.

References deleteMails(), deleteMarkedAsNotified(), and ilLoggerFactory\getLogger().

126  {
127  if(count($this->collector->getMailIdsToDelete()) > 0)
128  {
129  // delete possible attachments ...
130  $this->deleteAttachments();
131 
132  $this->deleteMails();
133  require_once './Services/Logging/classes/public/class.ilLoggerFactory.php';
134  ilLoggerFactory::getLogger('mail')->info(sprintf(
135  'Deleted mail_ids: %s', implode(', ', $this->collector->getMailIdsToDelete())
136  ));
137 
138  $this->deleteMarkedAsNotified();
139  ilLoggerFactory::getLogger('mail')->info(sprintf(
140  'Deleted mail_cron_orphaned mail_ids: %s', implode(', ', $this->collector->getMailIdsToDelete())
141  ));
142  }
143  }
static getLogger($a_component_id)
Get component logger.
+ Here is the call graph for this function:

Field Documentation

◆ $collector

ilMailCronOrphanedMailsDeletionProcessor::$collector
protected

Definition at line 15 of file class.ilMailCronOrphanedMailsDeletionProcessor.php.

Referenced by __construct().


The documentation for this class was generated from the following file: