Merge branch '3.8' of https://github.com/Dolibarr/dolibarr.git into 3.8
This commit is contained in:
commit
8ba8182c64
@ -116,17 +116,20 @@ if (empty($reshook))
|
|||||||
|
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
{
|
{
|
||||||
// Define output language
|
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
|
||||||
$outputlangs = $langs;
|
|
||||||
$newlang='';
|
|
||||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id','alpha')) $newlang=GETPOST('lang_id','alpha');
|
|
||||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
|
|
||||||
if (! empty($newlang))
|
|
||||||
{
|
{
|
||||||
$outputlangs = new Translate("",$conf);
|
// Define output language
|
||||||
$outputlangs->setDefaultLang($newlang);
|
$outputlangs = $langs;
|
||||||
|
$newlang='';
|
||||||
|
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id','alpha')) $newlang=GETPOST('lang_id','alpha');
|
||||||
|
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
|
||||||
|
if (! empty($newlang))
|
||||||
|
{
|
||||||
|
$outputlangs = new Translate("",$conf);
|
||||||
|
$outputlangs->setDefaultLang($newlang);
|
||||||
|
}
|
||||||
|
$result=fichinter_create($db, $object, (!GETPOST('model','alpha'))?$object->modelpdf:GETPOST('model','alpha'), $outputlangs);
|
||||||
}
|
}
|
||||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) $result=fichinter_create($db, $object, GETPOST('model','alpha'), $outputlangs);
|
|
||||||
|
|
||||||
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
|
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
|
||||||
exit;
|
exit;
|
||||||
@ -142,17 +145,20 @@ if (empty($reshook))
|
|||||||
$result = $object->setDraft($user);
|
$result = $object->setDraft($user);
|
||||||
if ($result >= 0)
|
if ($result >= 0)
|
||||||
{
|
{
|
||||||
// Define output language
|
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE))
|
||||||
$outputlangs = $langs;
|
|
||||||
$newlang='';
|
|
||||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id','alpha')) $newlang=GETPOST('lang_id','alpha');
|
|
||||||
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
|
|
||||||
if (! empty($newlang))
|
|
||||||
{
|
{
|
||||||
$outputlangs = new Translate("",$conf);
|
// Define output language
|
||||||
$outputlangs->setDefaultLang($newlang);
|
$outputlangs = $langs;
|
||||||
|
$newlang='';
|
||||||
|
if ($conf->global->MAIN_MULTILANGS && empty($newlang) && GETPOST('lang_id','alpha')) $newlang=GETPOST('lang_id','alpha');
|
||||||
|
if ($conf->global->MAIN_MULTILANGS && empty($newlang)) $newlang=$object->client->default_lang;
|
||||||
|
if (! empty($newlang))
|
||||||
|
{
|
||||||
|
$outputlangs = new Translate("",$conf);
|
||||||
|
$outputlangs->setDefaultLang($newlang);
|
||||||
|
}
|
||||||
|
$result=fichinter_create($db, $object, (!GETPOST('model','alpha'))?$object->modelpdf:GETPOST('model','alpha'), $outputlangs);
|
||||||
}
|
}
|
||||||
if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) $result=fichinter_create($db, $object, (!GETPOST('model','alpha'))?$object->model:GETPOST('model','apha'), $outputlangs);
|
|
||||||
|
|
||||||
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
|
header('Location: '.$_SERVER["PHP_SELF"].'?id='.$object->id);
|
||||||
exit;
|
exit;
|
||||||
|
|||||||
@ -2366,7 +2366,18 @@ else
|
|||||||
$reshook=$hookmanager->executeHooks('addMoreActionsButtons',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
$reshook=$hookmanager->executeHooks('addMoreActionsButtons',$parameters,$object,$action); // Note that $action and $object may have been modified by hook
|
||||||
if (empty($reshook))
|
if (empty($reshook))
|
||||||
{
|
{
|
||||||
if (! empty($object->email))
|
$at_least_one_email_contact = false;
|
||||||
|
$TContact = $object->contact_array_objects();
|
||||||
|
foreach ($TContact as &$contact)
|
||||||
|
{
|
||||||
|
if (!empty($contact->email))
|
||||||
|
{
|
||||||
|
$at_least_one_email_contact = true;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
if (! empty($object->email) || $at_least_one_email_contact)
|
||||||
{
|
{
|
||||||
$langs->load("mails");
|
$langs->load("mails");
|
||||||
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?socid='.$object->id.'&action=presend&mode=init">'.$langs->trans('SendMail').'</a></div>';
|
print '<div class="inline-block divButAction"><a class="butAction" href="'.$_SERVER['PHP_SELF'].'?socid='.$object->id.'&action=presend&mode=init">'.$langs->trans('SendMail').'</a></div>';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user