aboutsummaryrefslogtreecommitdiffstats
path: root/include/functions_comment.inc.php
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2013-11-06 15:43:41 +0000
committermistic100 <mistic@piwigo.org>2013-11-06 15:43:41 +0000
commit7a5e31e40127c401520d62499830a14537cd9c03 (patch)
tree4758ad0f260c9cd45ff295c6a1f84b04dec98d23 /include/functions_comment.inc.php
parentb768047019615e7c80f6292514219c7335b0ee1d (diff)
feature 2995: New email template
rewrite pwg_mail_group() and pwg_mail_notification_admins() new function pwg_mail_admins() add complete template management in pwg_mail() TODO : font-size problem in Thunderbird git-svn-id: http://piwigo.org/svn/trunk@25357 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/functions_comment.inc.php')
-rw-r--r--include/functions_comment.inc.php66
1 files changed, 30 insertions, 36 deletions
diff --git a/include/functions_comment.inc.php b/include/functions_comment.inc.php
index 9ea597672..344a56335 100644
--- a/include/functions_comment.inc.php
+++ b/include/functions_comment.inc.php
@@ -232,25 +232,22 @@ INSERT INTO '.COMMENTS_TABLE.'
$comment_url = get_absolute_root_url().'comments.php?comment_id='.$comm['id'];
- $keyargs_content = array
- (
- get_l10n_args('Author: %s', stripslashes($comm['author']) ),
- get_l10n_args('Email: %s', stripslashes($comm['email']) ),
- get_l10n_args('Comment: %s', stripslashes($comm['content']) ),
- get_l10n_args('', ''),
- get_l10n_args('Manage this user comment: %s', $comment_url)
+ $content = array(
+ l10n('Author: %s', stripslashes($comm['author']) ),
+ l10n('Email: %s', stripslashes($comm['email']) ),
+ l10n('Comment: %s', stripslashes($comm['content']) ),
+ '',
+ l10n('Manage this user comment: %s', $comment_url),
);
if ('moderate' == $comment_action)
{
- $keyargs_content[] = get_l10n_args('', '');
- $keyargs_content[] = get_l10n_args('(!) This comment requires validation', '');
+ $content[] = l10n('(!) This comment requires validation');
}
- pwg_mail_notification_admins
- (
- get_l10n_args('Comment by %s', stripslashes($comm['author']) ),
- $keyargs_content
+ pwg_mail_notification_admins(
+ l10n('Comment by %s', stripslashes($comm['author']) ),
+ implode("\n", $content)
);
}
}
@@ -376,20 +373,17 @@ $user_where_clause.'
$comment_url = get_absolute_root_url().'comments.php?comment_id='.$comment['comment_id'];
- $keyargs_content = array
- (
- get_l10n_args('Author: %s', stripslashes($GLOBALS['user']['username']) ),
- get_l10n_args('Comment: %s', stripslashes($comment['content']) ),
- get_l10n_args('', ''),
- get_l10n_args('Manage this user comment: %s', $comment_url),
- get_l10n_args('', ''),
- get_l10n_args('(!) This comment requires validation', ''),
+ $content = array(
+ l10n('Author: %s', stripslashes($GLOBALS['user']['username']) ),
+ l10n('Comment: %s', stripslashes($comment['content']) ),
+ '',
+ l10n('Manage this user comment: %s', $comment_url),
+ l10n('(!) This comment requires validation'),
);
- pwg_mail_notification_admins
- (
- get_l10n_args('Comment by %s', stripslashes($GLOBALS['user']['username']) ),
- $keyargs_content
+ pwg_mail_notification_admins(
+ l10n('Comment by %s', stripslashes($GLOBALS['user']['username']) ),
+ implode("\n", $content)
);
}
// just mail admin
@@ -416,24 +410,24 @@ function email_admin($action, $comment)
include_once(PHPWG_ROOT_PATH.'include/functions_mail.inc.php');
- $keyargs_content = array();
- $keyargs_content[] = get_l10n_args('Author: %s', $comment['author']);
+ $content = array(
+ l10n('Author: %s', $comment['author']),
+ );
+
if ($action=='delete')
{
- $keyargs_content[] = get_l10n_args('This author removed the comment with id %d',
- $comment['comment_id']
- );
+ $content[] = l10n('This author removed the comment with id %d', $comment['comment_id']);
}
else
{
- $keyargs_content[] = get_l10n_args('This author modified following comment:', '');
- $keyargs_content[] = get_l10n_args('Comment: %s', $comment['content']);
+ $content[] = l10n('This author modified following comment:');
+ $content[] = l10n('Comment: %s', $comment['content']);
}
- pwg_mail_notification_admins(get_l10n_args('Comment by %s',
- $comment['author']),
- $keyargs_content
- );
+ pwg_mail_notification_admins(
+ l10n('Comment by %s', $comment['author']),
+ implode("\n", $content)
+ );
}
function get_comment_author_id($comment_id, $die_on_error=true)