diff --git a/htdocs/admin/fckeditor.php b/htdocs/admin/fckeditor.php index 725b66c7c67..3e83651261d 100644 --- a/htdocs/admin/fckeditor.php +++ b/htdocs/admin/fckeditor.php @@ -35,22 +35,28 @@ $langs->load("fckeditor"); if (!$user->admin) accessforbidden(); +// Constante et traduction de la description du module +$modules = array( +'PRODUCTDESC'=>'FCKeditorForProductDescription', +'MAILING'=>'FCKeditorForMailing', +); - -if ($_GET["action"] == 'activate_productdesc') +foreach($modules as $const => $desc) { - dolibarr_set_const($db, "FCKEDITOR_ENABLE_PRODUCTDESC", "1"); + if ($_GET["action"] == 'activate_'.strtolower($const)) + { + dolibarr_set_const($db, "FCKEDITOR_ENABLE_".$const, "1"); Header("Location: fckeditor.php"); exit; -} -else if ($_GET["action"] == 'disable_productdesc') -{ - dolibarr_del_const($db, "FCKEDITOR_ENABLE_PRODUCTDESC"); + } + else if ($_GET["action"] == 'disable_'.strtolower($const)) + { + dolibarr_del_const($db, "FCKEDITOR_ENABLE_".$const); Header("Location: fckeditor.php"); exit; + } } - /* * Affiche page */ @@ -79,41 +85,45 @@ dolibarr_fiche_head($head, $hselected, $langs->trans("ModuleSetup")); $var=true; -// Module Propale -$var=!$var; -print "
'; + print ""; + print ''; + print ''; $db->close(); diff --git a/htdocs/comm/mailing/fiche.php b/htdocs/comm/mailing/fiche.php index 2733949335e..ef826a90684 100644 --- a/htdocs/comm/mailing/fiche.php +++ b/htdocs/comm/mailing/fiche.php @@ -244,7 +244,19 @@ if ($_GET["action"] == 'create') print '__LASTNAME__ = '.$langs->trans("Lastname").'