24 define(
"IL_MAIL_LOCAL", 0);
25 define(
"IL_MAIL_EMAIL", 1);
26 define(
"IL_MAIL_BOTH", 2);
72 define(
"DEFAULT_LINEBREAK",60);
75 $this->table_mail_options =
'mail_options';
77 $this->user_id = $a_user_id;
92 if (!($incomingMail = $this->ilias->getSetting(
"mail_incoming_mail")))
98 $query =
"INSERT INTO $this->table_mail_options " .
99 "VALUES(" . $ilDB->quote($this->user_id) .
", " .
100 $ilDB->quote(DEFAULT_LINEBREAK) .
", '', " .
101 $ilDB->quote($incomingMail) .
", '0')";
103 $res = $this->ilias->db->query($query);
118 $query =
"SELECT * FROM $this->table_mail_options ".
119 "WHERE user_id = ".$ilDB->quote($this->user_id).
" ";
123 $this->cronjob_notification = stripslashes($row->cronjob_notification);
124 $this->signature = stripslashes($row->signature);
125 $this->linebreak = stripslashes($row->linebreak);
126 $this->incoming_type = $row->incoming_type;
144 function updateOptions($a_signature, $a_linebreak, $a_incoming_type, $a_cronjob_notification)
148 $query =
'UPDATE '.$this->table_mail_options.
'
150 signature = '.$ilDB->quote($a_signature).
',
151 linebreak = '.$ilDB->quote($a_linebreak).
', ';
152 if ($ilias->getSetting(
'mail_notification'))
154 $query .=
'cronjob_notification = '.$ilDB->quote($a_cronjob_notification).
', ';
157 $query .=
'incoming_type = '.$ilDB->quote($a_incoming_type).
'
159 AND user_id = '.$ilDB->quote($this->user_id).
' ';
161 $res = $this->ilias->db->query($query);
163 $this->cronjob_notification = $a_cronjob_notification;
164 $this->signature = $a_signature;
165 $this->linebreak = $a_linebreak;
166 $this->incoming_type = $a_incoming_type;