Convert some constants to enums

This commit is contained in:
Alex Cabal 2024-05-11 13:23:15 -05:00
parent 06425d3dd6
commit ee7c8343dd
52 changed files with 282 additions and 268 deletions

View file

@ -1,8 +1,8 @@
<?
use function Safe\strtotime;
$hideDonationAlert = HttpInput::Bool(POST, 'hide-donation-alert');
$colorScheme = HttpInput::Str(POST, 'color-scheme');
$hideDonationAlert = HttpInput::Bool(HttpVariableSource::Post, 'hide-donation-alert');
$colorScheme = HttpInput::Str(HttpVariableSource::Post, 'color-scheme');
if($hideDonationAlert !== null){
setcookie('hide-donation-alert', $hideDonationAlert ? 'true' : 'false', ['expires' => strtotime('+1 month'), 'path' => '/', 'domain' => SITE_DOMAIN, 'secure' => true, 'httponly' => true, 'samesite' => 'Lax']);