mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
FIX 12.0 - set entity to $conf->entity (instead of 1 by default) when creating a survey; otherwise the survey cannot be listed from the entity it was created on unless it is the main entity
This commit is contained in:
parent
662fe4c358
commit
c752bfe1a6
|
|
@ -128,6 +128,7 @@ class Opensurveysondage extends CommonObject
|
|||
*/
|
||||
public function create(User $user, $notrigger = 0)
|
||||
{
|
||||
global $conf;
|
||||
$error = 0;
|
||||
|
||||
// Clean parameters
|
||||
|
|
@ -153,7 +154,8 @@ class Opensurveysondage extends CommonObject
|
|||
$sql .= "mailsonde,";
|
||||
$sql .= "allow_comments,";
|
||||
$sql .= "allow_spy,";
|
||||
$sql .= "sujet";
|
||||
$sql .= "sujet,";
|
||||
$sql .= "entity";
|
||||
$sql .= ") VALUES (";
|
||||
$sql .= "'".$this->db->escape($this->id_sondage)."',";
|
||||
$sql .= " ".(empty($this->commentaires) ? 'NULL' : "'".$this->db->escape($this->commentaires)."'").",";
|
||||
|
|
@ -165,7 +167,8 @@ class Opensurveysondage extends CommonObject
|
|||
$sql .= " ".$this->db->escape($this->mailsonde).",";
|
||||
$sql .= " ".$this->db->escape($this->allow_comments).",";
|
||||
$sql .= " ".$this->db->escape($this->allow_spy).",";
|
||||
$sql .= " '".$this->db->escape($this->sujet)."'";
|
||||
$sql .= " '".$this->db->escape($this->sujet)."',";
|
||||
$sql .= " '".$conf->entity."',";
|
||||
$sql .= ")";
|
||||
|
||||
$this->db->begin();
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user