add hook on commongeneratedocument
This commit is contained in:
parent
40bed96a01
commit
45bef65fc9
@ -4057,10 +4057,15 @@ abstract class CommonObject
|
|||||||
*/
|
*/
|
||||||
protected function commonGenerateDocument($modelspath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams=null)
|
protected function commonGenerateDocument($modelspath, $modele, $outputlangs, $hidedetails, $hidedesc, $hideref, $moreparams=null)
|
||||||
{
|
{
|
||||||
global $conf, $langs, $user;
|
global $conf, $langs, $user, $hookmanager;
|
||||||
|
|
||||||
$srctemplatepath='';
|
$srctemplatepath='';
|
||||||
|
|
||||||
|
$parameters = array('modelspath'=>$modelspath,'modele'=>$modele,'outputlangs'=>$outputlangs,'hidedetails'=>$hidedetails,'hidedesc'=>$hidedesc,'hideref'=>$hideref, 'moreparams'=>$moreparams);
|
||||||
|
$reshook = $hookmanager->executeHooks('commonGenerateDocument', $parameters, $this, $action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
|
||||||
|
if(empty($reshook))
|
||||||
|
{
|
||||||
// Increase limit for PDF build
|
// Increase limit for PDF build
|
||||||
$err=error_reporting();
|
$err=error_reporting();
|
||||||
error_reporting(0);
|
error_reporting(0);
|
||||||
@ -4289,6 +4294,7 @@ abstract class CommonObject
|
|||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Build thumb
|
* Build thumb
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user