Update project.class.php
Fix order of delete extra prev table of project
This commit is contained in:
parent
fd617658ef
commit
ca66eac76c
@ -747,7 +747,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)
|
||||
@ -763,18 +774,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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user