Ignore:
Timestamp:
Dec 17, 2009, 11:47:31 PM (14 years ago)
Author:
plg
Message:

bug 1328: implement check_pwg_token for emails on user comments management.

The check_pwg_token and get_pwg_token functions were moved to the public side
(for use on comments.php)

The email sent to admins on new user comment does not directly includes
validate/delete actions.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/2.0/include/functions_comment.inc.php

    r3147 r4508  
    167167    $comm['id'] = mysql_insert_id();
    168168
    169     if
    170       (
    171         ($comment_action=='validate' and $conf['email_admin_on_comment'])
    172         or
    173         ($comment_action!='validate' and $conf['email_admin_on_comment_validation'])
    174       )
     169    if ($conf['email_admin_on_comment']
     170        or ($conf['email_admin_on_comment_validation'] and 'moderate' == $comment_action))
    175171    {
    176172      include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
    177173
    178       $del_url =
    179           get_absolute_root_url().'comments.php?delete='.$comm['id'];
     174      $comment_url = get_absolute_root_url().'comments.php?comment_id='.$comm['id'];
    180175
    181176      $keyargs_content = array
     
    184179        get_l10n_args('Comment: %s', $comm['content']),
    185180        get_l10n_args('', ''),
    186         get_l10n_args('Delete: %s', $del_url)
     181        get_l10n_args('Manage this user comment: %s', $comment_url)
    187182      );
    188183
    189       if ($comment_action!='validate')
     184      if ('moderate' == $comment_action)
    190185      {
    191         $keyargs_content[] =
    192           get_l10n_args('', '');
    193         $keyargs_content[] =
    194           get_l10n_args('Validate: %s',
    195             get_absolute_root_url().'comments.php?validate='.$comm['id']);
     186        $keyargs_content[] = get_l10n_args('', '');
     187        $keyargs_content[] = get_l10n_args('(!) This comment requires validation', '');
    196188      }
    197189
Note: See TracChangeset for help on using the changeset viewer.