mirror of
https://github.com/standardebooks/web.git
synced 2025-07-20 22:33:57 -04:00
Schedule new patron drive
This commit is contained in:
parent
23a893f46b
commit
c4bff3f613
2 changed files with 14 additions and 4 deletions
|
@ -9,8 +9,18 @@ $baseTarget = 50;
|
|||
$stretchCurrent = 0;
|
||||
$stretchTarget = 20;
|
||||
|
||||
// Hide the alert if the user has closed it
|
||||
if(!DONATION_DRIVE_ON || ($autoHide ?? $_COOKIE['hide-donation-alert'] ?? false) || $GLOBALS['User'] !== null || $now > $end){
|
||||
// Hide the alert if...
|
||||
if(
|
||||
!DONATION_DRIVE_ON // The drive isn't running
|
||||
||
|
||||
($autoHide ?? $_COOKIE['hide-donation-alert'] ?? false) // If the user has hidden the box
|
||||
||
|
||||
$GLOBALS['User'] !== null // If a user is logged in
|
||||
||
|
||||
$start > $now // If the drive hasn't started yet
|
||||
||
|
||||
$now > $end // If the drive has ended
|
||||
){
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue