Gossamer Forum
Home : Products : Gossamer Mail : Discussion :

Search in admin area (in 2.2.4)

Quote Reply
Search in admin area (in 2.2.4)
Hi

I canīt seem to get correct results when doing a search on 'Not Paid' accounts (the radion button). I do get correct results if I search on a plan and the expire date is in the future.. How come?
Quote Reply
Re: [areh] Search in admin area (in 2.2.4) In reply to
Here's a patch to admin/GMail/SQL/Admin.pm to fix that problem:
Code:
@@ -1014,7 +1014,7 @@
}
# length > 1, because expiry can be -1 (unpaid) or 0 (unlimited). date_to_time()
# would return undef for these, thus removing the term from the search.
- if (exists $cgi->{$p . 'users.users_payment_expiry' . $opt} and length($cgi->{$p . 'users.users_payment_expiry' . $opt}) > 1) {
+ if (exists $cgi->{$p . 'users.users_payment_expiry' . $opt} and $cgi->{$p . 'users.users_payment_expiry' . $opt} != 0 and $cgi->{$p . 'users.users_payment_expiry' . $opt} != -1) {
$cgi->{$p . 'users.users_payment_expiry' . $opt} = date_to_time($cgi->{$p . 'users.users_payment_expiry' . $opt});
}
}

Adrian
Quote Reply
Re: [brewt] Search in admin area (in 2.2.4) In reply to
I changed it to the below, but didnīt seem to make it any better:

# length > 1, because expiry can be -1 (unpaid) or 0 (unlimited). date_to_time()
# would return undef for these, thus removing the term from the search.
if (exists $cgi->{$p . 'users.users_payment_expiry' . $opt} and $cgi->{$p . 'users.users_payment_expiry' . $opt} != 0 and $cgi->{$p .
'users.users_payment_expiry' . $opt} != -1)
{
$cgi->{$p . 'users.users_payment_expiry' . $opt} = date_to_time($cgi->{$p . 'users.users_payment_expiry' . $opt});
}
}
return $self->SUPER::format_search_cgi;
}
Quote Reply
Re: [areh] Search in admin area (in 2.2.4) In reply to
After logging out, it suddenly seems to work.

So, thanks!