Fix comment form processing

This commit is contained in:
Flavio Copes 2017-05-11 19:42:43 +02:00
parent f1b1f74348
commit 228ac73ba8
3 changed files with 4 additions and 1 deletions

View File

@ -4,6 +4,8 @@
1. [](#improved)
* Added Japanese translation
* Move captcha over email [#45](https://github.com/getgrav/grav-plugin-comments/issues/45)
1. [](#bugfix)
* Fix comment form processing
# v1.2.6
## 01/09/2017

View File

@ -187,7 +187,7 @@ class CommentsPlugin extends Plugin
switch ($action) {
case 'addComment':
$post = !empty($_POST) ? $_POST : [];
$post = isset($_POST['data']) ? $_POST['data'] : [];
$lang = filter_var(urldecode($post['lang']), FILTER_SANITIZE_STRING);
$path = filter_var(urldecode($post['path']), FILTER_SANITIZE_STRING);

View File

@ -1,4 +1,5 @@
{% if grav.twig.enable_comments_plugin %}
{% set scope = scope ?: 'data.' %}
<h3>{{'PLUGIN_COMMENTS.ADD_COMMENT'|t}}</h3>