Subject: Developers of Sympa
List archive
Users updating additional user fields with wwsympa
- From: Charles Clarke <address@concealed>
- To: address@concealed
- Subject: Users updating additional user fields with wwsympa
- Date: Thu, 12 Dec 2002 19:35:50 -0700 (MST)
Hello! First, thank you for developing such a powerful and flexible
mailing list manager!
Since I'm new to Sympa, please let me know if I miss something...
While playing with Sympa, I wanted to allow the subscribers to be able to
edit some of their additional_user_db fields(by the listmaster changing
the prefs...tpl file to include their input) and was disappointed that
Sympa couldn't do that(and actually looked like it was written to prevent
it). I've included the changes(context diff) I made to List.pm and
wwsympa.fcgi to allow this.
I'm also interested in the customized user emails. I'm willing to help on
the development, if needed. I'm also looking forward to more virtual
robot support(e.g. allowing access to different databases for different
robots).
Also, I saw a message by Adam Bernstein about his cleaning up the English
and reducing menu clicks. I'm interested in these so I don't duplicate
his work.
Thanks!
charles
*** List.pm Wed Dec 11 19:17:21 2002
--- List.pm.orig Wed Dec 11 09:22:22 2002
***************
*** 3630,3645 ****
## Update each table
my @set_list;
while (($field, $value) = each %{$values}) {
my $set;
! if($map_field{$field}) {
! if ($map_field{$field} eq 'cookie_delay_user') {
! $set = sprintf '%s=%s', $map_field{$field}, $value;
! }else {
! $set = sprintf '%s=%s', $map_field{$field},
$dbh->quote($value);
! }
! } else {
! $set = sprintf '%s=%s', $field, $dbh->quote($value);
}
push @set_list, $set;
--- 3630,3642 ----
## Update each table
my @set_list;
while (($field, $value) = each %{$values}) {
+ next unless ($map_field{$field});
my $set;
! if ($map_field{$field} eq 'cookie_delay_user') {
! $set = sprintf '%s=%s', $map_field{$field}, $value;
! }else {
! $set = sprintf '%s=%s', $map_field{$field}, $dbh->quote($value);
}
push @set_list, $set;
*** .wwsympa.fcgi Thu Dec 12 19:16:50 2002
--- .wwsympa.fcgi.orig Wed Dec 11 08:33:17 2002
***************
*** 2324,2333 ****
return 'loginrequest';
}
! # If they were included on the form submission, change them in the
database
! foreach my $p ('gecos','lang','cookie_delay',
! (split(/,\s*/, $Conf{'db_additional_user_fields'}))) {
! $changes->{$p} = $in{$p} if (exists($in{$p}));
}
if (&List::is_user_db($param->{'user'}{'email'})) {
--- 2324,2331 ----
return 'loginrequest';
}
! foreach my $p ('gecos','lang','cookie_delay') {
! $changes->{$p} = $in{$p} if (defined($in{$p}));
}
if (&List::is_user_db($param->{'user'}{'email'})) {
***************
*** 2346,2356 ****
}
}
! # Need to set these in the param hash because we don't requery the user
! foreach my $p ('gecos','lang','cookie_delay',
! (split(/,\s*/, $Conf{'db_additional_user_fields'}))) {
! $param->{'user'}{$p} = $in{$p} if(exists($in{$p}));
}
if ($in{'previous_action'}) {
$in{'list'} = $in{'previous_list'};
--- 2344,2353 ----
}
}
! foreach my $p ('gecos','lang','cookie_delay') {
! $param->{'user'}{$p} = $in{$p};
}
+
if ($in{'previous_action'}) {
$in{'list'} = $in{'previous_list'};
--------------------------------------------------------------------------
Domain hosting from $15/month with error log analysis and link checking.
http://www.clarkecomputer.com/sig.html address@concealed
-
Users updating additional user fields with wwsympa,
Charles Clarke, 12/13/2002
-
Re: [sympa-dev] Users updating additional user fields with wwsympa,
Olivier Salaun - CRU, 12/13/2002
- Re: [sympa-dev] Re: Users updating additional user fields with wwsympa, Charles Clarke, 12/13/2002
-
Re: [sympa-dev] Users updating additional user fields with wwsympa,
Olivier Salaun - CRU, 12/13/2002
Archive powered by MHonArc 2.6.19+.