mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-08-07 17:23:04 +02:00
feature:2786 Allow to edit website url in user comments + improve "user experience" on comment edition
git-svn-id: http://piwigo.org/svn/trunk@18995 68402e56-0260-453c-a942-63ccdbb3a9ee
This commit is contained in:
+20
-8
@@ -233,21 +233,33 @@ if (isset($action))
|
||||
if (!empty($_POST['content']))
|
||||
{
|
||||
check_pwg_token();
|
||||
update_user_comment(
|
||||
$comment_action = update_user_comment(
|
||||
array(
|
||||
'comment_id' => $_GET['edit'],
|
||||
'image_id' => $_POST['image_id'],
|
||||
'content' => $_POST['content']
|
||||
'content' => $_POST['content'],
|
||||
'website_url' => @$_POST['website_url'],
|
||||
),
|
||||
$_POST['key']
|
||||
);
|
||||
|
||||
$perform_redirect = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$edit_comment = $_GET['edit'];
|
||||
|
||||
switch ($comment_action)
|
||||
{
|
||||
case 'moderate':
|
||||
$_SESSION['page_infos'][] = l10n('An administrator must authorize your comment before it is visible.');
|
||||
case 'validate':
|
||||
$_SESSION['page_infos'][] = l10n('Your comment has been registered');
|
||||
$perform_redirect = true;
|
||||
break;
|
||||
case 'reject':
|
||||
$_SESSION['page_errors'][] = l10n('Your comment has NOT been registered because it did not pass the validation rules');
|
||||
break;
|
||||
default:
|
||||
trigger_error('Invalid comment action '.$comment_action, E_USER_WARNING);
|
||||
}
|
||||
}
|
||||
|
||||
$edit_comment = $_GET['edit'];
|
||||
}
|
||||
|
||||
if ($perform_redirect)
|
||||
|
||||
Reference in New Issue
Block a user