|
@@ -634,6 +634,12 @@ class Partnership extends CommonObject
|
|
|
if (!$resql) {
|
|
|
$error++; $this->error = $this->db->lasterror();
|
|
|
}
|
|
|
+ $sql = 'UPDATE '.MAIN_DB_PREFIX."ecm_files set filepath = 'partnership/".$this->db->escape($this->newref)."'";
|
|
|
+ $sql .= " WHERE filepath = 'partnership/".$this->db->escape($this->ref)."' and entity = ".$conf->entity;
|
|
|
+ $resql = $this->db->query($sql);
|
|
|
+ if (!$resql) {
|
|
|
+ $error++; $this->error = $this->db->lasterror();
|
|
|
+ }
|
|
|
|
|
|
// We rename directory ($this->ref = old ref, $num = new ref) in order not to lose the attachments
|
|
|
$oldref = dol_sanitizeFileName($this->ref);
|
|
@@ -758,6 +764,12 @@ class Partnership extends CommonObject
|
|
|
if (!$resql) {
|
|
|
$error++; $this->error = $this->db->lasterror();
|
|
|
}
|
|
|
+ $sql = 'UPDATE '.MAIN_DB_PREFIX."ecm_files set filepath = 'partnership/".$this->db->escape($this->newref)."'";
|
|
|
+ $sql .= " WHERE filepath = 'partnership/".$this->db->escape($this->ref)."' and entity = ".$conf->entity;
|
|
|
+ $resql = $this->db->query($sql);
|
|
|
+ if (!$resql) {
|
|
|
+ $error++; $this->error = $this->db->lasterror();
|
|
|
+ }
|
|
|
|
|
|
// We rename directory ($this->ref = old ref, $num = new ref) in order not to lose the attachments
|
|
|
$oldref = dol_sanitizeFileName($this->ref);
|