I think this line might be the problem:
my @bad = (@{$CFG->{search_blocked}}, qw/isValidated ExpiryDate/);
This stops the ExpiryDate from being used to remove expired links from the results, doesn't it?
Edit: No, I've now realised that the limit on the ExpiryDate is set after this line so it can't be that.
my @bad = (@{$CFG->{search_blocked}}, qw/isValidated ExpiryDate/);
This stops the ExpiryDate from being used to remove expired links from the results, doesn't it?
Edit: No, I've now realised that the limit on the ExpiryDate is set after this line so it can't be that.