mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
Fix: $hookmanager is a global object
This commit is contained in:
@@ -157,12 +157,11 @@ abstract class ModeleNumRefCommandes
|
||||
* @param int $hidedetails Hide details of lines
|
||||
* @param int $hidedesc Hide description
|
||||
* @param int $hideref Hide ref
|
||||
* @param HookManager $hookmanager Hook manager instance
|
||||
* @return int 0 if KO, 1 if OK
|
||||
*/
|
||||
function commande_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0, $hookmanager=false)
|
||||
function commande_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0, $hidedesc=0, $hideref=0)
|
||||
{
|
||||
global $conf,$user,$langs;
|
||||
global $conf,$user,$langs,$hookmanager;
|
||||
$langs->load("orders");
|
||||
|
||||
$error=0;
|
||||
@@ -223,7 +222,7 @@ function commande_pdf_create($db, $object, $modele, $outputlangs, $hidedetails=0
|
||||
// We save charset_output to restore it because write_file can change it if needed for
|
||||
// output format that does not support UTF8.
|
||||
$sav_charset_output=$outputlangs->charset_output;
|
||||
if ($obj->write_file($object, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref, $hookmanager) > 0)
|
||||
if ($obj->write_file($object, $outputlangs, $srctemplatepath, $hidedetails, $hidedesc, $hideref) > 0)
|
||||
{
|
||||
$outputlangs->charset_output=$sav_charset_output;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user