mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-03 23:52:24 +01:00
*** empty log message ***
This commit is contained in:
@@ -605,7 +605,11 @@ if ($_REQUEST['action'] == 'builddoc') // En get ou en post
|
||||
{
|
||||
$outputlangs = new Translate(DOL_DOCUMENT_ROOT ."/langs");
|
||||
$outputlangs->setDefaultLang($_REQUEST['lang_id']);
|
||||
facture_pdf_create($db, $_REQUEST['facid'], '', '', $outputlangs);
|
||||
$result=facture_pdf_create($db, $_REQUEST['facid'], '', '', $outputlangs);
|
||||
if ($result <= 0)
|
||||
{
|
||||
exit;
|
||||
}
|
||||
}
|
||||
|
||||
/*********************************************************************
|
||||
|
||||
@@ -141,7 +141,7 @@ class ModeleNumRefFactures
|
||||
\param message message
|
||||
\param modele force le modele <20> utiliser ('' par defaut)
|
||||
\param outputlangs objet lang a utiliser pour traduction
|
||||
\return int 0 si KO, 1 si OK
|
||||
\return int <0 si KO, >0 si OK
|
||||
*/
|
||||
function facture_pdf_create($db, $id, $message='', $modele='', $outputlangs='')
|
||||
{
|
||||
@@ -186,16 +186,16 @@ function facture_pdf_create($db, $id, $message='', $modele='', $outputlangs='')
|
||||
}
|
||||
else
|
||||
{
|
||||
dolibarr_syslog("Erreur dans facture_pdf_create");
|
||||
dolibarr_print_error($db,$obj->pdferror());
|
||||
return 0;
|
||||
dolibarr_print_error('',"facture_pdf_create Error: ".$obj->error);
|
||||
$this->error=$langs->trans("Error")." ".$obj->error;
|
||||
return -1;
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
print $langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$dir.$file);
|
||||
return 0;
|
||||
dolibarr_print_error('',$langs->trans("Error")." ".$langs->trans("ErrorFileDoesNotExists",$dir.$file));
|
||||
return -1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -1095,7 +1095,7 @@ function dolibarr_print_error($db='',$msg='')
|
||||
$syslog.="pid=".getmypid();
|
||||
}
|
||||
|
||||
if ($db)
|
||||
if (is_object($db))
|
||||
{
|
||||
if ($_SERVER['DOCUMENT_ROOT']) // Mode web
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user