Skip to content

Commit e3c0e9c

Browse files
author
Michele
committed
Managed prefix and footer fields
1 parent f2b16c8 commit e3c0e9c

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

install/lib/installer_base.lib.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -891,7 +891,7 @@ public function configure_mlmmj() {
891891
exec("nohup /usr/sbin/postmap $configDir/transport >/dev/null 2>&1");
892892

893893
//* Create/update cron entry
894-
$cronEntry = 'find /var/'.$mlConfig['spool_dir'].'/ -mindepth 1 -maxdepth 1 -type d -exec /usr/bin/mlmmj-maintd -F -d {} \;';
894+
$cronEntry = '0 */2 * * * find /var'.$mlConfig['spool_dir'].'/ -mindepth 1 -maxdepth 1 -type d -exec /usr/bin/mlmmj-maintd -F -d {} \;';
895895
file_put_contents('/etc/cron.d/mlmmj', $cronEntry);
896896
}
897897

server/plugins-available/mlmmj_plugin.inc.php

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -111,7 +111,7 @@ function insert($event_name, $data) {
111111
touch("$listDir/control/noarchive");
112112
file_put_contents("$listDir/control/owner", $owner);
113113
file_put_contents("$listDir/control/listaddress", "$listName@$listDomain");
114-
file_put_contents("$listDir/control/prefix", $listName);
114+
file_put_contents("$listDir/control/prefix", "[$listName]");
115115

116116
// Copying language translations
117117
if(!is_dir("/usr/share/mlmmj/text.skel/$lang")) $lang = 'en';
@@ -204,6 +204,16 @@ function update($event_name, $data) {
204204

205205
if($rec['subject_prefix'])
206206
file_put_contents("$controlDir/prefix", $rec['subject_prefix']);
207+
else @unlink("$controlDir/prefix");
208+
209+
if($rec['mail_footer'])
210+
file_put_contents("$controlDir/footer", $rec['mail_footer']);
211+
else @unlink("$controlDir/footer");
212+
213+
if($rec['archive'] == 'y')
214+
@unlink("$controlDir/noarchive");
215+
else
216+
touch("$controlDir/noarchive");
207217

208218
$this->changeOwnership("$controlDir/*");
209219
}

0 commit comments

Comments
 (0)