Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mailing lists check functionnality #30

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions bin/lists.rpc.py
Original file line number Diff line number Diff line change
Expand Up @@ -852,8 +852,8 @@ def set_admin_options(userdesc, perms, mlist, values):
'forward_auto_discards' : True,
'hold_these_nonmembers' : [],
'host_name' : 'listes.polytechnique.org',
'include_list_post_header' : False,
'include_rfc2369_headers' : False,
'include_list_post_header' : True,
'include_rfc2369_headers' : True,
'max_num_recipients' : 0,
'new_member_options' : 256,
'nondigestable' : True,
Expand All @@ -879,7 +879,7 @@ def check_options_runner(userdesc, perms, mlist, listname, correct):
if mlist.real_name.lower() != listname:
options['real_name'] = listname, mlist.real_name
if correct: mlist.real_name = listname
return 1
return options


def check_options(userdesc, perms, vhost, listname, correct=False):
Expand Down
14 changes: 12 additions & 2 deletions modules/lists.php
Original file line number Diff line number Diff line change
Expand Up @@ -985,8 +985,18 @@ function handler_check($page, $liste = null)
S::assert_xsrf_token();
$mlist->checkOptions(true);
}

if (list($details, $options) = $mlist->checkOptions()) {
$diff = $mlist->checkOptions();
if (isset($diff)) {
$options = $diff;
#We will now expand internal arrays
foreach ($options as $key => $diff) {
if( is_array($diff) ) { #This should always be true
$diff[0] = var_export($diff[0], true);
$diff[1] = var_export($diff[1], true);
}
$options[$key] = $diff; #Overwrites original array
}
$details = $mlist->address;
$page->assign_by_ref('details', $details);
$page->assign_by_ref('options', $options);
} else {
Expand Down
2 changes: 1 addition & 1 deletion templates/lists/check.tpl
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

{if $options|@count}
<table class='bicol' cellpadding='2' cellspacing='0'>
<tr><th colspan='3'>Options incorrectes pour {$details.addr}</th></tr>
<tr><th colspan='3'>Options incorrectes pour {$details}</th></tr>
<tr><th>champs</th><th>devrait être&nbsp;:</th><th>est&hellip;</th></tr>
{foreach from=$options key=k item=o}
<tr>
Expand Down