Merge branch '3.7' of git@github.com:Dolibarr/dolibarr.git into 3.7
This commit is contained in:
commit
1797569a6d
@ -94,6 +94,13 @@ $object->substitutionarrayfortest=array(
|
||||
//,'__PERSONALIZED__' => 'TESTPersonalized' // Not used yet
|
||||
);
|
||||
|
||||
// List of sending methods
|
||||
$listofmethods=array();
|
||||
$listofmethods['mail']='PHP mail function';
|
||||
//$listofmethods['simplemail']='Simplemail class';
|
||||
$listofmethods['smtps']='SMTP/SMTPS socket library';
|
||||
|
||||
|
||||
|
||||
/*
|
||||
* Actions
|
||||
@ -741,10 +748,21 @@ else
|
||||
{
|
||||
// Define message to recommand from command line
|
||||
|
||||
// Pour des raisons de securite, on ne permet pas cette fonction via l'IHM,
|
||||
// on affiche donc juste un message
|
||||
$sendingmode=$conf->global->MAIN_MAIL_SENDMODE;
|
||||
if (empty($sendingmode)) $sendingmode='mail'; // If not defined, we use php mail function
|
||||
|
||||
if (empty($conf->global->MAILING_LIMIT_SENDBYWEB))
|
||||
if (! empty($conf->global->MAILING_NO_USING_PHPMAIL) && $sendingmode == 'mail')
|
||||
{
|
||||
// EMailing feature may be a spam problem, so when you host several users/instance, having this option may force each user to use their own SMTP agent.
|
||||
// You ensure that every user is using its own SMTP server.
|
||||
$linktoadminemailbefore='<a href="'.DOL_URL_ROOT.'/admin/mails.php">';
|
||||
$linktoadminemailend='</a>';
|
||||
setEventMessage($langs->trans("MailSendSetupIs", $listofmethods[$sendingmode]), 'warnings');
|
||||
setEventMessage($langs->trans("MailSendSetupIs2", $linktoadminemailbefore, $linktoadminemailend, $langs->transnoentitiesnoconv("MAIN_MAIL_SENDMODE"), $listofmethods['smtps']), 'warnings');
|
||||
if (! empty($conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS)) setEventMessage($langs->trans("MailSendSetupIs3", $conf->global->MAILING_SMTP_SETUP_EMAILS_FOR_QUESTIONS), 'warnings');
|
||||
$_GET["action"]='';
|
||||
}
|
||||
else if (empty($conf->global->MAILING_LIMIT_SENDBYWEB))
|
||||
{
|
||||
// Pour des raisons de securite, on ne permet pas cette fonction via l'IHM,
|
||||
// on affiche donc juste un message
|
||||
@ -764,7 +782,7 @@ else
|
||||
}
|
||||
$text.=$langs->trans('ConfirmSendingEmailing').'<br>';
|
||||
$text.=$langs->trans('LimitSendingEmailing',$conf->global->MAILING_LIMIT_SENDBYWEB);
|
||||
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('SendMailing'),$text,'sendallconfirmed',$formquestion,'',1,260);
|
||||
print $form->formconfirm($_SERVER['PHP_SELF'].'?id='.$object->id,$langs->trans('SendMailing'),$text,'sendallconfirmed',$formquestion,'',1,270);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -276,7 +276,8 @@ if ($object->fetch($id) >= 0)
|
||||
|
||||
$obj = new $classname($db);
|
||||
|
||||
$qualified=1;
|
||||
// Check dependencies
|
||||
$qualified=(isset($obj->enabled)?$obj->enabled:1);
|
||||
foreach ($obj->require_module as $key)
|
||||
{
|
||||
if (! $conf->$key->enabled || (! $user->admin && $obj->require_admin))
|
||||
|
||||
@ -53,9 +53,10 @@ class FormAdmin
|
||||
* @param array $filter Array of keys to exclude in list
|
||||
* @param int $showempty Add empty value
|
||||
* @param int $showwarning Show a warning if language is not complete
|
||||
* @param int $disabled Disable edit of select
|
||||
* @return string Return HTML select string with list of languages
|
||||
*/
|
||||
function select_language($selected='',$htmlname='lang_id',$showauto=0,$filter=0,$showempty=0,$showwarning=0)
|
||||
function select_language($selected='',$htmlname='lang_id',$showauto=0,$filter=0,$showempty=0,$showwarning=0,$disabled=0)
|
||||
{
|
||||
global $langs;
|
||||
|
||||
@ -63,7 +64,7 @@ class FormAdmin
|
||||
|
||||
$out='';
|
||||
|
||||
$out.= '<select class="flat" id="'.$htmlname.'" name="'.$htmlname.'">';
|
||||
$out.= '<select class="flat" id="'.$htmlname.'" name="'.$htmlname.'"'.($disabled?' disabled="disabled"':'').'>';
|
||||
if ($showempty)
|
||||
{
|
||||
$out.= '<option value=""';
|
||||
|
||||
@ -115,7 +115,7 @@ SentBy=Sent by
|
||||
MailingNeedCommand=For security reason, sending an emailing is better when performed from command line. If you have one, ask your server administrator to launch the following command to send the emailing to all recipients:
|
||||
MailingNeedCommand2=You can however send them online by adding parameter MAILING_LIMIT_SENDBYWEB with value of max number of emails you want to send by session. For this, go on Home - Setup - Other.
|
||||
ConfirmSendingEmailing=If you can't or prefer sending them with your www browser, please confirm you are sure you want to send emailing now from your browser ?
|
||||
LimitSendingEmailing=Note: On line sending of emailings are limited for security and timeout reasons to <b>%s</b> recipients by sending session.
|
||||
LimitSendingEmailing=Note: Sending of emailings from web interface is done in several times for security and timeout reasons, <b>%s</b> recipients at a time for each sending session.
|
||||
TargetsReset=Clear list
|
||||
ToClearAllRecipientsClickHere=Click here to clear the recipient list for this emailing
|
||||
ToAddRecipientsChooseHere=Add recipients by choosing from the lists
|
||||
@ -136,3 +136,6 @@ SomeNotificationsWillBeSent=%s notifications will be sent by email
|
||||
AddNewNotification=Activate a new email notification target
|
||||
ListOfActiveNotifications=List all active email notification targets
|
||||
ListOfNotificationsDone=List all email notifications sent
|
||||
MailSendSetupIs=Configuration of email sending has been setup to '%s'. This mode can't be used to send mass emailing.
|
||||
MailSendSetupIs2=You must first go, with an admin account, into menu %sHome - Setup - EMails%s to change parameter <strong>'%s'</strong> to use mode '%s'. With this mode, you can enter setup of the SMTP server provided by your Internet Service Provider and use Mass emailing feature.
|
||||
MailSendSetupIs3=If you have any questions on how to setup your SMTP server, you can ask to %s.
|
||||
|
||||
@ -1300,7 +1300,7 @@ function top_htmlhead($head, $title='', $disablejs=0, $disablehead=0, $arrayofjs
|
||||
function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $arrayofjs='', $arrayofcss='', $morequerystring='')
|
||||
{
|
||||
global $user, $conf, $langs, $db;
|
||||
global $dolibarr_main_authentication;
|
||||
global $dolibarr_main_authentication, $dolibarr_main_demo;
|
||||
global $hookmanager,$menumanager;
|
||||
|
||||
// Instantiate hooks of thirdparty module
|
||||
@ -1410,7 +1410,6 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
||||
$logintext.='>'.$user->login.'</a>';
|
||||
if ($user->societe_id) $logintext.=$companylink;
|
||||
$logintext.='</div>';
|
||||
|
||||
$loginhtmltext.='<u>'.$langs->trans("User").'</u>';
|
||||
$loginhtmltext.='<br><b>'.$langs->trans("Name").'</b>: '.$user->getFullName($langs);
|
||||
$loginhtmltext.='<br><b>'.$langs->trans("Login").'</b>: '.$user->login;
|
||||
@ -1422,9 +1421,9 @@ function top_menu($head, $title='', $target='', $disablejs=0, $disablehead=0, $a
|
||||
$loginhtmltext.='<br>';
|
||||
$loginhtmltext.='<br><u>'.$langs->trans("Connection").'</u>';
|
||||
if (! empty($conf->global->MAIN_MODULE_MULTICOMPANY)) $loginhtmltext.='<br><b>'.$langs->trans("ConnectedOnMultiCompany").'</b>: '.$conf->entity.' (user entity '.$user->entity.')';
|
||||
$loginhtmltext.='<br><b>'.$langs->trans("AuthenticationMode").'</b>: '.$_SESSION["dol_authmode"].(empty($dolibarr_main_demo)?'':' (demo)');
|
||||
$loginhtmltext.='<br><b>'.$langs->trans("ConnectedSince").'</b>: '.dol_print_date($user->datelastlogin,"dayhour");
|
||||
$loginhtmltext.='<br><b>'.$langs->trans("PreviousConnexion").'</b>: '.dol_print_date($user->datepreviouslogin,"dayhour");
|
||||
$loginhtmltext.='<br><b>'.$langs->trans("AuthenticationMode").'</b>: '.$_SESSION["dol_authmode"];
|
||||
$loginhtmltext.='<br><b>'.$langs->trans("CurrentTheme").'</b>: '.$conf->theme;
|
||||
$loginhtmltext.='<br><b>'.$langs->trans("CurrentMenuManager").'</b>: '.$menumanager->name;
|
||||
$s=picto_from_langcode($langs->getDefaultLang());
|
||||
|
||||
@ -179,10 +179,10 @@ if ($action == 'edit')
|
||||
print ($conf->global->MAIN_LANG_DEFAULT=='auto'?$langs->trans("AutoDetectLang"):$langs->trans("Language_".$conf->global->MAIN_LANG_DEFAULT));
|
||||
print '</td>';
|
||||
print '<td align="left" class="nowrap" width="20%"><input '.$bc[$var].' name="check_MAIN_LANG_DEFAULT" id="check_MAIN_LANG_DEFAULT" type="checkbox" '.(! empty($fuser->conf->MAIN_LANG_DEFAULT)?" checked":"");
|
||||
print ! empty($dolibarr_main_demo)?' disabled="disabled"':''; // Disabled for demo
|
||||
print empty($dolibarr_main_demo)?'':' disabled="disabled"'; // Disabled for demo
|
||||
print '> '.$langs->trans("UsePersonalValue").'</td>';
|
||||
print '<td>';
|
||||
print $formadmin->select_language((! empty($fuser->conf->MAIN_LANG_DEFAULT)?$fuser->conf->MAIN_LANG_DEFAULT:''),'main_lang_default',1);
|
||||
print $formadmin->select_language((! empty($fuser->conf->MAIN_LANG_DEFAULT)?$fuser->conf->MAIN_LANG_DEFAULT:''),'main_lang_default',1,null,0,0,(! empty($dolibarr_main_demo)));
|
||||
print '</td></tr>';
|
||||
|
||||
// Taille max des listes
|
||||
@ -190,7 +190,7 @@ if ($action == 'edit')
|
||||
print '<tr '.$bc[$var].'><td>'.$langs->trans("MaxSizeList").'</td>';
|
||||
print '<td>'.$conf->global->MAIN_SIZE_LISTE_LIMIT.'</td>';
|
||||
print '<td align="left" class="nowrap" width="20%"><input '.$bc[$var].' name="check_SIZE_LISTE_LIMIT" id="check_SIZE_LISTE_LIMIT" type="checkbox" '.(! empty($fuser->conf->MAIN_SIZE_LISTE_LIMIT)?" checked":"");
|
||||
print ! empty($dolibarr_main_demo)?' disabled="disabled"':''; // Disabled for demo
|
||||
print empty($dolibarr_main_demo)?'':' disabled="disabled"'; // Disabled for demo
|
||||
print '> '.$langs->trans("UsePersonalValue").'</td>';
|
||||
print '<td><input class="flat" name="main_size_liste_limit" id="main_size_liste_limit" size="4" value="' . (! empty($fuser->conf->MAIN_SIZE_LISTE_LIMIT)?$fuser->conf->MAIN_SIZE_LISTE_LIMIT:'') . '"></td></tr>';
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user