diff --git a/htdocs/conf/conf.class.php b/htdocs/conf/conf.class.php index d4dd1228647..d41679740ef 100644 --- a/htdocs/conf/conf.class.php +++ b/htdocs/conf/conf.class.php @@ -400,20 +400,27 @@ class Conf if (! $this->global->MAIN_THEME) $this->global->MAIN_THEME="eldy"; $this->theme=$this->global->MAIN_THEME; $this->css = "theme/".$this->theme."/".$this->theme.".css"; - - // $this->email_from = email pour envoi par Dolibarr des mails auto (notifications, ...) - $this->notification->email_from="dolibarr-robot@domain.com"; - if (defined('NOTIFICATION_EMAIL_FROM')) + + // $this->email_from = email pour envoi par dolibarr des mails automatiques + $this->email_from = "dolibarr-robot@domain.com"; + if ($conf->global->MAIN_MAIL_EMAIL_FROM) { - $this->notification->email_from=NOTIFICATION_EMAIL_FROM; + $this->email_from = $conf->global->MAIN_MAIL_EMAIL_FROM; + } + + // $this->notification->email_from = email pour envoi par Dolibarr des notifications + $this->notification->email_from=$conf->global->MAIN_MAIL_EMAIL_FROM; + if ($conf->global->NOTIFICATION_EMAIL_FROM) + { + $this->mailing->email_from=$conf->global->NOTIFICATION_EMAIL_FROM; } // $this->mailing->email_from = email pour envoi par Dolibarr des mailings - if (defined('MAILING_EMAIL_FROM')) + $this->mailing->email_from=$conf->global->MAIN_MAIL_EMAIL_FROM; + if ($conf->global->MAILING_EMAIL_FROM) { - $this->mailing->email_from=MAILING_EMAIL_FROM; + $this->mailing->email_from=$conf->global->MAILING_EMAIL_FROM; } - else $this->mailing->email_from=$this->email_from; // $this->adherent->email_resil, ... if (defined("MAIN_MAIL_RESIL")) diff --git a/htdocs/html.form.class.php b/htdocs/html.form.class.php index b894b4f6c13..c57615bc98a 100644 --- a/htdocs/html.form.class.php +++ b/htdocs/html.form.class.php @@ -491,7 +491,7 @@ class Form /** - * \brief Retourne la liste déroulante des menus disponibles + * \brief Retourne la liste déroulante des menus disponibles (eldy_backoffice, ...) * \param selected Menu pré-sélectionnée * \param htmlname Nom de la zone select * \param dirmenu Repértoire à scanner @@ -549,12 +549,55 @@ class Form print ''; } - /** + /** + * \brief Retourne la liste déroulante des menus disponibles (eldy) + * \param selected Menu pré-sélectionnée + * \param htmlname Nom de la zone select + * \param dirmenu Repértoire à scanner + */ + function select_menu_families($selected='',$htmlname,$dirmenu) + { + global $langs,$conf; + + $menuarray=array(); + $handle=opendir($dirmenu); + while (($file = readdir($handle))!==false) + { + if (is_file($dirmenu."/".$file) && substr($file, 0, 1) <> '.' && substr($file, 0, 3) <> 'CVS') + { + $filelib=eregi_replace('(_backoffice|_frontoffice)?\.php$','',$file); + if (eregi('^default',$filelib)) continue; + if (eregi('^empty',$filelib)) continue; + + $menuarray[$filelib]=1; + } + $menuarray['all']=1; + } + ksort($menuarray); + + // Affichage liste deroulante des menus + print ''; + } + + + /** * \brief Retourne la liste des types de comptes financiers * \param selected Type pré-sélectionné * \param htmlname Nom champ formulaire */ - function select_type_comptes_financiers($selected=1,$htmlname='type') { global $langs; diff --git a/htdocs/includes/menus/barre_left/eldy_backoffice.php b/htdocs/includes/menus/barre_left/eldy_backoffice.php index df8a823f02f..86d38682841 100644 --- a/htdocs/includes/menus/barre_left/eldy_backoffice.php +++ b/htdocs/includes/menus/barre_left/eldy_backoffice.php @@ -134,6 +134,7 @@ class MenuLeft { if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/triggers.php", $langs->trans("Triggers")); if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/perms.php", $langs->trans("Security")); + if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/mails.php", $langs->trans("EMails")); if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/dict.php", $langs->trans("DictionnarySetup")); if ($leftmenu=="setup") $newmenu->add_submenu(DOL_URL_ROOT."/admin/const.php", $langs->trans("OtherSetup"));