*** empty log message ***

This commit is contained in:
Laurent Destailleur
2006-04-23 14:01:42 +00:00
parent cba44ba28c
commit 50b86bfa47
3 changed files with 12 additions and 8 deletions

View File

@@ -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;
}
}
/*********************************************************************

View File

@@ -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;
}
}

View File

@@ -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
{