From 399673ed08ae69740dc121879568a9d8f6339fc7 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 3 Sep 2005 14:31:12 +0000 Subject: [PATCH] Fix: Meilleur gestion erreur si module GD non dispo --- htdocs/product/stats/fiche.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/product/stats/fiche.php b/htdocs/product/stats/fiche.php index f3d5b6039c0..743ba61182b 100644 --- a/htdocs/product/stats/fiche.php +++ b/htdocs/product/stats/fiche.php @@ -291,22 +291,22 @@ if ($_GET["id"]) print 'Nombre de propales sur les 12 derniers mois'; print ' '; print ''; - if (file_exists($filenbpropal) && filemtime($filenbpropal)) + if (file_exists($filenbpropal) && filemtime($filenbpropal) && ! $px->isGraphKo()) { print ''.$langs->trans("GeneratedOn",dolibarr_print_date(filemtime($filenbpropal),"%d %b %Y %H:%M:%S")).''; } else { - print ''.$langs->trans("ChartNotGenerated").''; + print ''.($mesg?''.$mesg.'':$langs->trans("ChartNotGenerated")).''; } print '['.$langs->trans("ReCalculate").']'; - if (file_exists($filenbpiece) && filemtime($filenbpiece)) + if (file_exists($filenbpiece) && filemtime($filenbpiece) && ! $px->isGraphKo()) { print ''.$langs->trans("GeneratedOn",dolibarr_print_date(filemtime($filenbpiece),"%d %b %Y %H:%M:%S")).''; } else { - print ''.$langs->trans("ChartNotGenerated").''; + print ''.($mesg?''.$mesg.'':$langs->trans("ChartNotGenerated")).''; } print '['.$langs->trans("ReCalculate").']'; @@ -321,22 +321,22 @@ if ($_GET["id"]) print 'Nombre de pièces vendues sur les 12 derniers mois'; print ''; print ''; - if (file_exists($filenbvente) && filemtime($filenbvente)) + if (file_exists($filenbvente) && filemtime($filenbvente) && ! $px->isGraphKo()) { print ''.$langs->trans("GeneratedOn",dolibarr_print_date(filemtime($filenbvente),"%d %b %Y %H:%M:%S")).''; } else { - print ''.$langs->trans("ChartNotGenerated").''; + print ''.($mesg?''.$mesg.'':$langs->trans("ChartNotGenerated")).''; } print '['.$langs->trans("ReCalculate").']'; - if (file_exists($filenbpiece) && filemtime($filenbpiece)) + if (file_exists($filenbpiece) && filemtime($filenbpiece) && ! $px->isGraphKo()) { print ''.$langs->trans("GeneratedOn",dolibarr_print_date(filemtime($filenbpiece),"%d %b %Y %H:%M:%S")).''; } else { - print ''.$langs->trans("ChartNotGenerated").''; + print ''.($mesg?''.$mesg.'':$langs->trans("ChartNotGenerated")).''; } print '['.$langs->trans("ReCalculate").']';