diff --git a/dev/skeletons/skeleton_script.php b/dev/skeletons/skeleton_script.php index 3cd7bfc440b..b397e6c0123 100644 --- a/dev/skeletons/skeleton_script.php +++ b/dev/skeletons/skeleton_script.php @@ -40,6 +40,8 @@ if (substr($sapi_type, 0, 3) == 'cgi') { // Include Dolibarr environment require_once($path."../../htdocs/master.inc.php"); // After this $db is an opened handler to database. We close it at end of file. +require_once(DOL_DOCUMENT_ROOT."/cron/functions_cron.lib.php"); + // Load main language strings $langs->load("main"); @@ -63,6 +65,12 @@ if (! isset($argv[1])) { print 'Argument 1='.$argv[1]."\n"; print 'Argument 2='.$argv[2]."\n"; +print '--- start'."\n"; + + +// Start of transaction +$db->begin(); + // Examples for manipulating class skeleton_class require_once(DOL_DOCUMENT_ROOT."/../dev/skeletons/skeleton_class.class.php"); @@ -143,6 +151,17 @@ else // -------------------- END OF YOUR CODE -------------------- +if (! $error) +{ + $db->commit(); + print '--- end ok'."\n"; +} +else +{ + print '--- end error code='.$error."\n"; + $db->rollback(); +} + $db->close(); return $error; diff --git a/htdocs/conf/conf.class.php b/htdocs/conf/conf.class.php index 88cd5bdec2a..ac3f01a1aec 100644 --- a/htdocs/conf/conf.class.php +++ b/htdocs/conf/conf.class.php @@ -196,6 +196,7 @@ class Conf $this->don->dir_temp =DOL_DATA_ROOT."/dons/temp"; // Module fournisseur $this->fournisseur->dir_output=DOL_DATA_ROOT."/fournisseur"; + $this->fournisseur->dir_temp=DOL_DATA_ROOT."/fournisseur/temp"; $this->fournisseur->commande->dir_output=DOL_DATA_ROOT."/fournisseur/commande"; $this->fournisseur->commande->dir_temp =DOL_DATA_ROOT."/fournisseur/commande/temp"; $this->fournisseur->facture->dir_output =DOL_DATA_ROOT."/fournisseur/facture"; diff --git a/htdocs/fourn/fiche-stats.php b/htdocs/fourn/fiche-stats.php index 4cab8d213e9..a42167eda66 100644 --- a/htdocs/fourn/fiche-stats.php +++ b/htdocs/fourn/fiche-stats.php @@ -82,7 +82,7 @@ if ( $societe->fetch($socid) ) print '