Skip to Content.
Sympa Menu

devel - bug fix: stats file not updated in several cases

Subject: Developers of Sympa

List archive

Chronological Thread  
  • From: Sergiy Zhuk <address@concealed>
  • To: address@concealed
  • Cc: address@concealed
  • Subject: bug fix: stats file not updated in several cases
  • Date: Fri, 7 Jun 2002 17:09:18 -0700 (PDT)

hi

After I've upgraded sympa to 3.3.5 I've noticed that stats file is not
updated properly in several cases.
When you create a new list using web interface and try adding users, sympa
will add users to the database, but won't update the stats file, so it shows
0 subscribers on the list.
When you try to re-add the same users, it says that those users are already
on the list and it still won't update the stats file.
Another case is when you add users using an external utility, which only
updates the database (remotely), but doesn't touch any config files.

I think I've fixed that (patch is attached with this message) by reversing
one of changes you've made and adding a couple of lines.
Could you please apply that patch ?
I think that being able to update database remotely w/o touching sympa
config files is a great feature and it should work like it was before 3.3.5.

thanks

--
rgds,
serge
Index: List.pm
===================================================================
RCS file: /CVSROOT/yahoo/network/email/sympa/bin/List.pm,v
retrieving revision 1.29
diff -u -r1.29 List.pm
--- List.pm 2002/06/05 04:59:35 1.29
+++ List.pm 2002/06/07 23:46:33
@@ -1391,18 +1391,19 @@
if ($users && defined($users->{'total'})) {
$self->{'total'} = $users->{'total'};
}
+ elsif ($self->{'admin'}{'user_data_source'} eq 'database'){
+ ## If no total found in 'stats' AND database mode
+ $self->{'total'} = _load_total_db($name);
+ $self->savestats();
+ }elsif ($self->{'admin'}{'user_data_source'} eq 'file'){
+ $self->{'total'} = $users->{'total'};
+ $self->savestats();
+ }

## We have updated %users, Total may have changed
if ($m2 > $self->{'mtime'}[1]) {
$self->savestats();
}
-
-# elsif ($self->{'admin'}{'user_data_source'} eq 'database'){
-# ## If no total found in 'stats' AND database mode
-# $self->{'total'} = _load_total_db($name);
-# }elsif ($self->{'admin'}{'user_data_source'} eq 'file'){
-# $self->{'total'} = $users->{'total'};
-# }

$self->{'mtime'} = [ $m1, $m2, $m3 ];




Archive powered by MHonArc 2.6.19+.

Top of Page