diff --git a/config/apache/standardebooks.org.conf b/config/apache/standardebooks.org.conf index 59698cff..cdee4c6b 100644 --- a/config/apache/standardebooks.org.conf +++ b/config/apache/standardebooks.org.conf @@ -283,7 +283,7 @@ Define webroot /standardebooks.org/web # HTTP Basic Auth configuration for: # /patrons-circle/downloads # /feeds - + AuthType Basic AuthName "Enter your Patrons Circle email address and leave the password empty." Require valid-user @@ -307,8 +307,8 @@ Define webroot /standardebooks.org/web " - # Specific config for /patrons-circle - + # Specific config for /patrons-circle/downloads + # Disable HTTP Basic auth for the index and 401 pages Require all granted @@ -320,7 +320,7 @@ Define webroot /standardebooks.org/web # Specific config for /feeds - + ErrorDocument 401 /feeds/401 diff --git a/config/apache/standardebooks.test.conf b/config/apache/standardebooks.test.conf index 690dd3a7..41744f34 100644 --- a/config/apache/standardebooks.test.conf +++ b/config/apache/standardebooks.test.conf @@ -265,7 +265,7 @@ Define webroot /standardebooks.org/web # HTTP Basic Auth configuration for: # /patrons-circle/downloads # /feeds - + AuthType Basic AuthName "Enter your Patrons Circle email address and leave the password empty." Require valid-user @@ -289,8 +289,8 @@ Define webroot /standardebooks.org/web " - # Specific config for /patrons-circle - + # Specific config for /patrons-circle/downloads + # Disable HTTP Basic auth for the index and 401 pages Require all granted @@ -302,7 +302,7 @@ Define webroot /standardebooks.org/web # Specific config for /feeds - + ErrorDocument 401 /feeds/401 diff --git a/www/patrons-circle/polls/votes/new.php b/www/patrons-circle/polls/votes/new.php index 2af2c088..43f6f1d0 100644 --- a/www/patrons-circle/polls/votes/new.php +++ b/www/patrons-circle/polls/votes/new.php @@ -5,7 +5,16 @@ use function Safe\session_unset; session_start(); -$vote = $_SESSION['vote'] ?? new PollVote(); +$vote = new PollVote(); + +if(isset($_SESSION['vote'])){ + $vote = $_SESSION['vote']; +} +else{ + $vote->User = new User(); + $vote->User->Email = $_SERVER['PHP_AUTH_USER'] ?? null; +} + $exception = $_SESSION['exception'] ?? null; $poll = new Poll(); @@ -29,24 +38,24 @@ if($exception){ $exception]) ?>

Select one of these options

    - PollItems as $pollItem){ ?> -
  • - -
  • - + PollItems as $pollItem){ ?> +
  • + +
  • +