diff --git a/.github/workflows/deploy_master.yaml b/.github/workflows/deploy_master.yaml index 44f4378c..9ecda2ff 100644 --- a/.github/workflows/deploy_master.yaml +++ b/.github/workflows/deploy_master.yaml @@ -42,7 +42,7 @@ jobs: run: bash build_prod.sh - name: Upload to FTP run: lftp -c "set sftp:auto-confirm yes ; open -u ${{ secrets.FTP_USER }},${{ secrets.FTP_PASSWORD }} -p ${{ secrets.FTP_PORT }} sftp://${{ secrets.FTP_HOST }} ; mirror -Rn --ignore-time -P 12 upload/ /web/website ; quit" - if: ${{ github.event.inputs.REUPLOAD_ALL == 'false'}} + # if: ${{ github.event_name == 'push' || github.event.inputs.REUPLOAD_ALL == 'false'}} - name: Upload to FTP (all files) run: lftp -c "set sftp:auto-confirm yes ; open -u ${{ secrets.FTP_USER }},${{ secrets.FTP_PASSWORD }} -p ${{ secrets.FTP_PORT }} sftp://${{ secrets.FTP_HOST }} ; mirror -R -P 12 upload/ /web/website ; quit" if: ${{ github.event.inputs.REUPLOAD_ALL == 'true'}} diff --git a/.github/workflows/deploy_test.yaml b/.github/workflows/deploy_test.yaml index 3f5a0a7b..1b589775 100644 --- a/.github/workflows/deploy_test.yaml +++ b/.github/workflows/deploy_test.yaml @@ -41,7 +41,7 @@ jobs: run: bash build_test.sh - name: Upload to FTP (only changed files) run: lftp -c "set sftp:auto-confirm yes ; open -u ${{ secrets.FTP_USER }},${{ secrets.FTP_PASSWORD }} -p ${{ secrets.FTP_PORT }} sftp://${{ secrets.FTP_HOST }} ; mirror -Rn --ignore-time -P 12 upload/ /web/website_tmp ; quit" - if: ${{ github.event.inputs.REUPLOAD_ALL == 'false'}} + # if: ${{ github.event_name == 'push' || github.event.inputs.REUPLOAD_ALL == 'false'}} - name: Upload to FTP (all files) run: lftp -c "set sftp:auto-confirm yes ; open -u ${{ secrets.FTP_USER }},${{ secrets.FTP_PASSWORD }} -p ${{ secrets.FTP_PORT }} sftp://${{ secrets.FTP_HOST }} ; mirror -R -P 12 upload/ /web/website_tmp ; quit" if: ${{ github.event.inputs.REUPLOAD_ALL == 'true'}} diff --git a/content/pages/events/mieten/index.md b/content/pages/events/mieten/index.md index b6cc47c9..c33bbc8f 100644 --- a/content/pages/events/mieten/index.md +++ b/content/pages/events/mieten/index.md @@ -174,6 +174,14 @@ Schreibt uns an aula@collegiumacade +
+ +
+ +
+
diff --git a/content/pages/events/mieten/send.php b/content/pages/events/mieten/send.php index d36844ff..3c788a3a 100644 --- a/content/pages/events/mieten/send.php +++ b/content/pages/events/mieten/send.php @@ -18,8 +18,9 @@ file_put_contents($log_file, $initial_content); } +// NOTE:The field mail is a fake field for spam protection $fields = ['full_name', 'email', 'phone', 'event', 'date', -'number_guests', 'freetext']; +'number_guests', 'freetext', 'mail', 'spam_protection']; $i18n = [ "de" => [ @@ -105,8 +106,9 @@ function check_for_spam($logs, $ip_address) { // spam protection $spam = check_for_spam($logs, $ip_address); - - if (! $spam ) { + $spam_protection = $form->post("spam_protection"); + $fake_mail_field = $form->post("mail"); + if ($spam_protection == 6 and $fake_mail_field == "" and ! $spam ) { $data = ["email" => $form->post('email','Email','valid_email')]; foreach ($fields as $field) { $_dat = $form->post($field);