mirror of
https://github.com/Piwigo/Piwigo.git
synced 2026-03-28 17:42:57 +01:00
For these pages : picture modify, album notification, category permission, comments, menubar, all configurations, site update, element set ranks, notification by mail Change how success and errors messages are displayed and handled
This commit is contained in:
@@ -36,7 +36,11 @@ if (!empty($_POST))
|
||||
{
|
||||
if (empty($_POST['comments']))
|
||||
{
|
||||
$page['errors'][] = l10n('Select at least one comment');
|
||||
$template->assign(
|
||||
array(
|
||||
'save_warning' => l10n('Select at least one comment')
|
||||
)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -47,20 +51,28 @@ if (!empty($_POST))
|
||||
{
|
||||
validate_user_comment($_POST['comments']);
|
||||
|
||||
$page['infos'][] = l10n_dec(
|
||||
'%d user comment validated', '%d user comments validated',
|
||||
count($_POST['comments'])
|
||||
);
|
||||
$template->assign(
|
||||
array(
|
||||
'save_success' => l10n_dec(
|
||||
'%d user comment validated', '%d user comments validated',
|
||||
count($_POST['comments'])
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
|
||||
if (isset($_POST['reject']))
|
||||
{
|
||||
delete_user_comment($_POST['comments']);
|
||||
|
||||
$page['infos'][] = l10n_dec(
|
||||
'%d user comment rejected', '%d user comments rejected',
|
||||
count($_POST['comments'])
|
||||
);
|
||||
$template->assign(
|
||||
array(
|
||||
'save_error' => l10n_dec(
|
||||
'%d user comment rejected', '%d user comments rejected',
|
||||
count($_POST['comments'])
|
||||
)
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user