2
0
forked from Wavyzz/dolibarr

Fix travis

This commit is contained in:
Laurent Destailleur
2019-07-29 10:51:17 +02:00
parent 79bb9d951f
commit a5e3adc6f1
13 changed files with 26 additions and 26 deletions

View File

@@ -644,8 +644,8 @@ class Reception extends CommonObject
if (preg_match('/^[\(]?PROV/i', $this->ref))
{
// Now we rename also files into index
$sql = 'UPDATE '.MAIN_DB_PREFIX."ecm_files set filename = CONCAT('".$this->newref."', SUBSTR(filename, ".(strlen($this->ref)+1).")), filepath = 'reception/".$this->newref."'";
$sql.= " WHERE filename LIKE '".$this->ref."%' AND filepath = 'reception/".$this->ref."' and entity = ".$conf->entity;
$sql = 'UPDATE '.MAIN_DB_PREFIX."ecm_files set filename = CONCAT('".$this->db->escape($this->newref)."', SUBSTR(filename, ".(strlen($this->ref)+1).")), filepath = 'reception/".$this->db->escape($this->newref)."'";
$sql.= " WHERE filename LIKE '".$this->db->escape($this-ref)."%' AND filepath = 'reception/".$this->db->escape($this-ref)."' and entity = ".$conf->entity;
$resql = $this->db->query($sql);
if (! $resql) { $error++; $this->error = $this->db->lasterror(); }