Changeset 18164 for trunk/comments.php


Ignore:
Timestamp:
Sep 23, 2012, 11:34:30 AM (12 years ago)
Author:
mistic100
Message:

feature 2754: Add "Email" field for user comments + mandatory "Author"

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/comments.php

    r18063 r18164  
    384384       com.author,
    385385       com.author_id,
     386       u.'.$conf['user_fields']['email'].' AS user_email,
     387       com.email,
    386388       com.date,
    387389       com.website_url,
     
    474476        )
    475477      );
     478     
     479    $email = null;
     480    if (!empty($comment['user_email']))
     481    {
     482      $email = $comment['user_email'];
     483    }
     484    else if (!empty($comment['email']))
     485    {
     486      $email = $comment['email'];
     487    }
    476488
    477489    $tpl_comment = array(
     
    485497      'CONTENT'=>trigger_event('render_comment_content',$comment['content']),
    486498      );
     499     
     500    if (is_admin())
     501    {
     502      $tpl_comment['EMAIL'] = $email;
     503    }
    487504
    488505    if (can_manage_comment('delete', $comment['author_id']))
Note: See TracChangeset for help on using the changeset viewer.