Do not try to execute query to get images in db if there are no images on disk; fixes #892
Exclude donations froms due date calculation; fixes #898