diff --git a/htdocs/bom/bom_card.php b/htdocs/bom/bom_card.php index d4d68dd1c02..9d45b8e86f8 100644 --- a/htdocs/bom/bom_card.php +++ b/htdocs/bom/bom_card.php @@ -118,11 +118,11 @@ if (empty($reshook)) $error=0; $permissiontoadd = $user->rights->bom->write; - $permissiontodelete = $user->rights->bom->delete || ($permissiontoadd && $object->status == 0); + $permissiontodelete = $user->rights->bom->delete || ($permissiontoadd && $object->status == 0); $backurlforlist = dol_buildpath('/bom/bom_list.php', 1); - if (empty($backtopage)) { - if (empty($id)) $backtopage = $backurlforlist; - else $backtopage = dol_buildpath('/bom/bom_card.php', 1).($id > 0 ? $id : '__ID__'); + if (empty($backtopage)) { + if (empty($id)) $backtopage = $backurlforlist; + else $backtopage = dol_buildpath('/bom/bom_card.php', 1).($id > 0 ? $id : '__ID__'); } $triggermodname = 'BILLOFMATERIALS_BILLOFMATERIALS_MODIFY'; // Name of trigger action code to execute when we modify record diff --git a/htdocs/comm/propal/class/propal.class.php b/htdocs/comm/propal/class/propal.class.php index f660fd3c533..37f6b2bd3f5 100644 --- a/htdocs/comm/propal/class/propal.class.php +++ b/htdocs/comm/propal/class/propal.class.php @@ -1357,7 +1357,7 @@ dol_syslog(get_class($this)."::updateLine rowid=$rowid, pu=$pu, qty=$qty, remise $sql.= ", p.date_livraison as date_livraison"; $sql.= ", p.model_pdf, p.last_main_doc, p.ref_client, p.extraparams"; $sql.= ", p.note_private, p.note_public"; - $sql.= ", p.fk_projet, p.fk_statut"; + $sql.= ", p.fk_projet as fk_project, p.fk_statut"; $sql.= ", p.fk_user_author, p.fk_user_valid, p.fk_user_cloture"; $sql.= ", p.fk_delivery_address"; $sql.= ", p.fk_availability"; @@ -1412,7 +1412,7 @@ dol_syslog(get_class($this)."::updateLine rowid=$rowid, pu=$pu, qty=$qty, remise $this->total_localtax2 = $obj->localtax2; $this->total_ttc = $obj->total; $this->socid = $obj->fk_soc; - $this->fk_project = $obj->fk_projet; + $this->fk_project = $obj->fk_project; $this->modelpdf = $obj->model_pdf; $this->last_main_doc = $obj->last_main_doc; $this->note = $obj->note_private; // TODO deprecated diff --git a/htdocs/compta/deplacement/class/deplacement.class.php b/htdocs/compta/deplacement/class/deplacement.class.php index 5f52246432b..ae1360ff633 100644 --- a/htdocs/compta/deplacement/class/deplacement.class.php +++ b/htdocs/compta/deplacement/class/deplacement.class.php @@ -247,7 +247,7 @@ class Deplacement extends CommonObject */ public function fetch($id, $ref = '') { - $sql = "SELECT rowid, fk_user, type, fk_statut, km, fk_soc, dated, note_private, note_public, fk_projet, extraparams"; + $sql = "SELECT rowid, fk_user, type, fk_statut, km, fk_soc, dated, note_private, note_public, fk_projet as fk_project, extraparams"; $sql.= " FROM ".MAIN_DB_PREFIX."deplacement"; $sql.= " WHERE entity IN (".getEntity('deplacement').")"; if ($ref) $sql.= " AND ref ='".$this->db->escape($ref)."'"; @@ -269,7 +269,7 @@ class Deplacement extends CommonObject $this->statut = $obj->fk_statut; $this->note_private = $obj->note_private; $this->note_public = $obj->note_public; - $this->fk_project = $obj->fk_projet; + $this->fk_project = $obj->fk_project; $this->extraparams = (array) json_decode($obj->extraparams, true); diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index 47e91459b8e..08f75f1e28e 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -1159,30 +1159,6 @@ class Facture extends CommonInvoice else return -1; } - /** - * Return link to download file from a direct external access - * - * @param int $withpicto Add download picto into link - * @return string HTML link to file - */ - function getDirectExternalLink($withpicto = 0) - { - global $dolibarr_main_url_root; - - // Define $urlwithroot - $urlwithouturlroot=preg_replace('/'.preg_quote(DOL_URL_ROOT, '/').'$/i', '', trim($dolibarr_main_url_root)); - $urlwithroot=$urlwithouturlroot.DOL_URL_ROOT; // This is to use external domain name found into config file - //$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current - - // TODO Read into ecmfile table to get entry and hash exists (PS: If not found, add it) - include_once DOL_DOCUMENT_ROOT.'/ecm/class/ecmfiles.class.php'; - $ecmfile=new EcmFiles($this->db); - //$result = $ecmfile->get(); - - $hashp='todo'; - return ''.$this->ref.''; - } - /** * Return clicable link of object (with eventually picto) * diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 405cfeca0b4..ea7879db05e 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -621,7 +621,7 @@ class Contrat extends CommonObject $sql.= " ref_ext,"; $sql.= " fk_user_mise_en_service, date_contrat as datecontrat,"; $sql.= " fk_user_author, fin_validite, date_cloture,"; - $sql.= " fk_projet,"; + $sql.= " fk_projet as fk_project,"; $sql.= " fk_commercial_signature, fk_commercial_suivi,"; $sql.= " note_private, note_public, model_pdf, extraparams"; $sql.= " FROM ".MAIN_DB_PREFIX."contrat"; @@ -672,8 +672,8 @@ class Contrat extends CommonObject $this->note_public = $obj->note_public; $this->modelpdf = $obj->model_pdf; - $this->fk_projet = $obj->fk_projet; // deprecated - $this->fk_project = $obj->fk_projet; + $this->fk_projet = $obj->fk_project; // deprecated + $this->fk_project = $obj->fk_project; $this->socid = $obj->fk_soc; $this->fk_soc = $obj->fk_soc; diff --git a/htdocs/core/class/emailsenderprofile.class.php b/htdocs/core/class/emailsenderprofile.class.php index 5c9797a2407..63172d17566 100644 --- a/htdocs/core/class/emailsenderprofile.class.php +++ b/htdocs/core/class/emailsenderprofile.class.php @@ -303,17 +303,6 @@ class EmailSenderProfile extends CommonObject return $result; } - /** - * Return link to download file from a direct external access - * - * @param int $withpicto Add download picto into link - * @return string HTML link to file - */ - function getDirectExternalLink($withpicto = 0) - { - return 'todo'; - } - /** * Retourne le libelle du status d'un user (actif, inactif) * diff --git a/htdocs/expedition/class/expedition.class.php b/htdocs/expedition/class/expedition.class.php index 169511fe160..afb1469da26 100644 --- a/htdocs/expedition/class/expedition.class.php +++ b/htdocs/expedition/class/expedition.class.php @@ -527,7 +527,7 @@ class Expedition extends CommonObject // Check parameters if (empty($id) && empty($ref) && empty($ref_ext) && empty($ref_int)) return -1; - $sql = "SELECT e.rowid, e.ref, e.fk_soc as socid, e.date_creation, e.ref_customer, e.ref_ext, e.ref_int, e.fk_user_author, e.fk_statut, e.fk_projet, e.billed"; + $sql = "SELECT e.rowid, e.ref, e.fk_soc as socid, e.date_creation, e.ref_customer, e.ref_ext, e.ref_int, e.fk_user_author, e.fk_statut, e.fk_projet as fk_project, e.billed"; $sql.= ", e.weight, e.weight_units, e.size, e.size_units, e.width, e.height"; $sql.= ", e.date_expedition as date_expedition, e.model_pdf, e.fk_address, e.date_delivery"; $sql.= ", e.fk_shipping_method, e.tracking_number"; @@ -575,7 +575,7 @@ class Expedition extends CommonObject $this->origin = ($obj->origin?$obj->origin:'commande'); // For compatibility $this->origin_id = $obj->origin_id; $this->billed = $obj->billed; - $this->fk_project = $obj->fk_projet; + $this->fk_project = $obj->fk_project; $this->trueWeight = $obj->weight; $this->weight_units = $obj->weight_units; diff --git a/htdocs/fichinter/class/fichinter.class.php b/htdocs/fichinter/class/fichinter.class.php index e2caa591ad6..43cd79bfe70 100644 --- a/htdocs/fichinter/class/fichinter.class.php +++ b/htdocs/fichinter/class/fichinter.class.php @@ -379,7 +379,7 @@ class Fichinter extends CommonObject $sql.= " f.datec, f.dateo, f.datee, f.datet, f.fk_user_author,"; $sql.= " f.date_valid as datev,"; $sql.= " f.tms as datem,"; - $sql.= " f.duree, f.fk_projet, f.note_public, f.note_private, f.model_pdf, f.extraparams, fk_contrat"; + $sql.= " f.duree, f.fk_projet as fk_project, f.note_public, f.note_private, f.model_pdf, f.extraparams, fk_contrat"; $sql.= " FROM ".MAIN_DB_PREFIX."fichinter as f"; if ($ref) { $sql.= " WHERE f.entity IN (".getEntity('intervention').")"; @@ -407,8 +407,8 @@ class Fichinter extends CommonObject $this->datet = $this->db->jdate($obj->datet); $this->datev = $this->db->jdate($obj->datev); $this->datem = $this->db->jdate($obj->datem); - $this->fk_project = $obj->fk_projet; - $this->note_public = $obj->note_public; + $this->fk_project = $obj->fk_project; + $this->note_public = $obj->note_public; $this->note_private = $obj->note_private; $this->modelpdf = $obj->model_pdf; $this->fk_contrat = $obj->fk_contrat; diff --git a/htdocs/install/upgrade2.php b/htdocs/install/upgrade2.php index 1229ace57ee..2fa5fad38ac 100644 --- a/htdocs/install/upgrade2.php +++ b/htdocs/install/upgrade2.php @@ -2846,7 +2846,7 @@ function migrate_project_task_actors($db, $langs, $conf) $db->begin(); - $sql = "SELECT fk_projet_task, fk_user FROM ".MAIN_DB_PREFIX."projet_task_actors"; + $sql = "SELECT fk_projet_task as fk_project_task, fk_user FROM ".MAIN_DB_PREFIX."projet_task_actors"; $resql = $db->query($sql); if ($resql) { @@ -2868,7 +2868,7 @@ function migrate_project_task_actors($db, $langs, $conf) $sql2.= ") VALUES ("; $sql2.= "'".$db->idate(dol_now())."'"; $sql2.= ", '4'"; - $sql2.= ", ".$obj->fk_projet_task; + $sql2.= ", ".$obj->fk_project_task; $sql2.= ", '180'"; $sql2.= ", ".$obj->fk_user; $sql2.= ")"; diff --git a/htdocs/projet/class/task.class.php b/htdocs/projet/class/task.class.php index f0797f3f5b2..a1211ead4ee 100644 --- a/htdocs/projet/class/task.class.php +++ b/htdocs/projet/class/task.class.php @@ -238,7 +238,7 @@ class Task extends CommonObject $sql = "SELECT"; $sql.= " t.rowid,"; $sql.= " t.ref,"; - $sql.= " t.fk_projet,"; + $sql.= " t.fk_projet as fk_project,"; $sql.= " t.fk_task_parent,"; $sql.= " t.label,"; $sql.= " t.description,"; @@ -281,7 +281,7 @@ class Task extends CommonObject $this->id = $obj->rowid; $this->ref = $obj->ref; - $this->fk_project = $obj->fk_projet; + $this->fk_project = $obj->fk_project; $this->fk_task_parent = $obj->fk_task_parent; $this->label = $obj->label; $this->description = $obj->description; diff --git a/htdocs/public/payment/newpayment.php b/htdocs/public/payment/newpayment.php index 6166aae1e8a..8f4d1de13f4 100644 --- a/htdocs/public/payment/newpayment.php +++ b/htdocs/public/payment/newpayment.php @@ -838,6 +838,7 @@ if ($source == 'order') // Debitor print '