aboutsummaryrefslogtreecommitdiffstats
path: root/include/picture_comment.inc.php
diff options
context:
space:
mode:
authormistic100 <mistic@piwigo.org>2012-08-03 17:02:24 +0000
committermistic100 <mistic@piwigo.org>2012-08-03 17:02:24 +0000
commitd7bf41b3ef59453e5e84e0d5352e698e9274f660 (patch)
tree10f65c86201cecb06615f5cc199be219080014a1 /include/picture_comment.inc.php
parentefdb998cee7d3a6cdeda811fd86f04f3092fd467 (diff)
feature 2380: add URL for user comment
git-svn-id: http://piwigo.org/svn/trunk@17351 68402e56-0260-453c-a942-63ccdbb3a9ee
Diffstat (limited to 'include/picture_comment.inc.php')
-rw-r--r--include/picture_comment.inc.php7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/picture_comment.inc.php b/include/picture_comment.inc.php
index 380a66d5a..631f85596 100644
--- a/include/picture_comment.inc.php
+++ b/include/picture_comment.inc.php
@@ -48,6 +48,7 @@ if ( $page['show_comments'] and isset( $_POST['content'] ) )
$comm = array(
'author' => trim( @$_POST['author'] ),
'content' => trim( $_POST['content'] ),
+ 'website_url' => trim( $_POST['website_url'] ),
'image_id' => $page['image_id'],
);
@@ -145,6 +146,7 @@ SELECT
'.$conf['user_fields']['username'].' AS username,
date,
image_id,
+ website_url,
content,
validated
FROM '.COMMENTS_TABLE.' AS com
@@ -178,6 +180,7 @@ SELECT
'AUTHOR' => trigger_event('render_comment_author', $author),
'DATE' => format_date($row['date'], true),
'CONTENT' => trigger_event('render_comment_content',$row['content']),
+ 'WEBSITE_URL' => $row['website_url'],
);
if (can_manage_comment('delete', $row['author_id']))
@@ -241,11 +244,12 @@ SELECT
if ($show_add_comment_form)
{
$key = get_ephemeral_key(3, $page['image_id']);
- $content = $author = '';
+ $content = $author = $website_url = '';
if ('reject'===@$comment_action)
{
$content = htmlspecialchars( stripslashes($comm['content']) );
$author = htmlspecialchars( stripslashes($comm['author']) );
+ $website_url = htmlspecialchars( stripslashes($comm['website_url']) );
}
$template->assign('comment_add',
array(
@@ -254,6 +258,7 @@ SELECT
'CONTENT' => $content,
'SHOW_AUTHOR' => !is_classic_user(),
'AUTHOR' => $author ,
+ 'WEBSITE_URL' => $website_url,
));
}
}