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

Fixes #3829 - Anonymous comments wouldn't show up

This commit is contained in:
Tijn Kuyper 2019-10-12 13:25:32 +02:00
parent b434bd76e3
commit ed56f04690
No known key found for this signature in database
GPG Key ID: AAEA3CC2C5A308F2

View File

@ -7,11 +7,6 @@
* GNU General Public License (http://www.gnu.org/licenses/gpl.txt)
*
*
*
* $Source: /cvs_backup/e107_0.8/e107_files/shortcode/batch/comment_shortcodes.php,v $
* $Revision$
* $Date$
* $Author$
*/
if (!defined('e107_INIT')) { exit; }
@ -121,9 +116,9 @@ class comment_shortcodes extends e_shortcode
// $url = $tp->thumbUrl($this->var['user_image']);
// $text = $tp->parseTemplate("{USER_AVATAR=".vartrue($this->var['user_image'],USERIMAGE)."}");
// $text = $tp->parseTemplate("{USER_AVATAR=".$this->var['user_id']."}");
// Comment form - no user_id, assume current user
if(!$this->var['user_id'])
// Posting a new comment (check that it is not an existing comment by anonymous user) - #3813 & 3829
if($this->var['comment_author_id'] != '0' && USERID)
{
$userdata = e107::user(USERID);
$this->var = array_merge($this->var, $userdata);
@ -351,7 +346,7 @@ class comment_shortcodes extends e_shortcode
{
return COMLAN_0;
}
return $tp->toHTML($this->var['comment_comment'], TRUE, FALSE, $this->var['user_id']);
}