Skip to content

Commit

Permalink
Fixes #3829 - Anonymous comments wouldn't show up
Browse files Browse the repository at this point in the history
  • Loading branch information
Moc committed Oct 12, 2019
1 parent b434bd7 commit ed56f04
Showing 1 changed file with 4 additions and 9 deletions.
13 changes: 4 additions & 9 deletions e107_core/shortcodes/batch/comment_shortcodes.php
Original file line number Diff line number Diff line change
Expand Up @@ -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; }
Expand Down Expand Up @@ -121,9 +116,9 @@ function sc_comment_avatar($parm = '')
// $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);
Expand Down Expand Up @@ -351,7 +346,7 @@ function sc_comment($parm=null)
{
return COMLAN_0;
}

return $tp->toHTML($this->var['comment_comment'], TRUE, FALSE, $this->var['user_id']);
}

Expand Down

0 comments on commit ed56f04

Please sign in to comment.