aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJesús <heckyel@hyperbola.info>2020-01-23 14:51:06 -0500
committerJesús <heckyel@hyperbola.info>2020-01-23 14:51:06 -0500
commitab2be3eab038f3bd3e140a55c27725696b087d27 (patch)
treee08dc638e971f6ae8f74fb9e30d1898b10324106
parentc1c78252a50bb16d7d589d35c46f3a458713de56 (diff)
downloadcl-ab2be3eab038f3bd3e140a55c27725696b087d27.tar.lz
cl-ab2be3eab038f3bd3e140a55c27725696b087d27.tar.xz
cl-ab2be3eab038f3bd3e140a55c27725696b087d27.zip
commentsubmit: improve validation
-rw-r--r--content/vendor/form-comments/commentsubmit.php14
1 files changed, 10 insertions, 4 deletions
diff --git a/content/vendor/form-comments/commentsubmit.php b/content/vendor/form-comments/commentsubmit.php
index 20c096a..39d81b4 100644
--- a/content/vendor/form-comments/commentsubmit.php
+++ b/content/vendor/form-comments/commentsubmit.php
@@ -52,13 +52,18 @@ if(empty($_POST['name']) ||
// Create the email and send the message
// Add your email address
- $to = 'heckyel@riseup.net';
+ $recipients = array(
+ "heckyel@riseup.net",
+ "$email_address",
+ // more emails
+ );
+ $to = implode(',', $recipients);
$email_subject = <<<EOT
[conocimientoslibres.tuxfamily.org] Mensaje de {$name}
EOT;
$email_body = <<<EOT
-Haz recibido un nuevo comentario del formulario de tu sitio web.
+Nuevo comentario del formulario de conocimientoslibres.tuxfamily.org
Aqui estan los detalles:\n
post_id: {$postID}
Author: {$name}
@@ -66,12 +71,13 @@ Date: {$publish}
Email: {$email_address}
Slug: {$slug}
{$web}\n
-{$comment}
+{$comment}\n\n
+¿Usted no ha escrito este comentario? escríbenos a: heckyel[at]hyperbola[dot]info
EOT;
$headers = "From: noreply@conocimientoslibres.tuxfamily.org\n"; // Using something like noreply@yourdomain.com.
$headers .= "Reply-To: $email_address";
- mail($to,$email_subject,$email_body,$headers);
+ mail($to,$email_subject,utf8_decode($email_body),$headers);
// Rediret to current post
header("Refresh: 10; URL={$return_url}");