Skip to content
Snippets Groups Projects
Commit 9ae8b883 authored by Laurent Destailleur's avatar Laurent Destailleur
Browse files

Fix: Param of constructor must be only database handler

parent 8c103e09
Branches
Tags
No related merge requests found
...@@ -22,7 +22,7 @@ ...@@ -22,7 +22,7 @@
/** \file htdocs/fichinter/class/fichinter.class.php /** \file htdocs/fichinter/class/fichinter.class.php
* \ingroup ficheinter * \ingroup ficheinter
* \brief Fichier de la classe des gestion des fiches interventions * \brief Fichier de la classe des gestion des fiches interventions
* \version $Id: fichinter.class.php,v 1.20 2011/07/08 09:18:54 simnandez Exp $ * \version $Id: fichinter.class.php,v 1.21 2011/07/10 13:48:25 eldy Exp $
*/ */
require_once(DOL_DOCUMENT_ROOT ."/core/class/commonobject.class.php"); require_once(DOL_DOCUMENT_ROOT ."/core/class/commonobject.class.php");
...@@ -63,12 +63,10 @@ class Fichinter extends CommonObject ...@@ -63,12 +63,10 @@ class Fichinter extends CommonObject
/** /**
* Class constructor * Class constructor
* @param DB Data base handler access * @param DB Data base handler access
* @param socid Id society
*/ */
function Fichinter($DB, $socid="") function Fichinter($DB)
{ {
$this->db = $DB ; $this->db = $DB ;
$this->socid = $socid;
$this->products = array(); $this->products = array();
$this->fk_project = 0; $this->fk_project = 0;
$this->statut = 0; $this->statut = 0;
...@@ -298,7 +296,7 @@ class Fichinter extends CommonObject ...@@ -298,7 +296,7 @@ class Fichinter extends CommonObject
/** /**
* Validate a intervention * Validate a intervention
* @param user User that validate * @param user User that validate
* @param outputdir * @param outputdir
* @return int <0 if KO, >0 if OK * @return int <0 if KO, >0 if OK
*/ */
function setValid($user, $outputdir) function setValid($user, $outputdir)
......
...@@ -24,7 +24,7 @@ ...@@ -24,7 +24,7 @@
* \ingroup ficheinter * \ingroup ficheinter
* \brief Fichier contenant la classe mere de generation des fiches interventions en PDF * \brief Fichier contenant la classe mere de generation des fiches interventions en PDF
* et la classe mere de numerotation des fiches interventions * et la classe mere de numerotation des fiches interventions
* \version $Id$ * \version $Id: modules_fichinter.php,v 1.41 2011/07/10 13:48:25 eldy Exp $
*/ */
require_once(DOL_DOCUMENT_ROOT.'/lib/pdf.lib.php'); require_once(DOL_DOCUMENT_ROOT.'/lib/pdf.lib.php');
...@@ -172,10 +172,10 @@ function fichinter_create($db, $object, $modele='', $outputlangs='') ...@@ -172,10 +172,10 @@ function fichinter_create($db, $object, $modele='', $outputlangs='')
// Charge le modele // Charge le modele
$file = "pdf_".$modele.".modules.php"; $file = "pdf_".$modele.".modules.php";
// On verifie l'emplacement du modele // On verifie l'emplacement du modele
$file = dol_buildpath($dir.$file); $file = dol_buildpath($dir.$file);
if (file_exists($file)) if (file_exists($file))
{ {
$classname = "pdf_".$modele; $classname = "pdf_".$modele;
...@@ -220,7 +220,7 @@ function fichinter_delete_preview($db, $fichinterid, $fichinterref='') ...@@ -220,7 +220,7 @@ function fichinter_delete_preview($db, $fichinterid, $fichinterref='')
if (!$fichinterref) if (!$fichinterref)
{ {
$fichinter = new Fichinter($db,"",$fichinterid); $fichinter = new Fichinter($db);
$fichinter->fetch($fichinterid); $fichinter->fetch($fichinterid);
$fichinterref = $fichinter->ref; $fichinterref = $fichinter->ref;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment