From cebf499c160eaa3ca2580e71910572d70b1c74b9 Mon Sep 17 00:00:00 2001 From: Alex Cabal Date: Sun, 1 Jan 2023 01:12:44 -0600 Subject: [PATCH] Hide donation alerts if the ending time has passed --- templates/DonationCounter.php | 9 +++++---- templates/DonationProgress.php | 11 ++++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/templates/DonationCounter.php b/templates/DonationCounter.php index dc9cd440..bc325c52 100644 --- a/templates/DonationCounter.php +++ b/templates/DonationCounter.php @@ -1,16 +1,17 @@ $end){ return; } $autoHide = $autoHide ?? true; $showDonateButton = $showDonateButton ?? true; $current = 0; -$start = new DateTime('May 2, 2022 00:00:00 America/New_York'); -$end = new DateTime('May 8, 2022 23:59:00 America/New_York'); -$now = new DateTime(); if($now < $start || $now > $end){ return; diff --git a/templates/DonationProgress.php b/templates/DonationProgress.php index c1d3c90f..e146f874 100644 --- a/templates/DonationProgress.php +++ b/templates/DonationProgress.php @@ -1,13 +1,14 @@ $end){ + return; +} + $autoHide = $autoHide ?? true; $showDonateButton = $showDonateButton ?? true; $current = Db::QueryInt('