fix calculation of expiration date if there is a default expiration date set (but not forced) and the user does not want the link to expire.
Consolidate if statement, and update unit test
Merge pull request #12350 from mprokop/link_expiration

fix calculation of expiration date if there is a default expiration date...