Dbut ajout mode debugage l'cran

This commit is contained in:
Regis Houssin 2007-09-21 05:44:44 +00:00
parent 1c0e26ee1a
commit ba146a535e
2 changed files with 17 additions and 1 deletions

View File

@ -333,6 +333,10 @@ class Conf
* Modification de quelques variable de conf en fonction des Constantes
*/
// Debug Mode
$this->use_debug_mode=0;
if ($this->global->MAIN_ENABLE_DEBUG_MODE) $this->use_debug_mode=$this->global->MAIN_ENABLE_DEBUG_MODE;
// outils systemes
if (! $this->global->SYSTEMTOOLS_MYSQLDUMP) $this->global->SYSTEMTOOLS_MYSQLDUMP="mysqldump";

View File

@ -318,7 +318,7 @@ if ($_GET["action"] == 'create')
}
print_titre($langs->trans("AddIntervention"));
if (! $conf->global->FICHEINTER_ADDON)
{
dolibarr_print_error($db,$langs->trans("Error")." ".$langs->trans("Error_FICHEINTER_ADDON_NotDefined"));
@ -438,6 +438,18 @@ elseif ($_GET["id"] > 0)
exit;
}
$fichinter->fetch_client();
// Debug mode
// TODO: créer une fonction debug générique
if ($conf->use_debug_mode)
{
$debug = '<div class="error">';
$debug.= 'Mode Debugage<br>';
$debug.= 'Module intervention: lire='.$user->rights->ficheinter->lire.', creer='.$user->rights->ficheinter->creer;
$debug.= ', supprimer='.$user->rights->ficheinter->supprimer;
$debug.= '</div>';
print $debug;
}
if ($mesg) print $mesg."<br>";