From c81c744aaf078321d9f6e47d0f25469a4605fc06 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 21 Apr 2018 13:14:58 +0200 Subject: [PATCH] Clean deprecated var --- htdocs/comm/action/list.php | 2 +- .../facture/class/facture-rec.class.php | 3 ++- htdocs/compta/facture/class/facture.class.php | 1 + htdocs/contrat/class/contrat.class.php | 21 +++++++------------ 4 files changed, 11 insertions(+), 16 deletions(-) diff --git a/htdocs/comm/action/list.php b/htdocs/comm/action/list.php index deb81238c54..ed8a27f2d3d 100644 --- a/htdocs/comm/action/list.php +++ b/htdocs/comm/action/list.php @@ -64,7 +64,7 @@ $dateend=dol_mktime(0, 0, 0, GETPOST('dateendmonth','int'), GETPOST('dateendday' if ($status == '' && ! isset($_GET['status']) && ! isset($_POST['status'])) $status=(empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS)?'':$conf->global->AGENDA_DEFAULT_FILTER_STATUS); if (empty($action) && ! isset($_GET['action']) && ! isset($_POST['action'])) $action=(empty($conf->global->AGENDA_DEFAULT_VIEW)?'show_month':$conf->global->AGENDA_DEFAULT_VIEW); -$filter = GETPOST("filter",'',3); +$filter = GETPOST("filter",'alpha',3); $filtert = GETPOST("filtert","int",3); $usergroup = GETPOST("usergroup","int",3); $showbirthday = empty($conf->use_javascript_ajax)?GETPOST("showbirthday","int"):1; diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php index 5a4360e327c..c3ece4a2ee5 100644 --- a/htdocs/compta/facture/class/facture-rec.class.php +++ b/htdocs/compta/facture/class/facture-rec.class.php @@ -475,7 +475,6 @@ class FactureRec extends CommonInvoice $line->id = $objp->rowid; $line->rowid = $objp->rowid; - $line->label = $objp->custom_label; // Label line $line->desc = $objp->description; // Description line $line->description = $objp->description; // Description line $line->product_type = $objp->product_type; // Type of line @@ -488,6 +487,8 @@ class FactureRec extends CommonInvoice $line->qty = $objp->qty; $line->subprice = $objp->subprice; + $line->label = $objp->custom_label; // @deprecated + $line->vat_src_code = $objp->vat_src_code; $line->tva_tx = $objp->tva_tx; $line->localtax1_tx = $objp->localtax1_tx; diff --git a/htdocs/compta/facture/class/facture.class.php b/htdocs/compta/facture/class/facture.class.php index ebb99385b64..89f9055a776 100644 --- a/htdocs/compta/facture/class/facture.class.php +++ b/htdocs/compta/facture/class/facture.class.php @@ -2565,6 +2565,7 @@ class Facture extends CommonInvoice // Deprecation warning if ($label) { dol_syslog(__METHOD__ . ": using line label is deprecated", LOG_WARNING); + //var_dump(debug_backtrace(false));exit; } global $mysoc, $conf, $langs; diff --git a/htdocs/contrat/class/contrat.class.php b/htdocs/contrat/class/contrat.class.php index 215dc185ac4..20f03162d13 100644 --- a/htdocs/contrat/class/contrat.class.php +++ b/htdocs/contrat/class/contrat.class.php @@ -767,17 +767,7 @@ class Contrat extends CommonObject $line->fk_user_cloture = $objp->fk_user_cloture; $line->fk_unit = $objp->fk_unit; - $line->ref = $objp->product_ref; // deprecated - if (empty($objp->fk_product)) - { - $line->label = ''; // deprecated - $line->libelle = $objp->description; // deprecated - } - else - { - $line->label = $objp->product_label; // deprecated - $line->libelle = $objp->product_label; // deprecated - } + $line->ref = $objp->product_ref; // deprecated $line->product_ref = $objp->product_ref; // Ref product $line->product_desc = $objp->product_desc; // Description product $line->product_label = $objp->product_label; // Label product @@ -2459,12 +2449,15 @@ class ContratLigne extends CommonObjectLine var $fk_contrat; var $fk_product; var $statut; // 0 inactive, 4 active, 5 closed - var $type; // 0 for product, 1 for service + var $type; // 0 for product, 1 for service + /** + * @var string + * @deprecated + */ var $label; /** * @var string - * @deprecated Use $label instead - * @see label + * @deprecated */ public $libelle;