Renew 1 day *before* the end, not 1 day *after*

This commit is contained in:
Stephen Paul Weber 2015-10-21 01:49:26 +00:00
parent df46f123dd
commit df21c3c95d

View File

@ -295,7 +295,7 @@ class FeedSub extends Managed_DataObject
{
$fs = new FeedSub();
// the "" empty string check is because we historically haven't saved unsubscribed feeds as NULL
$fs->whereAdd('sub_end IS NOT NULL AND sub_end!="" AND sub_end < NOW() - INTERVAL 1 day');
$fs->whereAdd('sub_end IS NOT NULL AND sub_end!="" AND sub_end < NOW() + INTERVAL 1 day');
if (!$fs->find()) { // find can be both false and 0, depending on why nothing was found
throw new NoResultException($fs);
}