1
0
mirror of https://github.com/e107inc/e107.git synced 2025-03-14 01:19:44 +01:00

Fixes #378 - missing username after comment post.

This commit is contained in:
Cameron 2013-06-19 23:52:14 -07:00
parent 2d21d0e7d2
commit 5dbe762be0
2 changed files with 6 additions and 4 deletions

View File

@ -107,7 +107,7 @@ if(e_AJAX_REQUEST) // TODO improve security
{
$pid = intval(varset($_POST['pid'], 0)); // ID of the specific comment being edited (nested comments - replies)
$row = array();
$clean_authorname = $_POST['author_name'];
$clean_authorname = vartrue($_POST['author_name'],USERNAME);
$clean_comment = $_POST['comment'];
$clean_subject = $_POST['subject'];
@ -122,6 +122,7 @@ if(e_AJAX_REQUEST) // TODO improve security
$row['user_id'] = (USERID) ? USERID : 0;
$row['user_name'] = USERNAME;
$row['comment_author_name'] = $tp->toDB($clean_authorname);
$row['comment_author_id'] = (USERID) ? USERID : 0;
$row['comment_datestamp'] = time();
$row['comment_blocked'] = (check_class($pref['comments_moderate']) ? 2 : 0);
$row['comment_share'] = ($_POST['comment_share']);

View File

@ -292,9 +292,10 @@ class comment
$text .= "
<input type='hidden' name='subject' value='".$tp->toForm($subject)."' />
<input type='hidden' name='e-token' value='".e_TOKEN."' />\n
<input type='hidden' name='table' value='".$table."' />\n
<input type='hidden' name='itemid' value='".$itemid."' />\n
<input type='hidden' name='e-token' value='".e_TOKEN."' />
<input type='hidden' name='table' value='".$table."' />
<input type='hidden' name='itemid' value='".$itemid."' />
</div>
</form>\n";