Merge pull request #14145 from oscim/patch-41

Update project.class.php
This commit is contained in:
Laurent Destailleur 2020-07-03 00:39:45 +02:00 committed by GitHub
commit f85d240dcf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -721,7 +721,18 @@ class Project extends CommonObject
}
}
if (!$error)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."projet_extrafields";
$sql .= " WHERE fk_object=".$this->id;
$resql = $this->db->query($sql);
if (!$resql)
{
$this->errors[] = $this->db->lasterror();
$error++;
}
}
// Delete project
if (!$error)
@ -737,18 +748,7 @@ class Project extends CommonObject
}
}
if (!$error)
{
$sql = "DELETE FROM ".MAIN_DB_PREFIX."projet_extrafields";
$sql .= " WHERE fk_object=".$this->id;
$resql = $this->db->query($sql);
if (!$resql)
{
$this->errors[] = $this->db->lasterror();
$error++;
}
}
if (empty($error)) {
// We remove directory