diff --git a/htdocs/core/class/html.formticket.class.php b/htdocs/core/class/html.formticket.class.php
index 23c220d43df..b10ac80416f 100644
--- a/htdocs/core/class/html.formticket.class.php
+++ b/htdocs/core/class/html.formticket.class.php
@@ -259,7 +259,7 @@ class FormTicket
$doleditor->Create();
print '';
- if (!empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA)) {
+ if ($public && !empty($conf->global->MAIN_SECURITY_ENABLECAPTCHA)) {
require_once DOL_DOCUMENT_ROOT.'/core/lib/security2.lib.php';
print '
| ';
print '';
diff --git a/htdocs/ticket/card.php b/htdocs/ticket/card.php
index 5e2ef1e804b..96a5ad0c120 100644
--- a/htdocs/ticket/card.php
+++ b/htdocs/ticket/card.php
@@ -53,6 +53,7 @@ $ref = GETPOST('ref', 'alpha');
$projectid = GETPOST('projectid', 'int');
$cancel = GETPOST('cancel', 'alpha');
$action = GETPOST('action', 'aZ09');
+$backtopage = GETPOST('$backtopage', 'alpha');
$notifyTiers = GETPOST("notify_tiers_at_create", 'alpha');
@@ -152,7 +153,7 @@ if (empty($reshook)) {
}
// Action to add an action (not a message)
- if (GETPOST('add', 'alpha') && $user->rights->ticket->write) {
+ if (GETPOST('add', 'alpha') && !empty($user->rights->ticket->write)) {
$error = 0;
if (!GETPOST("subject", 'alphanohtml')) {
|