diff --git a/config/apache/standardebooks.org.conf b/config/apache/standardebooks.org.conf index d4d6fee4..e6a9d846 100644 --- a/config/apache/standardebooks.org.conf +++ b/config/apache/standardebooks.org.conf @@ -91,7 +91,7 @@ Define conf_rewrite_root ${web_root}/config/apache/rewrites SSLCertificateFile /etc/letsencrypt/live/${domain}/fullchain.pem SSLCertificateKeyFile /etc/letsencrypt/live/${domain}/privkey.pem Header always set Strict-Transport-Security "max-age=15768000" - Header set Content-Security-Policy "default-src 'self';" + Header set Content-Security-Policy "default-src 'self'; style-src 'self' 'unsafe-inline';" # Disable .htaccess files diff --git a/config/apache/standardebooks.test.conf b/config/apache/standardebooks.test.conf index b2a90159..9c0befc2 100644 --- a/config/apache/standardebooks.test.conf +++ b/config/apache/standardebooks.test.conf @@ -73,7 +73,7 @@ Define conf_rewrite_root ${web_root}/config/apache/rewrites SSLCertificateFile ${web_root}/config/ssl/${domain}.crt SSLCertificateKeyFile ${web_root}/config/ssl/${domain}.key Header always set Strict-Transport-Security "max-age=15768000" - Header set Content-Security-Policy "default-src 'self';" + Header set Content-Security-Policy "default-src 'self'; style-src 'self' 'unsafe-inline';" # Disable .htaccess files diff --git a/lib/Constants.php b/lib/Constants.php index 5563ab56..82af5d08 100644 --- a/lib/Constants.php +++ b/lib/Constants.php @@ -101,7 +101,7 @@ const DONATION_DRIVE_DATES = [ NOW < new DateTimeImmutable('January 7') ? new DateTimeImmutable('November 25 -1 year') : new DateTimeImmutable('November 25'), NOW < new DateTimeImmutable('January 7') ? new DateTimeImmutable('January 7') : new DateTimeImmutable('January 7 +1 year'), 75, - 25 + 50 ) ]; diff --git a/lib/DonationDrive.php b/lib/DonationDrive.php index 9e689b3b..c6b4667a 100644 --- a/lib/DonationDrive.php +++ b/lib/DonationDrive.php @@ -57,7 +57,7 @@ class DonationDrive{ if(!isset($this->_TargetDonationCount)){ $this->_TargetDonationCount = $this->BaseTargetDonationCount; - if($this->DonationCount > $this->BaseTargetDonationCount){ + if($this->DonationCount >= $this->BaseTargetDonationCount){ $this->_TargetDonationCount = $this->_TargetDonationCount + $this->StretchTargetDonationCount; } } diff --git a/templates/DonationProgress.php b/templates/DonationProgress.php index 08478892..4c3a441c 100644 --- a/templates/DonationProgress.php +++ b/templates/DonationProgress.php @@ -40,6 +40,10 @@ else{ $timeString = 'Only ' . $timeString; } } + +if($donationDrive->IsStretchEnabled){ + $stretchStartingPosition = round( ($donationDrive->BaseTargetDonationCount / $donationDrive->TargetDonationCount) * 100, 0, PHP_ROUND_HALF_DOWN); +} ?>