From: Pierre Habouzit (MadCoder Date: Mon, 23 May 2005 11:33:18 +0000 (+0000) Subject: backport X-Git-Tag: xorg/old~111 X-Git-Url: http://git.polytechnique.org/?a=commitdiff_plain;h=1f3131733ef090e043dcae40b515c700266f1cb8;p=platal.git backport Patches applied: * opensource@polytechnique.org--2005/platal--release--0.9.6--patch-16 fix x.net Mail lists git-archimport-id: opensource@polytechnique.org--2005/platal--mainline--0.9--patch-651 --- diff --git a/htdocs.net/groupe/listes-admin.php b/htdocs.net/groupe/listes-admin.php index bfd9196..c63934d 100644 --- a/htdocs.net/groupe/listes-admin.php +++ b/htdocs.net/groupe/listes-admin.php @@ -21,7 +21,8 @@ require_once 'xnet.inc.php'; if (!Env::has('liste')) header('Location: listes.php'); -$liste = strtolower(Env::get('liste')); +$liste = strtolower(Env::get('liste')); +$domain = $globals->asso('mail_domain'); new_group_page('listes/admin.tpl'); diff --git a/htdocs.net/groupe/listes-archives.php b/htdocs.net/groupe/listes-archives.php index 61597ed..2bc1a40 100644 --- a/htdocs.net/groupe/listes-archives.php +++ b/htdocs.net/groupe/listes-archives.php @@ -21,7 +21,8 @@ require_once 'xnet.inc.php'; if (!Env::has('liste')) header('Location: listes.php'); -$liste = strtolower(Env::get('liste')); +$liste = strtolower(Env::get('liste')); +$domain = $globals->asso('mail_domain'); new_group_page('listes/archives.tpl'); diff --git a/htdocs.net/groupe/listes-moderate.php b/htdocs.net/groupe/listes-moderate.php index 44a660e..286aca0 100644 --- a/htdocs.net/groupe/listes-moderate.php +++ b/htdocs.net/groupe/listes-moderate.php @@ -21,7 +21,8 @@ require_once 'xnet.inc.php'; if (!Env::has('liste')) header('Location: listes.php'); -$liste = strtolower(Env::get('liste')); +$liste = strtolower(Env::get('liste')); +$domain = $globals->asso('mail_domain'); if (preg_match("!(?:[a-z0-9]+\\.)?{".$globals->asso('mail_domain')."}_(.*)!", $liste, $matches)) { header("Location: {$_SERVER['PHP_SELF']}?liste={$matches[1]}"); diff --git a/htdocs/listes/admin.php b/htdocs/listes/admin.php index 59d7814..514bbc5 100644 --- a/htdocs/listes/admin.php +++ b/htdocs/listes/admin.php @@ -22,7 +22,8 @@ if (!$page) { require_once("xorg.inc.php"); if (!Env::has('liste')) header('Location: index.php'); - $liste = strtolower(Env::get('liste')); + $liste = strtolower(Env::get('liste')); + $domain = $globals->mail->domain; new_skinned_page('listes/admin.tpl', AUTH_MDP); require_once('lists.inc.php'); @@ -45,7 +46,7 @@ if (Env::has('add_member')) { } if (Env::has('del_member')) { - $client->mass_unsubscribe($liste, Array(Env::get('del_member').'@'.$globals->mail->domain)); + $client->mass_unsubscribe($liste, Array(Env::get('del_member').'@'.$domain)); header("Location: {$_SERVER['PHP_SELF']}?liste=$liste"); } @@ -61,7 +62,7 @@ if (Env::has('add_owner')) { } if (Env::has('del_owner')) { - $client->del_owner($liste, Env::get('del_owner').'@'.$globals->mail->domain); + $client->del_owner($liste, Env::get('del_owner').'@'.$domain); header("Location: {$_SERVER['PHP_SELF']}?liste=$liste"); } diff --git a/htdocs/listes/archives.php b/htdocs/listes/archives.php index f163945..68169ed 100644 --- a/htdocs/listes/archives.php +++ b/htdocs/listes/archives.php @@ -23,6 +23,7 @@ if (!$page) { require_once("xorg.inc.php"); if (!Env::has('liste')) header('Location: index.php'); $liste = strtolower(Env::get('liste')); + $domain = $globals->mail->domain; new_skinned_page('listes/archives.tpl', AUTH_COOKIE); require_once('lists.inc.php'); @@ -40,11 +41,11 @@ if (list($det) = $client->get_members($liste)) { if(strstr('/', $file)!==false || !preg_match(',^\d+/\d+$,', $rep)) { $page->kill("La liste n'existe pas ou tu n'as pas le droit de la consulter"); } else { - $page->assign('archives', $globals->lists->spool."/{$globals->mail->domain}{$globals->lists->vhost_sep}$liste/$rep/$file"); + $page->assign('archives', $globals->lists->spool."/{$domain}{$globals->lists->vhost_sep}$liste/$rep/$file"); } } else { $archs = Array(); - foreach (glob($globals->lists->spool."/{$globals->mail->domain}{$globals->lists->vhost_sep}$liste/*/*") as $rep) { + foreach (glob($globals->lists->spool."/{$domain}{$globals->lists->vhost_sep}$liste/*/*") as $rep) { if (preg_match(",/(\d*)/(\d*)$,", $rep, $matches)) { $archs[intval($matches[1])][intval($matches[2])] = true; } diff --git a/htdocs/listes/moderate.php b/htdocs/listes/moderate.php index a2609b9..cda7d4f 100644 --- a/htdocs/listes/moderate.php +++ b/htdocs/listes/moderate.php @@ -23,8 +23,9 @@ if (!$page) { require_once("xorg.inc.php"); if (!Env::has('liste')) header('Location: index.php'); $liste = strtolower(Env::get('liste')); + $domain = $globals->mail->domain; - if (preg_match("!(?:[a-z0-9]+\\.)?{$globals->mail->domain}_(.*)!", $liste, $matches)) { + if (preg_match("!(?:[a-z0-9]+\\.)?{$domain}_(.*)!", $liste, $matches)) { header("Location: {$_SERVER['PHP_SELF']}?liste={$matches[1]}"); } @@ -79,9 +80,9 @@ if(Env::has('mid')) { .$append; require_once('diogenes/diogenes.hermes.inc.php'); $mailer = new HermesMailer(); - $mailer->addTo("$liste-owner@{$globals->mail->domain}"); - $mailer->setFrom("$liste-bounces@{$globals->mail->domain}"); - $mailer->addHeader('Reply-To', "$liste-owner@{$globals->mail->domain}"); + $mailer->addTo("$liste-owner@{$domain}"); + $mailer->setFrom("$liste-bounces@{$domain}"); + $mailer->addHeader('Reply-To', "$liste-owner@{$domain}"); $mailer->setSubject($subject); $mailer->setTxtBody(wordwrap($texte,72)); $mailer->send(); @@ -90,7 +91,7 @@ if(Env::has('mid')) { if(Get::has('mid') && is_array($mail)) { $msg = file_get_contents('/etc/mailman/fr/refuse.txt'); - $msg = str_replace("%(adminaddr)s","$liste-owner@{$globals->mail->domain}", $msg); + $msg = str_replace("%(adminaddr)s","$liste-owner@{$domain}", $msg); $msg = str_replace("%(request)s","<< SUJET DU MAIL >>", $msg); $msg = str_replace("%(reason)s","<< TON EXPLICATION >>", $msg); $msg = str_replace("%(listname)s","$liste", $msg);