From 768ef73f49b2844f3907bd08df6ecf55769cd534 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Mon, 4 Jan 2016 14:43:38 +0100 Subject: [PATCH 01/22] Parameters harmonization of hook execute call --- .../doc/doc_generic_supplier_proposal_odt.modules.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php index a19e634f6cd..2c25f9a74a1 100644 --- a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php @@ -373,7 +373,7 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal $tmparray = array_merge($array_user,$array_soc,$array_thirdparty,$array_objet,$array_other); complete_substitutions_array($tmparray, $outputlangs, $object); // Call the ODTSubstitution hook - $parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); + $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); $reshook=$hookmanager->executeHooks('ODTSubstitution',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks foreach($tmparray as $key=>$value) { @@ -440,7 +440,7 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal } // Call the beforeODTSave hook - $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs); + $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); $reshook=$hookmanager->executeHooks('beforeODTSave',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks // Write new file @@ -460,7 +460,7 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal return -1; } } - + $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); $reshook=$hookmanager->executeHooks('afterODTCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks if (! empty($conf->global->MAIN_UMASK)) From 66834df34c936f8d0e2469cbd6dffcc103a8d870 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Mon, 4 Jan 2016 14:47:47 +0100 Subject: [PATCH 02/22] Update doc_generic_order_odt.modules.php --- .../modules/commande/doc/doc_generic_order_odt.modules.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php index 61aba27a6b8..f22e695fe57 100644 --- a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php +++ b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php @@ -339,7 +339,8 @@ class doc_generic_order_odt extends ModelePDFCommandes $tmparray = array_merge($array_user,$array_soc,$array_thirdparty,$array_objet,$array_other); complete_substitutions_array($tmparray, $outputlangs, $object); // Call the ODTSubstitution hook - $parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); + + $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); $reshook=$hookmanager->executeHooks('ODTSubstitution',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks foreach($tmparray as $key=>$value) @@ -407,7 +408,8 @@ class doc_generic_order_odt extends ModelePDFCommandes } // Call the beforeODTSave hook - $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs); + + $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); $reshook=$hookmanager->executeHooks('beforeODTSave',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks // Write new file @@ -428,6 +430,7 @@ class doc_generic_order_odt extends ModelePDFCommandes } } + $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); $reshook=$hookmanager->executeHooks('afterODTCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks if (! empty($conf->global->MAIN_UMASK)) From 88912b29d9b50b5e578949f368f42e961d98d87c Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Mon, 4 Jan 2016 14:51:15 +0100 Subject: [PATCH 03/22] Update doc_generic_shipment_odt.modules.php --- .../expedition/doc/doc_generic_shipment_odt.modules.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php index aaddbc1d748..4e6d7bcfec5 100644 --- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php +++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php @@ -394,7 +394,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition $tmparray=$this->get_substitutionarray_shipment($object,$outputlangs); complete_substitutions_array($tmparray, $outputlangs, $object); // Call the ODTSubstitution hook - $parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); + $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); $reshook=$hookmanager->executeHooks('ODTSubstitution',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks foreach($tmparray as $key=>$value) { @@ -461,7 +461,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition } // Call the beforeODTSave hook - $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs); + $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); $reshook=$hookmanager->executeHooks('beforeODTSave',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks // Write new file @@ -481,7 +481,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition return -1; } } - + $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); $reshook=$hookmanager->executeHooks('afterODTCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks if (! empty($conf->global->MAIN_UMASK)) From e41fe61ab065c25f50863730574141054440a662 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Mon, 4 Jan 2016 14:53:28 +0100 Subject: [PATCH 04/22] Update doc_generic_invoice_odt.modules.php --- .../modules/facture/doc/doc_generic_invoice_odt.modules.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php index 542f53c24b7..5fbf1dd9f51 100644 --- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php +++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php @@ -356,7 +356,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures $tmparray = array_merge($array_user,$array_soc,$array_thirdparty,$array_objet,$array_propal,$array_other,$array_thirdparty_contact); complete_substitutions_array($tmparray, $outputlangs, $object); // Call the ODTSubstitution hook - $parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); + $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); $reshook=$hookmanager->executeHooks('ODTSubstitution',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks //var_dump($tmparray); exit; @@ -426,7 +426,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures } // Call the beforeODTSave hook - $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs); + $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); $reshook=$hookmanager->executeHooks('beforeODTSave',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks // Write new file @@ -446,7 +446,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures return -1; } } - + $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); $reshook=$hookmanager->executeHooks('afterODTCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks if (! empty($conf->global->MAIN_UMASK)) From f4953a3a6ed4c547452554d9a7fc6997d2364064 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Mon, 4 Jan 2016 14:55:53 +0100 Subject: [PATCH 05/22] Update doc_generic_project_odt.modules.php --- .../modules/project/doc/doc_generic_project_odt.modules.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php index 6e2601797f8..fbb43657d89 100644 --- a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php +++ b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php @@ -509,7 +509,7 @@ class doc_generic_project_odt extends ModelePDFProjects $tmparray = array_merge($array_user,$array_soc,$array_thirdparty,$array_objet,$array_other); complete_substitutions_array($tmparray, $outputlangs, $object); // Call the ODTSubstitution hook - $parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); + $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); $reshook=$hookmanager->executeHooks('ODTSubstitution',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks foreach($tmparray as $key=>$value) { @@ -956,7 +956,7 @@ class doc_generic_project_odt extends ModelePDFProjects } // Call the beforeODTSave hook - $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs); + $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); $reshook=$hookmanager->executeHooks('beforeODTSave',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks @@ -977,7 +977,7 @@ class doc_generic_project_odt extends ModelePDFProjects return -1; } } - + $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); $reshook=$hookmanager->executeHooks('afterODTCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks if (! empty($conf->global->MAIN_UMASK)) From b308baaf2716c857105130560498e02762a95c0f Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Mon, 4 Jan 2016 14:58:57 +0100 Subject: [PATCH 06/22] Update doc_generic_task_odt.modules.php --- .../modules/project/task/doc/doc_generic_task_odt.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php index 31172a32f43..b155c6e6071 100644 --- a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php +++ b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php @@ -775,7 +775,7 @@ class doc_generic_task_odt extends ModelePDFTask // Call the beforeODTSave hook - $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs); + $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); $reshook=$hookmanager->executeHooks('beforeODTSave',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks @@ -796,7 +796,7 @@ class doc_generic_task_odt extends ModelePDFTask return -1; } } - + $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); $reshook=$hookmanager->executeHooks('afterODTCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks if (! empty($conf->global->MAIN_UMASK)) From a4d24a04a7aea44caafb0e0a256c4f3dc851e479 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Mon, 4 Jan 2016 15:00:46 +0100 Subject: [PATCH 07/22] Update doc_generic_proposal_odt.modules.php --- .../propale/doc/doc_generic_proposal_odt.modules.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php index d6773eb2c80..c51c21f8f8c 100644 --- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php +++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php @@ -380,7 +380,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales $tmparray = array_merge($array_user,$array_soc,$array_thirdparty,$array_objet,$array_other,$array_thirdparty_contact); complete_substitutions_array($tmparray, $outputlangs, $object); // Call the ODTSubstitution hook - $parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); + $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); $reshook=$hookmanager->executeHooks('ODTSubstitution',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks foreach($tmparray as $key=>$value) { @@ -447,7 +447,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales } // Call the beforeODTSave hook - $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs); + $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); $reshook=$hookmanager->executeHooks('beforeODTSave',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks // Write new file @@ -467,7 +467,7 @@ class doc_generic_proposal_odt extends ModelePDFPropales return -1; } } - + $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); $reshook=$hookmanager->executeHooks('afterODTCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks if (! empty($conf->global->MAIN_UMASK)) From 2f56df4899be40382a3e912a479c0a00ea738494 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Mon, 4 Jan 2016 15:03:05 +0100 Subject: [PATCH 08/22] Update doc_generic_odt.modules.php --- .../modules/societe/doc/doc_generic_odt.modules.php | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php index 8a274f91ac7..5e0cb9be899 100644 --- a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php +++ b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php @@ -355,12 +355,12 @@ class doc_generic_odt extends ModeleThirdPartyDoc } // Make substitutions into odt of thirdparty + external modules - $tmparray=$this->get_substitutionarray_thirdparty($object,$outputlangs); + $tmparray=$this->get_substitutionarray_thirdparty($object,$outputlangs); complete_substitutions_array($tmparray, $outputlangs, $object); // Call the ODTSubstitution hook - $parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); - $reshook=$hookmanager->executeHooks('ODTSubstitution',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks + $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); + $reshook=$hookmanager->executeHooks('ODTSubstitution',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks // Replace variables into document foreach($tmparray as $key=>$value) @@ -395,7 +395,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc } // Call the beforeODTSave hook - $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs); + $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); $reshook=$hookmanager->executeHooks('beforeODTSave',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks // Write new file @@ -425,7 +425,7 @@ class doc_generic_odt extends ModeleThirdPartyDoc return -1; } } - + $parameters=array('odfHandler'=>&$odfHandler,'file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); $reshook=$hookmanager->executeHooks('afterODTCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks if (! empty($conf->global->MAIN_UMASK)) From 99f3df612855709bc8f3f9e1a755199b1f794d70 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Mon, 4 Jan 2016 15:06:28 +0100 Subject: [PATCH 09/22] Update doc_generic_order_odt.modules.php --- .../core/modules/commande/doc/doc_generic_order_odt.modules.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php index f22e695fe57..305b7e18161 100644 --- a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php +++ b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php @@ -2,6 +2,7 @@ /* Copyright (C) 2010-2012 Laurent Destailleur * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2014 Marcos García + * Copyright (C) 2016 Charlie Benke * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by From 11bef2d044d306ada73248c5b0a91df1202e2296 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Mon, 4 Jan 2016 15:06:50 +0100 Subject: [PATCH 10/22] Update doc_generic_shipment_odt.modules.php --- .../modules/expedition/doc/doc_generic_shipment_odt.modules.php | 2 ++ 1 file changed, 2 insertions(+) diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php index 4e6d7bcfec5..01d341ba39d 100644 --- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php +++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php @@ -2,6 +2,8 @@ /* Copyright (C) 2010-2012 Laurent Destailleur * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2014 Marcos García + * Copyright (C) 2016 Charlie Benke + * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by From 522f17e6f9df376209ce13fc8364b0e497e5b596 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Mon, 4 Jan 2016 15:07:17 +0100 Subject: [PATCH 11/22] Update doc_generic_invoice_odt.modules.php --- .../modules/facture/doc/doc_generic_invoice_odt.modules.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php index 5fbf1dd9f51..f316fae00c7 100644 --- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php +++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php @@ -1,7 +1,8 @@ - * Copyright (C) 2012 Regis Houssin +* Copyright (C) 2012 Regis Houssin * Copyright (C) 2014 Marcos García +* Copyright (C) 2016 Charlie Benke * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by From 0d2a6a986859dd708a1c2173b48ca30db374a441 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Mon, 4 Jan 2016 15:07:42 +0100 Subject: [PATCH 12/22] Update doc_generic_project_odt.modules.php --- .../core/modules/project/doc/doc_generic_project_odt.modules.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php index fbb43657d89..103f6746c24 100644 --- a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php +++ b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php @@ -2,6 +2,7 @@ /* Copyright (C) 2010-2012 Laurent Destailleur * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2013 Florian Henry + * Copyright (C) 2016 Charlie Benke * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by From 16770d3d3fccdd76af831c75cb14dc06954e3354 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Mon, 4 Jan 2016 15:08:08 +0100 Subject: [PATCH 13/22] Update doc_generic_task_odt.modules.php --- .../modules/project/task/doc/doc_generic_task_odt.modules.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php index b155c6e6071..345bba99478 100644 --- a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php +++ b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php @@ -2,6 +2,7 @@ /* Copyright (C) 2010-2012 Laurent Destailleur * Copyright (C) 2012 Juanjo Menent * Copyright (C) 2013 Florian Henry + * Copyright (C) 2016 Charlie Benke * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by From 7d6eb270b8bc230a2d62cffe1024fd27783d6910 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Mon, 4 Jan 2016 15:08:44 +0100 Subject: [PATCH 14/22] Update doc_generic_proposal_odt.modules.php --- .../modules/propale/doc/doc_generic_proposal_odt.modules.php | 1 + 1 file changed, 1 insertion(+) diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php index c51c21f8f8c..93246f9e7f6 100644 --- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php +++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php @@ -1,6 +1,7 @@ * Copyright (C) 2012 Juanjo Menent + * Copyright (C) 2016 Charlie Benke * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by From 5e9b7f07d68e9285fa8eec666e14225635c9a176 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Mon, 4 Jan 2016 15:09:18 +0100 Subject: [PATCH 15/22] Update doc_generic_odt.modules.php --- htdocs/core/modules/societe/doc/doc_generic_odt.modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php index 5e0cb9be899..cabc0b2b50c 100644 --- a/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php +++ b/htdocs/core/modules/societe/doc/doc_generic_odt.modules.php @@ -1,6 +1,6 @@ - + * Copyright (C) 2016 Charlie Benke * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation; either version 3 of the License, or From ef597395ba6d19754ce28b0dcaf42a7db1b92569 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Wed, 6 Jan 2016 10:34:55 +0100 Subject: [PATCH 16/22] Update doc_generic_order_odt.modules.php --- .../core/modules/commande/doc/doc_generic_order_odt.modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php index 305b7e18161..52a8bfd2093 100644 --- a/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php +++ b/htdocs/core/modules/commande/doc/doc_generic_order_odt.modules.php @@ -287,7 +287,7 @@ class doc_generic_order_odt extends ModelePDFCommandes complete_substitutions_array($substitutionarray, $langs, $object); // Call the ODTSubstitution hook $parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$substitutionarray); - $reshook=$hookmanager->executeHooks('ODTSubstitution',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks + $reshook=$hookmanager->executeHooks('ODTSubstitutionInit',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks // Line of free text $newfreetext=''; From 743967a9b3c9f81067a1cc4abf05bb4f4869db16 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Wed, 6 Jan 2016 10:35:43 +0100 Subject: [PATCH 17/22] Update doc_generic_shipment_odt.modules.php --- .../modules/expedition/doc/doc_generic_shipment_odt.modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php index 01d341ba39d..8f62d74882a 100644 --- a/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php +++ b/htdocs/core/modules/expedition/doc/doc_generic_shipment_odt.modules.php @@ -288,7 +288,7 @@ class doc_generic_shipment_odt extends ModelePdfExpedition complete_substitutions_array($substitutionarray, $langs, $object); // Call the ODTSubstitution hook $parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$substitutionarray); - $reshook=$hookmanager->executeHooks('ODTSubstitution',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks + $reshook=$hookmanager->executeHooks('ODTSubstitutionInit',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks // Line of free text $newfreetext=''; From 16d43b169c0bcf05864015a6c8d953c595123898 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Wed, 6 Jan 2016 10:36:34 +0100 Subject: [PATCH 18/22] Update doc_generic_invoice_odt.modules.php --- .../modules/facture/doc/doc_generic_invoice_odt.modules.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php index f316fae00c7..45d934b09a7 100644 --- a/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php +++ b/htdocs/core/modules/facture/doc/doc_generic_invoice_odt.modules.php @@ -299,7 +299,7 @@ class doc_generic_invoice_odt extends ModelePDFFactures complete_substitutions_array($substitutionarray, $langs, $object); // Call the ODTSubstitution hook $parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$substitutionarray); - $reshook=$hookmanager->executeHooks('ODTSubstitution',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks + $reshook=$hookmanager->executeHooks('ODTSubstitutionInit',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks // Line of free text $newfreetext=''; From e6fd718e518769658d7f332f841705a20e683c2b Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Wed, 6 Jan 2016 10:38:06 +0100 Subject: [PATCH 19/22] Update doc_generic_project_odt.modules.php --- .../modules/project/doc/doc_generic_project_odt.modules.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php index 103f6746c24..2d78e8ddc9f 100644 --- a/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php +++ b/htdocs/core/modules/project/doc/doc_generic_project_odt.modules.php @@ -472,6 +472,9 @@ class doc_generic_project_odt extends ModelePDFProjects '__FROM_EMAIL__' => $this->emetteur->email, ); complete_substitutions_array($substitutionarray, $langs, $object); + // Call the ODTSubstitution hook + $parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); + $reshook=$hookmanager->executeHooks('ODTSubstitutionInit',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks // Open and load template require_once ODTPHP_PATH.'odf.php'; From cbb5f522eb9aed61f4f36e07aca8d7b7cafc9223 Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Wed, 6 Jan 2016 10:39:18 +0100 Subject: [PATCH 20/22] Update doc_generic_task_odt.modules.php --- .../modules/project/task/doc/doc_generic_task_odt.modules.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php index 345bba99478..2e89b8d3d73 100644 --- a/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php +++ b/htdocs/core/modules/project/task/doc/doc_generic_task_odt.modules.php @@ -458,6 +458,9 @@ class doc_generic_task_odt extends ModelePDFTask '__FROM_EMAIL__' => $this->emetteur->email, ); complete_substitutions_array($substitutionarray, $langs, $object); + // Call the ODTSubstitutionInit hook + $parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$tmparray); + $reshook=$hookmanager->executeHooks('ODTSubstitutionInit',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks // Open and load template require_once ODTPHP_PATH.'odf.php'; From cd2e4a5e1e2125a130dc1d361f97002f3c8289db Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Wed, 6 Jan 2016 10:53:11 +0100 Subject: [PATCH 21/22] Update doc_generic_proposal_odt.modules.php --- .../modules/propale/doc/doc_generic_proposal_odt.modules.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php index 93246f9e7f6..5c50546165d 100644 --- a/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php +++ b/htdocs/core/modules/propale/doc/doc_generic_proposal_odt.modules.php @@ -322,9 +322,9 @@ class doc_generic_proposal_odt extends ModelePDFPropales '__TOTAL_VAT__' => $object->total_vat ); complete_substitutions_array($substitutionarray, $langs, $object); - // Call the ODTSubstitution hook + // Call the ODTSubstitutionInit hook $parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$substitutionarray); - $reshook=$hookmanager->executeHooks('ODTSubstitution',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks + $reshook=$hookmanager->executeHooks('ODTSubstitutionInit',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks // Line of free text $newfreetext=''; From 428b10d26bce1dc93e72c436360c2b927f45060c Mon Sep 17 00:00:00 2001 From: BENKE Charlie Date: Wed, 6 Jan 2016 10:55:37 +0100 Subject: [PATCH 22/22] Update doc_generic_supplier_proposal_odt.modules.php --- .../doc/doc_generic_supplier_proposal_odt.modules.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php index 2c25f9a74a1..f26c97752e6 100644 --- a/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php +++ b/htdocs/core/modules/supplier_proposal/doc/doc_generic_supplier_proposal_odt.modules.php @@ -1,6 +1,7 @@ * Copyright (C) 2012 Juanjo Menent + * Copyright (C) 2016 Charlie Benke * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -318,9 +319,9 @@ class doc_generic_supplier_proposal_odt extends ModelePDFSupplierProposal '__TOTAL_VAT__' => $object->total_vat ); complete_substitutions_array($substitutionarray, $langs, $object); - // Call the ODTSubstitution hook + // Call the ODTSubstitutionInit hook $parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs,'substitutionarray'=>&$substitutionarray); - $reshook=$hookmanager->executeHooks('ODTSubstitution',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks + $reshook=$hookmanager->executeHooks('ODTSubstitutionInit',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks // Line of free text $newfreetext='';