Commit 31dfdf6c authored by Leif Andersson's avatar Leif Andersson
Browse files

Ändrade plats för listorna xxx.dis

parent d1d5e3de
......@@ -175,9 +175,11 @@ EOS;
public static function setMailLists() {
global $gCms; if (!isset($gCms)) exit;
$config =& $gCms->GetConfig();
$maildir = $config['root_path'] . '/uploads/mailinglists';
$db = AddressDB::getDB();
$groups = self::getGroupList();
if(!is_dir(self::$maildir)) mkdir(self::$maildir,'0755',true);
//if(!is_dir(self::$maildir)) mkdir(self::$maildir,'0755',true);
foreach ($groups as $group) {
$pos = strrpos($group->Gruppnamn, '.dis');
if ($pos === false) continue;
......@@ -191,7 +193,7 @@ EOS;
}
if (count($epost) > 0) {
// echo '<pre>'; print_r($epost); echo '</pre>';
$filename = self::$maildir . '/' . $group->Gruppnamn;
$filename = $maildir . '/' . $group->Gruppnamn;
$file = fopen($filename,'w');
if ($file === false) die('Cannot write '.$filename);
foreach ($epost as $line) fwrite($file,$line.PHP_EOL);
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment