diff --git a/ChangeLog b/ChangeLog index 53282d1c1d3..60aa376f96d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -12,7 +12,8 @@ NEW: Module Reception (for a more accurate management of your receptions) moved WARNING: Following changes may create regressions for some external modules, but were necessary to make Dolibarr better: -* Properties ->contactid has been renamed into ->contact_id +* Properties ->contactid have been renamed into ->contact_id +* Properties ->titre have been renamed into ->title * Property $paiementid in API 'api_supplier_invoices.php' has been renamed into into $payment_mode_id (english) * The deprecated subsitution key __SIGNATURE__ has been removed. Replace with __USER_SIGNATURE__ if you used the old syntax in your email templates. diff --git a/htdocs/comm/mailing/advtargetemailing.php b/htdocs/comm/mailing/advtargetemailing.php index 29b06819e9e..64e7df053ea 100644 --- a/htdocs/comm/mailing/advtargetemailing.php +++ b/htdocs/comm/mailing/advtargetemailing.php @@ -426,7 +426,7 @@ if ($object->fetch($id) >= 0) { print $form->showrefnav($object, 'id', $linkback); print ''; - print '
| '.$langs->trans("MailTitle").' | '.$object->titre.' | |||||||
| '.$langs->trans("MailTitle").' | '.$object->title.' | |||||||
| '.$langs->trans("MailFrom").' | '; $emailarray = CMailFile::getArrayAddress($object->email_from); diff --git a/htdocs/comm/mailing/class/mailing.class.php b/htdocs/comm/mailing/class/mailing.class.php index 1bb4864876c..704d0892ab5 100644 --- a/htdocs/comm/mailing/class/mailing.class.php +++ b/htdocs/comm/mailing/class/mailing.class.php @@ -46,7 +46,7 @@ class Mailing extends CommonObject */ public $picto = 'email'; - public $titre; + public $title; public $sujet; public $body; public $nbemail; @@ -115,7 +115,7 @@ class Mailing extends CommonObject $this->db->begin(); - $this->titre = trim($this->titre); + $this->title = trim($this->title); $this->email_from = trim($this->email_from); if (!$this->email_from) @@ -130,9 +130,9 @@ class Mailing extends CommonObject $sql .= " (date_creat, fk_user_creat, entity)"; $sql .= " VALUES ('".$this->db->idate($now)."', ".$user->id.", ".$conf->entity.")"; - if (!$this->titre) + if (!$this->title) { - $this->titre = $langs->trans("NoTitle"); + $this->title = $langs->trans("NoTitle"); } dol_syslog("Mailing::Create", LOG_DEBUG); @@ -167,7 +167,7 @@ class Mailing extends CommonObject public function update($user) { $sql = "UPDATE ".MAIN_DB_PREFIX."mailing "; - $sql .= " SET titre = '".$this->db->escape($this->titre)."'"; + $sql .= " SET titre = '".$this->db->escape($this->title)."'"; $sql .= ", sujet = '".$this->db->escape($this->sujet)."'"; $sql .= ", body = '".$this->db->escape($this->body)."'"; $sql .= ", email_from = '".$this->db->escape($this->email_from)."'"; @@ -198,7 +198,7 @@ class Mailing extends CommonObject { global $conf; - $sql = "SELECT m.rowid, m.titre, m.sujet, m.body, m.bgcolor, m.bgimage"; + $sql = "SELECT m.rowid, m.titre as title, m.sujet, m.body, m.bgcolor, m.bgimage"; $sql .= ", m.email_from, m.email_replyto, m.email_errorsto"; $sql .= ", m.statut, m.nbemail"; $sql .= ", m.fk_user_creat, m.fk_user_valid"; @@ -221,7 +221,7 @@ class Mailing extends CommonObject $this->ref = $obj->rowid; $this->statut = $obj->statut; $this->nbemail = $obj->nbemail; - $this->titre = $obj->titre; + $this->title = $obj->title; $this->sujet = $obj->sujet; if (!empty($conf->global->FCKEDITOR_ENABLE_MAILING) && dol_textishtml(dol_html_entity_decode($obj->body, ENT_COMPAT | ENT_HTML401))) { @@ -283,7 +283,7 @@ class Mailing extends CommonObject $object->statut = 0; // Clear fields - $object->titre = $langs->trans("CopyOf").' '.$object->titre.' '.dol_print_date(dol_now()); + $object->title = $langs->trans("CopyOf").' '.$object->title.' '.dol_print_date(dol_now()); // If no option copy content if (empty($option1)) diff --git a/htdocs/comm/mailing/index.php b/htdocs/comm/mailing/index.php index cf439e4314b..ddcdaabf14e 100644 --- a/htdocs/comm/mailing/index.php +++ b/htdocs/comm/mailing/index.php @@ -182,7 +182,7 @@ if ($result) { print ' | |||||||
| '.$mailstatic->getNomUrl(1).' | '; - print ''.dol_trunc($obj->titre, 38).' | '; + print ''.dol_trunc($obj->title, 38).' | '; print ''.dol_print_date($db->jdate($obj->date_creat), 'day').' | '; print ''.($obj->nbemail ? $obj->nbemail : "0").' | '; print ''.$mailstatic->LibStatut($obj->statut, 5).' | '; diff --git a/htdocs/comm/mailing/list.php b/htdocs/comm/mailing/list.php index d22dd130507..525064942a6 100644 --- a/htdocs/comm/mailing/list.php +++ b/htdocs/comm/mailing/list.php @@ -238,7 +238,7 @@ if ($resql) print $email->getNomUrl(1); print ''; - print ''.$obj->titre.' | '; + print ''.$obj->title.' | '; // Date creation print '';
diff --git a/htdocs/compta/facture/card-rec.php b/htdocs/compta/facture/card-rec.php
index 113068c447c..3ab212a62bd 100644
--- a/htdocs/compta/facture/card-rec.php
+++ b/htdocs/compta/facture/card-rec.php
@@ -188,8 +188,8 @@ if (empty($reshook))
if (!$error)
{
- $object->titre = GETPOST('titre', 'nohtml'); // deprecated
- $object->title = GETPOST('titre', 'nohtml');
+ $object->titre = GETPOST('title', 'nohtml'); // deprecated
+ $object->title = GETPOST('title', 'nohtml');
$object->note_private = GETPOST('note_private', 'restricthtml');
$object->note_public = GETPOST('note_public', 'restricthtml');
$object->model_pdf = GETPOST('modelpdf', 'alpha');
diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php
index c288251f56a..d1a6abcdec3 100644
--- a/htdocs/compta/facture/class/facture-rec.class.php
+++ b/htdocs/compta/facture/class/facture-rec.class.php
@@ -74,6 +74,11 @@ class FactureRec extends CommonInvoice
*/
protected $table_ref_field = 'titre';
+ /**
+ * @var string The label of recurring invoice
+ */
+ public $title;
+
public $number;
public $date;
public $remise;
diff --git a/htdocs/core/class/html.formprojet.class.php b/htdocs/core/class/html.formprojet.class.php
index 6fad72862c7..058706edce7 100644
--- a/htdocs/core/class/html.formprojet.class.php
+++ b/htdocs/core/class/html.formprojet.class.php
@@ -170,7 +170,7 @@ class FormProjets
if (empty($conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY)) $sql .= " AND (p.fk_soc=".$socid." OR p.fk_soc IS NULL)";
elseif ($conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY != 'all') // PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY is 'all' or a list of ids separated by coma.
{
- $sql .= " AND (p.fk_soc IN (".$socid.", ".$conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY.") OR p.fk_soc IS NULL)";
+ $sql .= " AND (p.fk_soc IN (".$socid.", ".((int) $conf->global->PROJECT_ALLOW_TO_LINK_FROM_OTHER_COMPANY).") OR p.fk_soc IS NULL)";
}
}
if (!empty($filterkey)) $sql .= natural_search(array('p.title', 'p.ref'), $filterkey);
diff --git a/htdocs/fichinter/class/fichinterrec.class.php b/htdocs/fichinter/class/fichinterrec.class.php
index 818c1763786..c9e689ffd4c 100644
--- a/htdocs/fichinter/class/fichinterrec.class.php
+++ b/htdocs/fichinter/class/fichinterrec.class.php
@@ -250,12 +250,11 @@ class FichinterRec extends Fichinter
*/
public function fetch($rowid = 0, $ref = '', $ref_ext = '')
{
- $sql = 'SELECT f.titre, f.fk_soc';
+ $sql = 'SELECT f.titre as title, f.fk_soc';
$sql .= ', f.datec, f.duree, f.fk_projet, f.fk_contrat, f.description';
$sql .= ', f.note_private, f.note_public, f.fk_user_author';
$sql .= ', f.frequency, f.unit_frequency, f.date_when, f.date_last_gen, f.nb_gen_done, f.nb_gen_max, f.auto_validate';
$sql .= ', f.note_private, f.note_public, f.fk_user_author';
-
$sql .= ' FROM '.MAIN_DB_PREFIX.'fichinter_rec as f';
if ($rowid > 0) $sql .= ' WHERE f.rowid='.$rowid;
elseif ($ref) $sql .= " WHERE f.titre='".$this->db->escape($ref)."'";
@@ -268,8 +267,9 @@ class FichinterRec extends Fichinter
$obj = $this->db->fetch_object($result);
$this->id = $rowid;
- $this->titre = $obj->titre;
- $this->ref = $obj->titre;
+ $this->titre = $obj->title;
+ $this->title = $obj->title;
+ $this->ref = $obj->title;
$this->description = $obj->description;
$this->datec = $obj->datec;
$this->duration = $obj->duree;
diff --git a/htdocs/projet/ajax/projects.php b/htdocs/projet/ajax/projects.php
index cbc223f8525..3491ae1e166 100644
--- a/htdocs/projet/ajax/projects.php
+++ b/htdocs/projet/ajax/projects.php
@@ -1,8 +1,8 @@
* Copyright (C) 2005-2013 Regis Houssin |