From f300fc25ed33f98c28aada631d245440864466cf Mon Sep 17 00:00:00 2001 From: Alex Cabal Date: Sat, 2 Jan 2021 22:18:26 -0600 Subject: [PATCH] Correct donation header end date calculation --- lib/Constants.php | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/lib/Constants.php b/lib/Constants.php index bb189e73..fb12764a 100644 --- a/lib/Constants.php +++ b/lib/Constants.php @@ -35,10 +35,9 @@ const SOURCE_PROJECT_GUTENBERG_AUSTRALIA = 8; const AVERAGE_READING_WORDS_PER_MINUTE = 275; define('PD_YEAR', intval(gmdate('Y')) - 96); - const DONATION_ALERT_ALWAYS_ON = false; const DONATION_ALERT_ON_DURING_HOLIDAYS = true; -define('DONATION_ALERT_ON', DONATION_ALERT_ALWAYS_ON | (DONATION_ALERT_ON_DURING_HOLIDAYS && (strtotime('December 1, ' . gmdate('Y')) < time() && time() < strtotime('January 7, ' . (intval(gmdate('Y')) + 1))))); +define('DONATION_ALERT_ON', DONATION_ALERT_ALWAYS_ON | (DONATION_ALERT_ON_DURING_HOLIDAYS && (time() > strtotime('December 1, ' . gmdate('Y')) || time() < strtotime('January 7, ' . gmdate('Y'))))); // No trailing slash on any of the below constants. const SITE_URL = 'https://standardebooks.org'; const SITE_ROOT = '/standardebooks.org';