Qual: Uniformize code
This commit is contained in:
parent
d5511315e6
commit
aea54edfa2
@ -290,6 +290,15 @@ class pdf_edison extends ModelePDFCommandes
|
|||||||
$pdf->Close();
|
$pdf->Close();
|
||||||
|
|
||||||
$pdf->Output($file,'F');
|
$pdf->Output($file,'F');
|
||||||
|
|
||||||
|
// Actions on extra fields (by external module or standard code)
|
||||||
|
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
|
||||||
|
$hookmanager=new HookManager($this->db);
|
||||||
|
$hookmanager->callHooks(array('pdfgeneration'));
|
||||||
|
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
|
||||||
|
global $action;
|
||||||
|
$reshook=$hookmanager->executeHooks('afterPDFCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_UMASK))
|
if (! empty($conf->global->MAIN_UMASK))
|
||||||
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
||||||
|
|
||||||
|
|||||||
@ -397,6 +397,15 @@ class pdf_einstein extends ModelePDFCommandes
|
|||||||
$pdf->Close();
|
$pdf->Close();
|
||||||
|
|
||||||
$pdf->Output($file,'F');
|
$pdf->Output($file,'F');
|
||||||
|
|
||||||
|
// Actions on extra fields (by external module or standard code)
|
||||||
|
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
|
||||||
|
$hookmanager=new HookManager($this->db);
|
||||||
|
$hookmanager->callHooks(array('pdfgeneration'));
|
||||||
|
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
|
||||||
|
global $action;
|
||||||
|
$reshook=$hookmanager->executeHooks('afterPDFCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_UMASK))
|
if (! empty($conf->global->MAIN_UMASK))
|
||||||
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
||||||
|
|
||||||
|
|||||||
@ -31,8 +31,7 @@ require_once(DOL_DOCUMENT_ROOT."/compta/bank/class/account.class.php"); // Req
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \class ModelePDFPropales
|
* Classe mere des modeles de propale
|
||||||
* \brief Classe mere des modeles de propale
|
|
||||||
*/
|
*/
|
||||||
abstract class ModelePDFPropales extends CommonDocGenerator
|
abstract class ModelePDFPropales extends CommonDocGenerator
|
||||||
{
|
{
|
||||||
@ -40,8 +39,9 @@ abstract class ModelePDFPropales extends CommonDocGenerator
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Return list of active generation modules
|
* Return list of active generation modules
|
||||||
* @param $db Database handler
|
*
|
||||||
|
* @param DoliDB $db Database handler
|
||||||
*/
|
*/
|
||||||
function liste_modeles($db)
|
function liste_modeles($db)
|
||||||
{
|
{
|
||||||
@ -59,23 +59,26 @@ abstract class ModelePDFPropales extends CommonDocGenerator
|
|||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* \class ModeleNumRefPropales
|
* Classe mere des modeles de numerotation des references de propales
|
||||||
* \brief Classe mere des modeles de numerotation des references de propales
|
|
||||||
*/
|
*/
|
||||||
abstract class ModeleNumRefPropales
|
abstract class ModeleNumRefPropales
|
||||||
{
|
{
|
||||||
var $error='';
|
var $error='';
|
||||||
|
|
||||||
/** \brief Return if a module can be used or not
|
/**
|
||||||
* \return boolean true if module can be used
|
* Return if a module can be used or not
|
||||||
|
*
|
||||||
|
* @return boolean true if module can be used
|
||||||
*/
|
*/
|
||||||
function isEnabled()
|
function isEnabled()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \brief Renvoi la description par defaut du modele de numerotation
|
/**
|
||||||
* \return string Texte descripif
|
* Renvoi la description par defaut du modele de numerotation
|
||||||
|
*
|
||||||
|
* @return string Texte descripif
|
||||||
*/
|
*/
|
||||||
function info()
|
function info()
|
||||||
{
|
{
|
||||||
@ -84,8 +87,10 @@ abstract class ModeleNumRefPropales
|
|||||||
return $langs->trans("NoDescription");
|
return $langs->trans("NoDescription");
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \brief Renvoi un exemple de numerotation
|
/**
|
||||||
* \return string Example
|
* Renvoi un exemple de numerotation
|
||||||
|
*
|
||||||
|
* @return string Example
|
||||||
*/
|
*/
|
||||||
function getExample()
|
function getExample()
|
||||||
{
|
{
|
||||||
@ -94,17 +99,21 @@ abstract class ModeleNumRefPropales
|
|||||||
return $langs->trans("NoExample");
|
return $langs->trans("NoExample");
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \brief Test si les numeros deja en vigueur dans la base ne provoquent pas de
|
/**
|
||||||
* de conflits qui empechera cette numerotation de fonctionner.
|
* Test si les numeros deja en vigueur dans la base ne provoquent pas de
|
||||||
* \return boolean false si conflit, true si ok
|
* de conflits qui empechera cette numerotation de fonctionner.
|
||||||
|
*
|
||||||
|
* @return boolean false si conflit, true si ok
|
||||||
*/
|
*/
|
||||||
function canBeActivated()
|
function canBeActivated()
|
||||||
{
|
{
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \brief Renvoi prochaine valeur attribuee
|
/**
|
||||||
* \return string Valeur
|
* Renvoi prochaine valeur attribuee
|
||||||
|
*
|
||||||
|
* @return string Valeur
|
||||||
*/
|
*/
|
||||||
function getNextValue()
|
function getNextValue()
|
||||||
{
|
{
|
||||||
@ -112,8 +121,10 @@ abstract class ModeleNumRefPropales
|
|||||||
return $langs->trans("NotAvailable");
|
return $langs->trans("NotAvailable");
|
||||||
}
|
}
|
||||||
|
|
||||||
/** \brief Renvoi version du module numerotation
|
/**
|
||||||
* \return string Valeur
|
* Renvoi version du module numerotation
|
||||||
|
*
|
||||||
|
* @return string Valeur
|
||||||
*/
|
*/
|
||||||
function getVersion()
|
function getVersion()
|
||||||
{
|
{
|
||||||
|
|||||||
@ -388,6 +388,15 @@ class pdf_canelle extends ModelePDFSuppliersInvoices
|
|||||||
$pdf->Close();
|
$pdf->Close();
|
||||||
|
|
||||||
$pdf->Output($file,'F');
|
$pdf->Output($file,'F');
|
||||||
|
|
||||||
|
// Actions on extra fields (by external module or standard code)
|
||||||
|
include_once(DOL_DOCUMENT_ROOT.'/core/class/hookmanager.class.php');
|
||||||
|
$hookmanager=new HookManager($this->db);
|
||||||
|
$hookmanager->callHooks(array('pdfgeneration'));
|
||||||
|
$parameters=array('file'=>$file,'object'=>$object,'outputlangs'=>$outputlangs);
|
||||||
|
global $action;
|
||||||
|
$reshook=$hookmanager->executeHooks('afterPDFCreation',$parameters,$this,$action); // Note that $action and $object may have been modified by some hooks
|
||||||
|
|
||||||
if (! empty($conf->global->MAIN_UMASK))
|
if (! empty($conf->global->MAIN_UMASK))
|
||||||
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
@chmod($file, octdec($conf->global->MAIN_UMASK));
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user