Skip to content

Commit d4381ff

Browse files
author
Michele
committed
Setting ML prefix as the listname
1 parent 3178483 commit d4381ff

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

interface/web/mail/mail_mailinglist_edit.php

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,13 @@ function onBeforeInsert() {
194194
function onAfterInsert() {
195195
global $app, $conf;
196196

197+
$mlManager = $app->getconf->get_server_config($conf['server_id'], 'mail')['mailinglist_manager'];
198+
if($mlManager == 'mlmmj') {
199+
// The following update is usefull to set the prefix of the new mailinglist as the list name
200+
$sql = 'UPDATE mail_mailinglist SET subject_prefix = ? WHERE mailinglist_id = ?';
201+
$app->db->query($sql, '['.$this->dataRecord['listname'].']', $this->id);
202+
}
203+
197204
// make sure that the record belongs to the client group and not the admin group when a dmin inserts it
198205
// also make sure that the user can not delete domain created by a admin
199206
if($_SESSION["s"]["user"]["typ"] == 'admin' && isset($this->dataRecord["client_group_id"])) {

0 commit comments

Comments
 (0)