commit
b1e4e8721f
@ -117,7 +117,7 @@ if (empty($reshook))
|
|||||||
$object->date_fin = $expiredate;
|
$object->date_fin = $expiredate;
|
||||||
$object->allow_comments = GETPOST('cancomment', 'aZ09') == 'on' ? 1 : 0;
|
$object->allow_comments = GETPOST('cancomment', 'aZ09') == 'on' ? 1 : 0;
|
||||||
$object->allow_spy = GETPOST('canseeothersvote', 'aZ09') == 'on' ? 1 : 0;
|
$object->allow_spy = GETPOST('canseeothersvote', 'aZ09') == 'on' ? 1 : 0;
|
||||||
$object->mailsonde = GETPOST('mailsonde', 'aZ09') == 'on' ? true : false;
|
$object->mailsonde = GETPOST('mailsonde', 'aZ09') == 'on' ? 1 : 0;
|
||||||
|
|
||||||
$res = $object->update($user);
|
$res = $object->update($user);
|
||||||
if ($res < 0) {
|
if ($res < 0) {
|
||||||
@ -132,21 +132,18 @@ if (empty($reshook))
|
|||||||
{
|
{
|
||||||
$error = 0;
|
$error = 0;
|
||||||
|
|
||||||
if (!GETPOST('comment'))
|
if (!GETPOST('comment')) {
|
||||||
{
|
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Comment")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Comment")), null, 'errors');
|
||||||
}
|
}
|
||||||
if (!GETPOST('commentuser'))
|
if (!GETPOST('commentuser')) {
|
||||||
{
|
|
||||||
$error++;
|
$error++;
|
||||||
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("User")), null, 'errors');
|
setEventMessages($langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("User")), null, 'errors');
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!$error)
|
if (!$error) {
|
||||||
{
|
$comment = (string) GETPOST("comment", "restricthtml");
|
||||||
$comment = GETPOST("comment");
|
$comment_user = (string) GETPOST('commentuser', "restricthtml");
|
||||||
$comment_user = GETPOST('commentuser');
|
|
||||||
|
|
||||||
$resql = $object->addComment($comment, $comment_user);
|
$resql = $object->addComment($comment, $comment_user);
|
||||||
|
|
||||||
|
|||||||
@ -66,7 +66,7 @@ class Opensurveysondage extends CommonObject
|
|||||||
public $mail_admin;
|
public $mail_admin;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var admin name
|
* @var string admin name
|
||||||
*/
|
*/
|
||||||
public $nom_admin;
|
public $nom_admin;
|
||||||
|
|
||||||
@ -514,15 +514,15 @@ class Opensurveysondage extends CommonObject
|
|||||||
{
|
{
|
||||||
$this->id = 0;
|
$this->id = 0;
|
||||||
|
|
||||||
$this->id_sondage = '';
|
$this->id_sondage = 'a12d5g';
|
||||||
$this->description = 'Description of the specimen survey';
|
$this->description = 'Description of the specimen survey';
|
||||||
$this->mail_admin = '';
|
$this->mail_admin = 'email@email.com';
|
||||||
$this->nom_admin = '';
|
$this->nom_admin = 'surveyadmin';
|
||||||
$this->title = 'This is a specimen survey';
|
$this->title = 'This is a specimen survey';
|
||||||
$this->date_fin = dol_now() + 3600 * 24 * 10;
|
$this->date_fin = dol_now() + 3600 * 24 * 10;
|
||||||
$this->status = 1;
|
$this->status = 1;
|
||||||
$this->format = 'classic';
|
$this->format = 'classic';
|
||||||
$this->mailsonde = '';
|
$this->mailsonde = 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user