Fix: Instantiate if not already done

This commit is contained in:
Laurent Destailleur 2012-03-02 19:36:43 +01:00
parent 034b0fc4d4
commit cb3104220e
8 changed files with 18 additions and 18 deletions

View File

@ -298,7 +298,7 @@ class pdf_edison extends ModelePDFCommandes
$pdf->Output($file,'F'); $pdf->Output($file,'F');
// Actions on extra fields (by external module or standard code) // Actions on extra fields (by external module or standard code)
if (is_object($hookmanager)) if (! is_object($hookmanager))
{ {
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'); include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($this->db); $hookmanager=new HookManager($this->db);

View File

@ -407,7 +407,7 @@ class pdf_einstein extends ModelePDFCommandes
$pdf->Output($file,'F'); $pdf->Output($file,'F');
// Actions on extra fields (by external module or standard code) // Actions on extra fields (by external module or standard code)
if (is_object($hookmanager)) if (! is_object($hookmanager))
{ {
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'); include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($this->db); $hookmanager=new HookManager($this->db);

View File

@ -412,7 +412,7 @@ class pdf_crabe extends ModelePDFFactures
$pdf->Output($file,'F'); $pdf->Output($file,'F');
// Add pdfgeneration hook // Add pdfgeneration hook
if (is_object($hookmanager)) if (! is_object($hookmanager))
{ {
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'); include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($this->db); $hookmanager=new HookManager($this->db);

View File

@ -300,7 +300,7 @@ class pdf_oursin extends ModelePDFFactures
$pdf->Output($file,'F'); $pdf->Output($file,'F');
// Actions on extra fields (by external module or standard code) // Actions on extra fields (by external module or standard code)
if (is_object($hookmanager)) if (! is_object($hookmanager))
{ {
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'); include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($this->db); $hookmanager=new HookManager($this->db);

View File

@ -393,7 +393,7 @@ class pdf_azur extends ModelePDFPropales
$pdf->Output($file,'F'); $pdf->Output($file,'F');
// Actions on extra fields (by external module or standard code) // Actions on extra fields (by external module or standard code)
if (is_object($hookmanager)) if (! is_object($hookmanager))
{ {
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'); include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($this->db); $hookmanager=new HookManager($this->db);

View File

@ -393,7 +393,7 @@ class pdf_jaune extends ModelePDFPropales
$pdf->Output($file,'F'); $pdf->Output($file,'F');
// Actions on extra fields (by external module or standard code) // Actions on extra fields (by external module or standard code)
if (is_object($hookmanager)) if (! is_object($hookmanager))
{ {
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'); include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($this->db); $hookmanager=new HookManager($this->db);

View File

@ -398,7 +398,7 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
$pdf->Output($file,'F'); $pdf->Output($file,'F');
// Actions on extra fields (by external module or standard code) // Actions on extra fields (by external module or standard code)
if (is_object($hookmanager)) if (! is_object($hookmanager))
{ {
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'); include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($this->db); $hookmanager=new HookManager($this->db);

View File

@ -406,7 +406,7 @@ class pdf_muscadet extends ModelePDFSuppliersOrders
// Add pdfgeneration hook // Add pdfgeneration hook
if (is_object($hookmanager)) if (! is_object($hookmanager))
{ {
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php'); include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
$hookmanager=new HookManager($this->db); $hookmanager=new HookManager($this->db);