Commit 683e7d1b authored by david.verdin's avatar david.verdin
Browse files

[svn]Retrieiving latest modifications from 6.1 branch.

git-svn-id: https://subversion.renater.fr/sympa/branches/sympa-6.2-branch@7513 05aa8bb8-cd2b-0410-b1d7-8918dfa770ce
parent ab1d0591
......@@ -50,14 +50,21 @@ installconfig: installdir
if [ ! -d $(DESTDIR)$(confdir) ]; then \
$(INSTALL) -d -m 755 $(DESTDIR)$(confdir); \
fi; \
$(DESTDIR)$(sbindir)/sympa_wizard.pl \
$(AM_V_GEN)$(SED) \
-e 's|--PERL--|$(PERL)|' \
-e 's|--modulesdir--|$(top_srcdir)/src/lib|' \
< $(top_srcdir)/src/sympa_wizard.pl.in > \
$(top_srcdir)/src/sympa_wizard.pl.install; \
chmod +x $(top_srcdir)/src/sympa_wizard.pl.install; \
$(top_srcdir)/src/sympa_wizard.pl.install \
--create sympa.conf \
--target $(DESTDIR)$(confdir)/sympa.conf \
|| /bin/true; \
$(DESTDIR)$(sbindir)/sympa_wizard.pl \
$(top_srcdir)/src/sympa_wizard.pl.install \
--create wwsympa.conf \
--target $(DESTDIR)$(confdir)/wwsympa.conf \
|| /bin/true; \
rm -f $(top_srcdir)/src/sympa_wizard.pl.install; \
fi; \
if [ ! -f $(DESTDIR)$(sysconfdir)/data_structure.version ]; then \
cd $(DESTDIR)$(sysconfdir); \
......
......@@ -24,7 +24,7 @@ package SOAP::XMLSchema1999::Serializer;
package sympasoap;
use strict vars;
use strict "vars";
use Exporter;
use HTTP::Cookies;
......@@ -748,10 +748,13 @@ sub add {
}else {
my $u;
my $defaults = $list->get_default_user_options();
my $u2 = &List::get_user_db($email);
%{$u} = %{$defaults};
$u->{'email'} = $email;
$u->{'gecos'} = $gecos;
$u->{'gecos'} = $gecos || $u2->{'gecos'};
$u->{'date'} = $u->{'update_date'} = time;
$u->{'password'} = $u2->{'password'} || &tools::tmp_passwd($email) ;
$u->{'lang'} = $u2->{'lang'} || $list->{'admin'}{'lang'};
$list->add_list_member($u);
if (defined $list->{'add_outcome'}{'errors'}) {
......@@ -764,13 +767,6 @@ sub add {
$list->delete_subscription_request($email);
}
if ($List::use_db) {
my $u = &List::get_global_user($email);
&List::update_global_user($email, {'lang' => $u->{'lang'} || $list->{'admin'}{'lang'},
'password' => $u->{'password'} || &tools::tmp_passwd($email)
});
}
## Now send the welcome file to the user if it exists and notification is supposed to be sent.
unless ($quiet || $action =~ /quiet/i) {
unless ($list->send_file('welcome', $email, $robot,{'auto_submitted' => 'auto-generated'})) {
......
......@@ -199,28 +199,39 @@ function checkbox_check_topic(form,warningId) {
}
}
function set_select_value(s, v) {
for(var i=0; i<s.options.length; i++) s.options[i].selected = false;
for(var i=0; i<s.options.length; i++) if(s.options[i].value == v) {
s.options[i].selected = true;
return;
}
}
//launch a search by message Id
function searched_by_msgId(id) {
var lgt_type_searched = document.log_form.type_searched.options.length;
var length = document.log_form.target_type.options.length;
document.log_form.target_type.options[length-2].selected = true;
document.log_form.elements["target_searched"].value=id;
document.log_form.type_searched.options[lgt_type_searched-1].selected = true;
document.log_form.submit();
var f = document.forms["log_form"];
set_select_value(f.elements["type"], 'all_actions');
set_select_value(f.elements["target_type"], 'msg_id');
f.elements["target"].value = id;
f.submit();
}
//reset all field in log form.
function clear_log_form() {
var lgt_target_type = document.log_form.target_type.options.length;
var lgt_type_searched = document.log_form.type_searched.options.length;
document.log_form.target_type.options[lgt_target_type-3].selected = true;
document.log_form.elements["target_searched"].value='';
document.log_form.elements["date_from"].value='';
document.log_form.elements["date_to"].value='';
document.log_form.type_searched.options[lgt_type_searched-10].selected = true;
var lgt_list_searched = document.log_form.list_searched.options.length;
document.log_form.list_searched.options[lgt_list_searched-11].selected = true;
document.log_form.elements["ip_searched"].value='';
var f = document.forms["log_form"];
set_select_value(f.elements["type"], 'all_actions');
set_select_value(f.elements["target_type"], 'msg_id');
f.elements["target"].value = '';
f.elements["date_from"].value = '';
f.elements["date_to"].value = '';
f.elements["ip"].value = '';
}
//set a form field value to empty string. It uses the value of the field whose id is given
......
......@@ -2340,7 +2340,8 @@ sub new {
}
my $status ;
if ($list_of_lists{$robot}{$name}){
## If list already in memory and not previously purged by another process
if ($list_of_lists{$robot}{$name} and -d $list_of_lists{$robot}{$name}{'dir'}){
# use the current list in memory and update it
$list=$list_of_lists{$robot}{$name};
......@@ -3349,16 +3350,22 @@ sub distribute_msg {
## If subject is tagged, replace it with new tag
## Splitting the subject in two parts :
## - what is before the custom subject (probably some "Re:")
## - what is after it : the orginal subject sent to the list.
## - what will be before the custom subject (probably some "Re:")
## - what will be after it : the orginal subject sent to the list.
## The custom subject is not kept.
my $before_tag = '';
my $after_tag = $subject_field;
$after_tag =~ s/.*\[$tag_regexp\]\s*//;
$after_tag =~ s/\s*$//;
my $before_tag;
my $after_tag;
if ($custom_subject =~ /\S/) {
$subject_field =~ s/\s*\[$tag_regexp\]\s*/ /;
}
$subject_field =~ s/\s+$//;
if($subject_field =~ /(.*)\s*\[$tag_regexp\].*/) {
$before_tag = $1;
# truncate multiple "Re:" and equivalents.
my $re_regexp = tools::get_regexp('re');
if ($subject_field =~ /^\s*($re_regexp\s*)($re_regexp\s*)*/) {
($before_tag, $after_tag) = ($1, $'); #'
} else {
($before_tag, $after_tag) = ('', $subject_field);
}
## Encode subject using initial charset
......@@ -12535,6 +12542,17 @@ sub purge {
&tools::remove_dir($arc_dir.'/'.$self->get_list_id());
&tools::remove_dir($self->get_bounce_dir());
}
## Clean list table if needed
if ($Conf::Conf{'db_list_cache'} eq 'on') {
my $statement = sprintf 'DELETE FROM list_table WHERE name_list = %s AND robot_list = %s', $dbh->quote($self->{'name'}), $dbh->quote($self->{'domain'});
unless ($dbh->do($statement)) {
&do_log('err', 'Cannot remove list %s (robot %s) from table', $self->{'name'}, $self->{'domain'});
}
}
## Clean memory cache
delete $list_of_lists{$self->{'domain'}}{$self->{'name'}};
&tools::remove_dir($self->{'dir'});
......
......@@ -337,12 +337,11 @@ sub create_list_old{
my $return = {};
$return->{'list'} = $list;
if ($param->{'status'} eq 'open') {
if ($list->{'admin'}{'status'} eq 'open') {
$return->{'aliases'} = &install_aliases($list,$robot);
return $return;
}
}else{
$return->{'aliases'} = 1;
}
## Synchronize list members if required
if ($list->has_include_data_sources()) {
......@@ -580,10 +579,9 @@ sub create_list{
if ($list->{'admin'}{'status'} eq 'open') {
$return->{'aliases'} = &install_aliases($list,$robot);
return $return;
}
}else{
$return->{'aliases'} = 1;
}
## Synchronize list members if required
if ($list->has_include_data_sources()) {
......
......@@ -474,6 +474,7 @@ our @params = (
'query' => 'Defines the name of the family the automatic lists are based on.',
'file' => 'sympa.conf',
'optional' => '1',
vhost => '1',
},
{
'name' => 'automatic_list_prefix',
......
......@@ -71,6 +71,7 @@ my %regexp = ('email' => '([\w\-\_\.\/\+\=\'\&]+|\".*\")\@[\w\-]+(\.[\w\-]+)+',
'time' => $time_regexp,
'time_range' => $time_range_regexp,
'time_ranges' => $time_range_regexp.'(?:\s+'.$time_range_regexp.')*'
're' => '(?i)(?:AW|(?:\xD0\x9D|\xD0\xBD)(?:\xD0\x90|\xD0\xB0)|Re|Rif|SV|VS)\s*:',
);
my %openssl_errors = (1 => 'an error occurred parsing the command options',
......@@ -3067,7 +3068,7 @@ sub dump_html_var2 {
}
$html .= '</ul>';
}else {
$html .= sprintf "<li>'%s'"."</li>", ref($var);
$html .= sprintf "<li>'%s'</li>", ref($var);
}
}else{
if (defined $var) {
......
......@@ -2151,7 +2151,8 @@ sub DoCommand {
## Search and process a command in the Subject field
my $subject_field = $message->{'decoded_subject'};
$subject_field =~ s/\n//mg; ## multiline subjects
$subject_field =~ s/^\s*(Re:)?\s*(.*)\s*$/$2/i;
my $re_regexp = tools::get_regexp('re');
$subject_field =~ s/^\s*(?:$re_regexp)?\s*(.*)\s*$/$1/i;
my $auth_level = 'dkim' if ($message->{'dkim_pass'});
$auth_level = $is_signed->{'subject'} if ($is_signed->{'subject'}) ;
......@@ -2284,7 +2285,7 @@ sub SendDigest{
my ($listname, $listrobot) = split /\@/, $listaddress;
my $list = new List ($listname, $listrobot);
unless ($list) {
&Log::do_log('info', 'Unknown list %s, (robot %s), deleting digest file %s', $filename,$listname, $listrobot );
&Log::do_log('info', 'Unknown list %s, (robot %s), deleting digest file %s', $filename, $listname, $listrobot);
&Log::db_log({'robot' => $listrobot,'list' => $list->{'name'},'action' => 'SendDigest','parameters' => "$filename",'target_email' => '','msg_id' => '','status' => 'error','error_type' => 'unknown_list','user_email' => '','client' => $ip,'daemon' => $daemon_name});
unlink $filename;
return undef;
......
......@@ -678,7 +678,7 @@ sub chk_cmd {
return undef;
}
$Rused_labels->{$args[1]} =1 if ($cmd eq 'next' && ($args[1]));
$Rused_labels->{$args[1]} = 1 if ($cmd eq 'next' && ($args[1]));
$Rused_vars->{$args[0]} = 1 if ($var_commands{$cmd});
}
}
......
......@@ -1173,6 +1173,10 @@ a.ArcMenuLinksSortInactive {
padding:0.5em;
}
.block blockquote {
margin: 16px 40px;
}
h1.block,
h2.block,
h3.block,
......
......@@ -254,6 +254,6 @@
</ul>
<p class="retraitita">[%|helploc%]In order to have all subscribers read the list charter, you should include it in the welcome message they get after subscribing. To do that, you need to <a href="#customize">customize that message</a> through the 'Customize' page of the list administration module.[%END%]</p>
<p>[%|helploc%]When available, the <a target="_blank" title="Example of charter aimed at owners and moderators (French)" href="http://listes.cru.fr/cnil/charte.proprio.html">Owner and moderator charter</a> provides list owners and moderators with all the necessary information to carry out their roles. This Charter involves all the rights and responsibilities of owners and moderators.[%END%]</p>
<p>[%|helploc%]When available, the 'Owner and moderator charter' provides list owners and moderators with all the necessary information to carry out their roles. This Charter involves all the rights and responsibilities of owners and moderators.[%END%]</p>
<hr />
<!-- end help_admin.tt2 -->
......@@ -114,9 +114,9 @@
<h3><a name="policy"></a>[%|helploc%]Regulatory framework[%END%]</h3>
<p>[%|helploc%]The use of a mailing list service means respecting a number of rules:[%END%]</p>
<ul>
<li>[%|helploc%]In most mailing list services, subscribers receive a List subscribers charter on subscription. Then they are obliged to respect all the rules contained in that charter.[%END%]</li>
<li>[%|helploc%]If available, list owners and moderators have to conform to the Owner and moderator charter.[%END%]</li>
<li>[%|helploc%]The use of mailing lists naturally means respecting the rules of good practices as regards email (the "Netiquette").[%END%]</li>
<li>[%|helploc%]In most mailing list services, subscribers receive a 'List subscribers charter' on subscription. Then they are obliged to respect all the rules contained in that charter.[%END%]</li>
<li>[%|helploc%]If available, list owners and moderators have to conform to the 'Owner and moderator charter'.[%END%]</li>
<li>[%|helploc%]The use of mailing lists naturally means respecting the rules of good practices as regards to email.[%END%]</li>
</ul>
<p>[%|helploc(path_cgi)%]To know more, refer to the section dedicated to <a href="%1/help/sendmsg#rulesuser">good practices for subscribers</a> and to the section about <a href="%1/help/admin#rulesadmin">good practices for owners and moderators</a>.[%END%]</p>
<hr />
......
......@@ -20,9 +20,7 @@
<li>[%|helploc%]conceal except for subscribers (conceal) - <em>default option</em>;[%END%]</li>
<li>[%|helploc%]intranet access (intranet);[%END%]</li>
<li>[%|helploc%]no conceal (noconceal);[%END%]</li>
<li>[%|helploc%]subscribers (private);[%END%]</li>
<li>[%|helploc%]conceal even for subscribers (secret);[%END%]</li>
<li>[%|helploc%]semipublic (semipublic).[%END%]</li>
</ul>
<p class="retraitita">[%|helploc%]If you want to limit the list visibility according to other criteria, you should ask the listmasters: they may be able to create a new option matching your needs (example: list visible only by members of a user group, of an Internet domain, etc.).[%END%]</p>
<p>[%|helploc%]In the 'Owners' and 'Moderators' areas, you can <strong>add owners and moderators</strong> to the list or <strong>change their personal information</strong>:[%END%]</p>
......
<!-- $Id$ -->
<!-- DEVELOPMENT WARNING
Don't add javascript to this file, except if you need to initialize variables using TT2 parsing.
Use the src/etc/script/js/sympa. file instead to write your scripts. -->
//Don't add javascript to this file, except if you need to initialize variables using TT2 parsing.
//Use the src/etc/script/js/sympa.js file instead to write your scripts. -->
<script type="text/javascript">
......@@ -11,7 +11,14 @@ Use the src/etc/script/js/sympa. file instead to write your scripts. -->
// Miscellaneous vars
var path_cgi = '[% path_cgi %]/';
// Variables used by the color chooser
</script>
<script type="text/javascript">
[% IF action=='skinsedit' %]
// A few configuration settings
>>>>>>> .fusion-droit.r7510
var CROSSHAIRS_LOCATION = '[% icons_url %]/crosshairs.png';
var HUE_SLIDER_LOCATION = '[% icons_url %]/h.png';
var HUE_SLIDER_ARROWS_LOCATION = '[% icons_url %]/position.png';
......
......@@ -82,7 +82,7 @@
[% END %]
[% IF is_priv || is_listmaster %]
[% IF action == 'viewlogs' %][% SET class = 'MainMenuLinksCurrentPage' %][% ELSE %][% SET class = 'MainMenuLinks' %][% END %]
<li class="[% class %]"><a href="[% path_cgi %]/viewlogs/[% list %]/first" >[%|loc%]Logs[%END%]</a></li>
<li class="[% class %]"><a href="[% path_cgi %]/viewlogs/[% list %]" >[%|loc%]Logs[%END%]</a></li>
[% END %]
</ul>
......@@ -121,4 +121,4 @@
</div>
[% END %]
<!-- end nav.tt2 -->
\ No newline at end of file
<!-- end nav.tt2 -->
......@@ -232,7 +232,7 @@
[%|loc%]Sympa is designed to allow easy internationalization of its user interface (service mail messages and web interface). All translations for one language are gathered in a single PO file that can be manipulated by standard GNU gettext tools.[%END%]
</div>
<div>
[%|loc%]Check our translation FAQ if you wish to translate Sympa GUI in your native language: [%END%] <a href="http://www.sympa.org/howtotranslate.html">http://www.sympa.org/howtotranslate.html</a>
[%|loc%]Check our translation FAQ if you wish to translate Sympa GUI in your native language: [%END%] <a href="http://www.sympa.org/translating_sympa">http://www.sympa.org/translating_sympa</a>
</div>
[% END %]
......
......@@ -68,9 +68,9 @@
<input id="target" type="text" name="target" value="[% target %]" size ="20"/><br />
<label for="date_from">[%|loc%]Search by date from:[%END%]</label>
<input type="text" id="date_deb" name="date_debm" maxlength="10" size="10" value="[% date_from %]" onfocus="visuCal(this,param_ddeb);" onblur="masqueCal(this);" >
<input type="text" id="date_from" name="date_from" maxlength="10" size="10" value="[% date_from %]" onfocus="visuCal(this,param_ddeb);" onblur="masqueCal(this);" >
<label for="date_to">[%|loc%]to:[%END%]</label>
<input type="text" id="date_fin" name="date_fin" maxlength="10" size="10" value="[% date_to %]" onfocus="visuCal(this,param_dfin)" onblur="masqueCal(this)" ><noscript><em>[%|loc%]ex: 24-05-2006[%END%]</em></noscript>
<input type="text" id="date_to" name="date_to" maxlength="10" size="10" value="[% date_to %]" onfocus="visuCal(this,param_dfin)" onblur="masqueCal(this)" ><noscript><em>[%|loc%]ex: 24-05-2006[%END%]</em></noscript>
<br />
<label for="type">[%|loc%]Search by type:[%END%]</label>
<select id="type" name="type">
......@@ -102,20 +102,19 @@
[% END %]
<label for="submit"></label>
<input class="MainMenuLinks" id="submit" type="submit" name="action_viewlogs" value="[%|loc%]View[%END%]" />
<input class="MainMenuLinks" id="btnsubmit" type="submit" name="action_viewlogs" value="[%|loc%]View[%END%]" />
&nbsp;&nbsp;
<input class="MainMenuLinks" id="reset" type="button" value="[%|loc%]Reset[%END%]" onclick="javascript:clear_log_form()"/>
<input class="MainMenuLinks" id="btnreset" type="button" value="[%|loc%]Reset[%END%]" onclick="javascript:clear_log_form()"/>
</fieldset>
</form>
<em>[%|loc%]Search period: [%END%]<strong>[%|locdt(date_from_formated)%]%d %b %Y %H:%M:%S[%END%]</strong> [%|loc%]to[%END%] <strong>[%|locdt(date_to_formated)%]%d %b %Y %H:%M:%S[%END%]</strong></em><br />
[% IF total_results %]
<em>[%|loc(list)%]Research was carried out in list <strong>%1</strong>.[%END%]</em><br />
[% IF rows_nb %]
<br />
<em>[%|loc(rows_nb)%]%1 results[%END%].</em>
[% END %]
<br />
<em>[%|loc(total_results)%]%1 results[%END%].</em>
<div id="table_container">
<table class="listOfItems" summary="logs table">
<tr>
......@@ -241,6 +240,7 @@
[% END %]
</table>
</div>
[% END %]
</div>
<!-- end viewlogs.tt2 -->
......@@ -269,8 +269,8 @@ while (!$end) {
next;
}
my $messagesender = lc($new_message->{'sender'});
unless ($sender == $messagesender) {
unless ($sender eq $messagesender) {
&Log::do_log('err', 'remove command by unauthorized sender');
return undef;
}
......
......@@ -575,7 +575,8 @@ while (!$end) {
my $user_agent;
my $version;
my $feedback_type = '';
my ($listname, $robot);
my $listname;
my $robot;
foreach my $p (@parts) {
my $h = $p->head();
my $content = $h->get('Content-type');
......@@ -767,7 +768,7 @@ while (!$end) {
unless ($adr_count) {
if ( $who ) { # rcpt not recognized in the bounce but VERP was used
&store_bounce ($bounce_dir,$file,$who);
&store_bounce($bounce_dir, $file, $who);
&update_subscriber_bounce_history($list, 'unknown', $who); # status is undefined
}else{ # no VERP and no rcpt recognized
my $escaped_from = &tools::escape_chars($from);
......
......@@ -22,7 +22,7 @@
package cookielib;
use strict vars;
use strict "vars";
use Digest::MD5;
use POSIX;
......
Supports Markdown
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