Fix User.t so that it assigns IPs in a way that works with the new isInGroup code.
User.pm: Collapse all methods into getUsers(1) inside isInGroup Group.pm: Disable the cache whenever a scratchFilter or ipFilter is assigned. Begin updating Group documentation for changes to dbQuery
This commit is contained in:
parent
649e5bac06
commit
ad694fb030
4 changed files with 27 additions and 19 deletions
|
|
@ -536,6 +536,7 @@ sub getIpUsers {
|
|||
my $sth = $self->session->db->read($query, [ $self->session->datetime->time() ]);
|
||||
my %localCache = ();
|
||||
my @ipUsers = ();
|
||||
$self->session->errorHandler->warn("Fetching IP users");
|
||||
while (my ($userId, $lastIP) = $sth->array() ) {
|
||||
if (!exists $localCache{$lastIP}) {
|
||||
$localCache{$lastIP} = isInSubnet($lastIP, \@filters);
|
||||
|
|
@ -754,6 +755,8 @@ sub karmaThreshold {
|
|||
my $self = shift;
|
||||
my $value = shift;
|
||||
if (defined $value) {
|
||||
$self->session->stow->delete('isInGroup');
|
||||
$self->session->stow->delete("gotGroupsInGroup");
|
||||
$self->set("karmaThreshold",$value);
|
||||
}
|
||||
return $self->get("karmaThreshold");
|
||||
|
|
@ -776,6 +779,8 @@ sub ipFilter {
|
|||
my $self = shift;
|
||||
my $value = shift;
|
||||
if (defined $value) {
|
||||
$self->session->stow->delete("gotGroupsInGroup");
|
||||
$self->session->stow->delete('isInGroup');
|
||||
$self->set("ipFilter",$value);
|
||||
}
|
||||
return $self->get("ipFilter");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue