Merge branch '6.0' of git@github.com:Dolibarr/dolibarr.git into develop
Conflicts: htdocs/core/actions_sendmails.inc.php htdocs/core/class/CMailFile.class.php htdocs/filefunc.inc.php
This commit is contained in:
commit
a60cd49fb0
@ -49,6 +49,8 @@ if (empty($argv[1]))
|
||||
print "Example: ".$script_file." release=6.0.0 includecustom=1 includeconstant=FR:INVOICE_CAN_ALWAYS_BE_REMOVED:0 includeconstant=all:MAILING_NO_USING_PHPMAIL:1\n";
|
||||
exit -1;
|
||||
}
|
||||
parse_str($argv[1]);
|
||||
|
||||
$i=0;
|
||||
while ($i < $argc)
|
||||
{
|
||||
@ -98,9 +100,9 @@ foreach ($includeconstants as $countrycode => $tmp)
|
||||
print "\n";
|
||||
|
||||
//$outputfile=dirname(__FILE__).'/../htdocs/install/filelist-'.$release.'.xml';
|
||||
$outputdir=dirname(__FILE__).'/../htdocs/install';
|
||||
print 'Delete current files '.$outputdir.'/filelist-'.$release.'.xml'."\n";
|
||||
dol_delete_file($outputdir.'/filelist-'.$release.'.xml',0,1,1);
|
||||
$outputdir=dirname(dirname(__FILE__)).'/htdocs/install';
|
||||
print 'Delete current files '.$outputdir.'/filelist*.xml'."\n";
|
||||
dol_delete_file($outputdir.'/filelist*.xml',0,1,1);
|
||||
|
||||
$checksumconcat=array();
|
||||
|
||||
|
||||
9419
dev/initdemo/mysqldump_dolibarr_6.0.0.sql
Normal file
9419
dev/initdemo/mysqldump_dolibarr_6.0.0.sql
Normal file
File diff suppressed because one or more lines are too long
@ -192,6 +192,7 @@ export list="
|
||||
--ignore-table=$base.llx_cabinetmed_c_ccam
|
||||
--ignore-table=$base.llx_cabinetmed_c_examconclusion
|
||||
--ignore-table=$base.llx_cabinetmed_cons
|
||||
--ignore-table=$base.llx_cabinetmed_cons_extrafields
|
||||
--ignore-table=$base.llx_cabinetmed_diaglec
|
||||
--ignore-table=$base.llx_cabinetmed_examaut
|
||||
--ignore-table=$base.llx_cabinetmed_exambio
|
||||
@ -207,7 +208,18 @@ export list="
|
||||
--ignore-table=$base.llx_dolicloud_customers
|
||||
--ignore-table=$base.llx_dolicloud_stats
|
||||
--ignore-table=$base.llx_dolicloud_emailstemplates
|
||||
--ignore-table=$base.llx_dolireport_column
|
||||
--ignore-table=$base.llx_dolireport_criteria
|
||||
--ignore-table=$base.llx_dolireport_graph
|
||||
--ignore-table=$base.llx_dolireport_plot
|
||||
--ignore-table=$base.llx_dolireport_report
|
||||
--ignore-table=$base.llx_domain
|
||||
--ignore-table=$base.llx_ecommerce_commande
|
||||
--ignore-table=$base.llx_ecommerce_facture
|
||||
--ignore-table=$base.llx_ecommerce_product
|
||||
--ignore-table=$base.llx_ecommerce_site
|
||||
--ignore-table=$base.llx_ecommerce_societe
|
||||
--ignore-table=$base.llx_ecommerce_socpeople
|
||||
--ignore-table=$base.llx_element_rang
|
||||
--ignore-table=$base.llx_entity
|
||||
--ignore-table=$base.llx_filemanager_roots
|
||||
@ -215,6 +227,8 @@ export list="
|
||||
--ignore-table=$base.llx_google_maps
|
||||
--ignore-table=$base.llx_milestone
|
||||
--ignore-table=$base.llx_monitoring_probes
|
||||
--ignore-table=$base.llx_m
|
||||
--ignore-table=$base.llx_m_extrafields
|
||||
--ignore-table=$base.llx_notes
|
||||
--ignore-table=$base.llx_pos_cash
|
||||
--ignore-table=$base.llx_pos_control_cash
|
||||
|
||||
@ -158,6 +158,7 @@ class Adherent extends CommonObject
|
||||
$from=$conf->email_from;
|
||||
if (! empty($conf->global->ADHERENT_MAIL_FROM)) $from=$conf->global->ADHERENT_MAIL_FROM;
|
||||
|
||||
// Send email (substitutionarray must be done just before this)
|
||||
include_once DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php';
|
||||
$mailfile = new CMailFile($subjecttosend, $this->email, $from, $texttosend, $filename_list, $mimetype_list, $mimefilename_list, $addr_cc, $addr_bcc, $deliveryreceipt, $msgishtml);
|
||||
if ($mailfile->sendfile())
|
||||
|
||||
@ -46,13 +46,18 @@ if ($action == 'test' || $action == 'send')
|
||||
}
|
||||
|
||||
$substitutionarrayfortest=array(
|
||||
'__LOGIN__' => $user->login,
|
||||
'__ID__' => 'TESTIdRecord',
|
||||
'__EMAIL__' => 'TESTEMail',
|
||||
'__LASTNAME__' => 'TESTLastname',
|
||||
'__FIRSTNAME__' => 'TESTFirstname',
|
||||
'__SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))?$usersignature:''),
|
||||
//'__PERSONALIZED__' => 'TESTPersonalized' // Hiden because not used yet
|
||||
'__DOL_MAIN_URL_ROOT__'=>DOL_MAIN_URL_ROOT,
|
||||
'__ID__' => 'RecipientIdRecord',
|
||||
//'__EMAIL__' => 'RecipientEMail', // Done into actions_sendmails
|
||||
'__CHECK_READ__' => (is_object($object) && is_object($object->thirdparty))?'<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$object->thirdparty->tag.'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>':'',
|
||||
'__SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))?$usersignature:''), // Done into actions_sendmails
|
||||
'__LOGIN__' => 'RecipientLogin',
|
||||
'__LASTNAME__' => 'RecipientLastname',
|
||||
'__FIRSTNAME__' => 'RecipientFirstname',
|
||||
'__ADDRESS__'=> 'RecipientAddress',
|
||||
'__ZIP__'=> 'RecipientZip',
|
||||
'__TOWN_'=> 'RecipientTown',
|
||||
'__COUNTRY__'=> 'RecipientCountry'
|
||||
);
|
||||
complete_substitutions_array($substitutionarrayfortest, $langs);
|
||||
|
||||
|
||||
@ -61,7 +61,7 @@ $object->substitutionarray['__(AnyTranslationKey)__']=$langs->trans("Translation
|
||||
|
||||
$object->substitutionarrayfortest=array(
|
||||
'__ID__' => 'TESTIdRecord',
|
||||
'__EMAIL__' => 'TESTEMail',
|
||||
//'__EMAIL__' => 'TESTEMail', // Done into "send" action
|
||||
'__LASTNAME__' => 'TESTLastname',
|
||||
'__FIRSTNAME__' => 'TESTFirstname',
|
||||
'__MAILTOEMAIL__' => 'TESTMailtoEmail',
|
||||
@ -409,6 +409,8 @@ if (empty($reshook))
|
||||
$msgishtml=-1; // Inconnu par defaut
|
||||
if (preg_match('/[\s\t]*<html>/i',$object->body)) $msgishtml=1;
|
||||
|
||||
$object->substitutionarrayfortest['__EMAIL__'] = $object->sendto; // other are set at begin of page
|
||||
|
||||
// Pratique les substitutions sur le sujet et message
|
||||
$tmpsujet=make_substitutions($object->sujet,$object->substitutionarrayfortest);
|
||||
$tmpbody=make_substitutions($object->body,$object->substitutionarrayfortest);
|
||||
|
||||
@ -83,7 +83,7 @@ if (! $error && $massaction == 'confirm_presend')
|
||||
$result=$objecttmp->fetch($toselectid);
|
||||
if ($result > 0)
|
||||
{
|
||||
$listoinvoicesid[$toselectid]=$toselectid;
|
||||
$listofobjectid[$toselectid]=$toselectid;
|
||||
$thirdpartyid=$objecttmp->fk_soc?$objecttmp->fk_soc:$objecttmp->socid;
|
||||
$listofobjectthirdparties[$thirdpartyid]=$thirdpartyid;
|
||||
$listofobjectref[$thirdpartyid][$toselectid]=$objecttmp;
|
||||
@ -170,7 +170,7 @@ if (! $error && $massaction == 'confirm_presend')
|
||||
|
||||
//var_dump($listofobjectref);exit;
|
||||
$attachedfiles=array('paths'=>array(), 'names'=>array(), 'mimes'=>array());
|
||||
$listofqualifiedinvoice=array();
|
||||
$listofqualifiedid=array();
|
||||
$listofqualifiedref=array();
|
||||
foreach($listofobjectref[$thirdpartyid] as $objectid => $object)
|
||||
{
|
||||
@ -224,7 +224,7 @@ if (! $error && $massaction == 'confirm_presend')
|
||||
);
|
||||
}
|
||||
|
||||
$listofqualifiedinvoice[$objectid]=$object;
|
||||
$listofqualifiedid[$objectid]=$object;
|
||||
$listofqualifiedref[$objectid]=$object->ref;
|
||||
}
|
||||
else
|
||||
@ -239,8 +239,8 @@ if (! $error && $massaction == 'confirm_presend')
|
||||
//var_dump($listofqualifiedref);
|
||||
}
|
||||
|
||||
// Loop on each qualified invoice of the thirdparty
|
||||
if (count($listofqualifiedinvoice) > 0)
|
||||
// Loop on each qualified objects of the thirdparty
|
||||
if (count($listofqualifiedid) > 0)
|
||||
{
|
||||
$langs->load("commercial");
|
||||
|
||||
@ -267,17 +267,35 @@ if (! $error && $massaction == 'confirm_presend')
|
||||
$subject = GETPOST('subject');
|
||||
$message = GETPOST('message');
|
||||
$sendtocc = GETPOST('sentocc');
|
||||
$sendtobcc = (empty($conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO)?'':$conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO);
|
||||
$sendtobcc = '';
|
||||
if ($objectclass == 'Propale') $sendtocc = (empty($conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO)?'':$conf->global->MAIN_MAIL_AUTOCOPY_PROPOSAL_TO);
|
||||
if ($objectclass == 'Commande') $sendtocc = (empty($conf->global->MAIN_MAIL_AUTOCOPY_ORDER_TO)?'':$conf->global->MAIN_MAIL_AUTOCOPY_ORDER_TO);
|
||||
if ($objectclass == 'Facture') $sendtocc = (empty($conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO)?'':$conf->global->MAIN_MAIL_AUTOCOPY_INVOICE_TO);
|
||||
if ($objectclass == 'Supplier_Proposal') $sendtocc = (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_PROPOSAL_TO)?'':$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_PROPOSAL_TO);
|
||||
if ($objectclass == 'CommandeFournisseur') $sendtocc = (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO)?'':$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_ORDER_TO);
|
||||
if ($objectclass == 'FactureFournisseur') $sendtocc = (empty($conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO)?'':$conf->global->MAIN_MAIL_AUTOCOPY_SUPPLIER_INVOICE_TO);
|
||||
|
||||
|
||||
$substitutionarray=array(
|
||||
'__ID__' => join(', ',array_keys($listofqualifiedinvoice)),
|
||||
'__DOL_MAIN_URL_ROOT__'=>DOL_MAIN_URL_ROOT,
|
||||
'__ID__' => join(', ',array_keys($listofqualifiedid)),
|
||||
'__EMAIL__' => $thirdparty->email,
|
||||
'__CHECK_READ__' => '<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$thirdparty->tag.'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>',
|
||||
'__FACREF__' => join(', ',$listofqualifiedref), // For backward compatibility
|
||||
'__ORDERREF__' => join(', ',$listofqualifiedref), // For backward compatibility
|
||||
'__PROPREF__' => join(', ',$listofqualifiedref), // For backward compatibility
|
||||
'__REF__' => join(', ',$listofqualifiedref),
|
||||
'__REFCLIENT__' => $thirdparty->name
|
||||
'__REFCLIENT__' => $thirdparty->name,
|
||||
'__SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))?dol_string_nohtmltag($user->signature):'')
|
||||
/* not available on all object
|
||||
/'__FIRSTNAME__'=>(is_object($object)?$object->firstname:''),
|
||||
'__LASTNAME__'=>(is_object($object)?$object->lastname:''),
|
||||
'__FULLNAME__'=>(is_object($object)?$object->getFullName($langs):''),
|
||||
'__ADDRESS__'=>(is_object($object)?$object->address:''),
|
||||
'__ZIP__'=>(is_object($object)?$object->zip:''),
|
||||
'__TOWN_'=>(is_object($object)?$object->town:''),
|
||||
'__COUNTRY__'=>(is_object($object)?$object->country:''),
|
||||
*/
|
||||
);
|
||||
|
||||
$subject=make_substitutions($subject, $substitutionarray);
|
||||
@ -289,7 +307,7 @@ if (! $error && $massaction == 'confirm_presend')
|
||||
|
||||
//var_dump($filepath);
|
||||
|
||||
// Send mail
|
||||
// Send mail (substitutionarray must be done just before this)
|
||||
require_once(DOL_DOCUMENT_ROOT.'/core/class/CMailFile.class.php');
|
||||
$mailfile = new CMailFile($subject,$sendto,$from,$message,$filepath,$mimetype,$filename,$sendtocc,$sendtobcc,$deliveryreceipt,-1);
|
||||
if ($mailfile->error)
|
||||
@ -306,7 +324,7 @@ if (! $error && $massaction == 'confirm_presend')
|
||||
$error=0;
|
||||
|
||||
// Insert logs into agenda
|
||||
foreach($listofqualifiedinvoice as $invid => $object)
|
||||
foreach($listofqualifiedid as $objid => $object)
|
||||
{
|
||||
/*if ($objectclass == 'Propale') $actiontypecode='AC_PROP';
|
||||
if ($objectclass == 'Commande') $actiontypecode='AC_COM';
|
||||
@ -329,7 +347,7 @@ if (! $error && $massaction == 'confirm_presend')
|
||||
$object->sendtoid = 0;
|
||||
$object->actionmsg = $actionmsg; // Long text
|
||||
$object->actionmsg2 = $actionmsg2; // Short text
|
||||
$object->fk_element = $invid;
|
||||
$object->fk_element = $objid;
|
||||
$object->elementtype = $object->element;
|
||||
|
||||
// Appel des triggers
|
||||
@ -404,7 +422,7 @@ if (! $error && $massaction == "builddoc" && $permtoread && ! GETPOST('button_se
|
||||
$result=$objecttmp->fetch($toselectid);
|
||||
if ($result > 0)
|
||||
{
|
||||
$listoinvoicesid[$toselectid]=$toselectid;
|
||||
$listofobjectid[$toselectid]=$toselectid;
|
||||
$thirdpartyid=$objecttmp->fk_soc?$objecttmp->fk_soc:$objecttmp->socid;
|
||||
$listofobjectthirdparties[$thirdpartyid]=$thirdpartyid;
|
||||
$listofobjectref[$toselectid]=$objecttmp->ref;
|
||||
|
||||
@ -344,9 +344,31 @@ if (($action == 'send' || $action == 'relance') && ! $_POST['addfile'] && ! $_PO
|
||||
}
|
||||
}
|
||||
|
||||
// Send mail
|
||||
$substitutionarray=array(
|
||||
'__DOL_MAIN_URL_ROOT__'=>DOL_MAIN_URL_ROOT,
|
||||
'__ID__' => (is_object($object)?$object->id:''),
|
||||
'__EMAIL__' => $sendto,
|
||||
'__CHECK_READ__' => (is_object($object) && is_object($object->thirdparty))?'<img src="'.DOL_MAIN_URL_ROOT.'/public/emailing/mailing-read.php?tag='.$object->thirdparty->tag.'&securitykey='.urlencode($conf->global->MAILING_EMAIL_UNSUBSCRIBE_KEY).'" width="1" height="1" style="width:1px;height:1px" border="0"/>':'',
|
||||
'__REF__' => (is_object($object)?$object->ref:''),
|
||||
'__SIGNATURE__' => (($user->signature && empty($conf->global->MAIN_MAIL_DO_NOT_USE_SIGN))?dol_string_nohtmltag($user->signature):'')
|
||||
/* not available on all object
|
||||
/'__FIRSTNAME__'=>(is_object($object)?$object->firstname:''),
|
||||
'__LASTNAME__'=>(is_object($object)?$object->lastname:''),
|
||||
'__FULLNAME__'=>(is_object($object)?$object->getFullName($langs):''),
|
||||
'__ADDRESS__'=>(is_object($object)?$object->address:''),
|
||||
'__ZIP__'=>(is_object($object)?$object->zip:''),
|
||||
'__TOWN_'=>(is_object($object)?$object->town:''),
|
||||
'__COUNTRY__'=>(is_object($object)?$object->country:''),
|
||||
*/
|
||||
);
|
||||
|
||||
$subject=make_substitutions($subject, $substitutionarray);
|
||||
$message=make_substitutions($message, $substitutionarray);
|
||||
|
||||
// Send mail (substitutionarray must be done just before this)
|
||||
if (empty($sendcontext)) $sendcontext = 'standard';
|
||||
$mailfile = new CMailFile($subject,$sendto,$from,$message,$filepath,$mimetype,$filename,$sendtocc,$sendtobcc,$deliveryreceipt,-1,'','',$trackid,'',$sendcontext);
|
||||
$mailfile = new CMailFile($subject,$sendto,$from,$message,$filepath,$mimetype,$filename,$sendtocc,$sendtobcc,$deliveryreceipt,-1,'','',$trackid,'', $sendcontext);
|
||||
|
||||
if ($mailfile->error)
|
||||
{
|
||||
setEventMessage($mailfile->error, 'errors');
|
||||
|
||||
@ -38,6 +38,7 @@ class CMailFile
|
||||
{
|
||||
public $sendcontext;
|
||||
public $sendmode;
|
||||
public $sendsetup;
|
||||
|
||||
var $subject; // Topic: Subject of email
|
||||
var $addr_from; // From: Label and EMail of sender (must include '<>'). For example '<myemail@example.com>' or 'John Doe <myemail@example.com>' or '<myemail+trackingid@example.com>'). Note that with gmail smtps, value here is forced by google to account (but not the reply-to).
|
||||
@ -178,7 +179,7 @@ class CMailFile
|
||||
//$urlwithroot=DOL_MAIN_URL_ROOT; // This is to use same domain name than current
|
||||
|
||||
// Replace relative /viewimage to absolute path
|
||||
$msg = preg_replace('/src="'.preg_quote(DOL_URL_ROOT,'/').'\/viewimage\.php/', 'src="'.$urlwithroot.'/viewimage.php', $msg, -1, $nbrep);
|
||||
$msg = preg_replace('/src="'.preg_quote(DOL_URL_ROOT,'/').'\/viewimage\.php/ims', 'src="'.$urlwithroot.'/viewimage.php', $msg, -1, $nbrep);
|
||||
|
||||
if (! empty($conf->global->MAIN_MAIL_FORCE_CONTENT_TYPE_TO_HTML)) $this->msgishtml=1; // To force to send everything with content type html.
|
||||
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2008-2011 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2008-2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2008-2017 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
@ -201,11 +201,19 @@ function dol_loginfunction($langs,$conf,$mysoc)
|
||||
$demopassword=$tab[1];
|
||||
}
|
||||
|
||||
// Execute hook getLoginPageOptions
|
||||
// Should be an array with differents options in $hookmanager->resArray
|
||||
// Execute hook getLoginPageOptions (for table)
|
||||
$parameters=array('entity' => GETPOST('entity','int'));
|
||||
$reshook = $hookmanager->executeHooks('getLoginPageOptions',$parameters); // Note that $action and $object may have been modified by some hooks. resArray is filled by hook.
|
||||
$morelogincontent = $hookmanager->resArray['options']; // TODO Use here a resprints
|
||||
$reshook = $hookmanager->executeHooks('getLoginPageOptions',$parameters); // Note that $action and $object may have been modified by some hooks.
|
||||
if (is_array($hookmanager->resArray) && ! empty($hookmanager->resArray)) {
|
||||
$morelogincontent = $hookmanager->resArray; // (deprecated) For compatibility
|
||||
} else {
|
||||
$morelogincontent = $hookmanager->resPrint;
|
||||
}
|
||||
|
||||
// Execute hook getLoginPageExtraOptions (eg for js)
|
||||
$parameters=array('entity' => GETPOST('entity','int'));
|
||||
$reshook = $hookmanager->executeHooks('getLoginPageExtraOptions',$parameters); // Note that $action and $object may have been modified by some hooks.
|
||||
$moreloginextracontent = $hookmanager->resPrint;
|
||||
|
||||
// Login
|
||||
$login = (! empty($hookmanager->resArray['username']) ? $hookmanager->resArray['username'] : (GETPOST("username","alpha") ? GETPOST("username","alpha") : $demologin));
|
||||
|
||||
@ -49,7 +49,7 @@ print top_htmlhead('', $titleofloginpage, 0, 0, $arrayofjs, array(), 0, $disable
|
||||
?>
|
||||
<!-- BEGIN PHP TEMPLATE LOGIN.TPL.PHP -->
|
||||
|
||||
<body class="body bodylogin"<?php print empty($conf->global->MAIN_LOGIN_BACKGROUND)?'':' style="background-size: cover; background-image: url(\''.DOL_URL_ROOT.'/viewimage.php?cache=1&noalt=1&modulepart=mycompany&file='.urlencode($conf->global->MAIN_LOGIN_BACKGROUND).'\')"'; ?>>
|
||||
<body class="body bodylogin"<?php print empty($conf->global->MAIN_LOGIN_BACKGROUND)?'':' style="background-size: cover; background-position: center center; background-attachment: fixed; background-repeat: no-repeat; background-image: url(\''.DOL_URL_ROOT.'/viewimage.php?cache=1&noalt=1&modulepart=mycompany&file='.urlencode($conf->global->MAIN_LOGIN_BACKGROUND).'\')"'; ?>>
|
||||
|
||||
<?php if (empty($conf->dol_use_jmobile)) { ?>
|
||||
<script type="text/javascript">
|
||||
@ -123,23 +123,28 @@ if ($disablenofollow) echo '</a>';
|
||||
</span>
|
||||
</td></tr>
|
||||
<?php
|
||||
if (! empty($morelogincontent) && is_array($morelogincontent)) {
|
||||
foreach ($morelogincontent as $format => $option)
|
||||
{
|
||||
if ($format == 'table') {
|
||||
echo '<!-- Option by hook -->';
|
||||
echo $option;
|
||||
if (! empty($morelogincontent)) {
|
||||
if (is_array($morelogincontent)) {
|
||||
foreach ($morelogincontent as $format => $option)
|
||||
{
|
||||
if ($format == 'table') {
|
||||
echo '<!-- Option by hook -->';
|
||||
echo $option;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
echo '<!-- Option by hook -->';
|
||||
echo $morelogincontent;
|
||||
}
|
||||
}
|
||||
?>
|
||||
<?php
|
||||
if ($captcha) {
|
||||
// Add a variable param to force not using cache (jmobile)
|
||||
$php_self = preg_replace('/[&\?]time=(\d+)/','',$php_self); // Remove param time
|
||||
if (preg_match('/\?/',$php_self)) $php_self.='&time='.dol_print_date(dol_now(),'dayhourlog');
|
||||
else $php_self.='?time='.dol_print_date(dol_now(),'dayhourlog');
|
||||
// TODO: provide accessible captcha variants
|
||||
|
||||
if ($captcha) {
|
||||
// Add a variable param to force not using cache (jmobile)
|
||||
$php_self = preg_replace('/[&\?]time=(\d+)/','',$php_self); // Remove param time
|
||||
if (preg_match('/\?/',$php_self)) $php_self.='&time='.dol_print_date(dol_now(),'dayhourlog');
|
||||
else $php_self.='?time='.dol_print_date(dol_now(),'dayhourlog');
|
||||
// TODO: provide accessible captcha variants
|
||||
?>
|
||||
<!-- Captcha -->
|
||||
<tr>
|
||||
@ -275,9 +280,9 @@ if (!empty($conf->global->MAIN_EASTER_EGG_COMMITSTRIP)) {
|
||||
|
||||
<!-- Common footer is not used for login page, this is same than footer but inside login tpl -->
|
||||
|
||||
<?php if (! empty($conf->global->MAIN_HTML_FOOTER)) print $conf->global->MAIN_HTML_FOOTER; ?>
|
||||
|
||||
<?php
|
||||
if (! empty($conf->global->MAIN_HTML_FOOTER)) print $conf->global->MAIN_HTML_FOOTER;
|
||||
|
||||
if (! empty($morelogincontent) && is_array($morelogincontent)) {
|
||||
foreach ($morelogincontent as $format => $option)
|
||||
{
|
||||
@ -287,9 +292,11 @@ if (! empty($morelogincontent) && is_array($morelogincontent)) {
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
else if (! empty($moreloginextracontent)) {
|
||||
echo '<!-- Javascript by hook -->';
|
||||
echo $moreloginextracontent;
|
||||
}
|
||||
|
||||
<?php
|
||||
// Google Analytics (need Google module)
|
||||
if (! empty($conf->google->enabled) && ! empty($conf->global->MAIN_GOOGLE_AN_ID))
|
||||
{
|
||||
@ -309,9 +316,7 @@ if (! empty($conf->google->enabled) && ! empty($conf->global->MAIN_GOOGLE_AN_ID)
|
||||
print '</script>'."\n";
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
<?php
|
||||
// Google Adsense
|
||||
if (! empty($conf->google->enabled) && ! empty($conf->global->MAIN_GOOGLE_AD_CLIENT) && ! empty($conf->global->MAIN_GOOGLE_AD_SLOT))
|
||||
{
|
||||
|
||||
@ -35,7 +35,7 @@ print top_htmlhead('',$langs->trans('SendNewPassword'));
|
||||
?>
|
||||
<!-- BEGIN PHP TEMPLATE PASSWORDFORGOTTEN.TPL.PHP -->
|
||||
|
||||
<body class="body bodylogin"<?php print empty($conf->global->MAIN_LOGIN_BACKGROUND)?'':' style="background-size: cover; background-image: url(\''.DOL_URL_ROOT.'/viewimage.php?cache=1&noalt=1&modulepart=mycompany&file='.urlencode($conf->global->MAIN_LOGIN_BACKGROUND).'\')"'; ?>>
|
||||
<body class="body bodylogin"<?php print empty($conf->global->MAIN_LOGIN_BACKGROUND)?'':' style="background-size: cover; background-position: center center; background-attachment: fixed; background-repeat: no-repeat; background-image: url(\''.DOL_URL_ROOT.'/viewimage.php?cache=1&noalt=1&modulepart=mycompany&file='.urlencode($conf->global->MAIN_LOGIN_BACKGROUND).'\')"'; ?>>
|
||||
|
||||
<?php if (empty($conf->dol_use_jmobile)) { ?>
|
||||
<script type="text/javascript">
|
||||
@ -88,14 +88,20 @@ if ($disablenofollow) echo '</a>';
|
||||
</tr>
|
||||
|
||||
<?php
|
||||
if (! empty($hookmanager->resArray['options'])) {
|
||||
foreach ($hookmanager->resArray['options'] as $format => $option)
|
||||
{
|
||||
if ($format == 'table') {
|
||||
echo '<!-- Option by hook -->';
|
||||
echo $option;
|
||||
if (! empty($morelogincontent)) {
|
||||
if (is_array($morelogincontent)) {
|
||||
foreach ($morelogincontent as $format => $option)
|
||||
{
|
||||
if ($format == 'table') {
|
||||
echo '<!-- Option by hook -->';
|
||||
echo $option;
|
||||
}
|
||||
}
|
||||
}
|
||||
else {
|
||||
echo '<!-- Option by hook -->';
|
||||
echo $morelogincontent;
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@ -175,6 +181,20 @@ if (! empty($hookmanager->resArray['options'])) {
|
||||
</div>
|
||||
<?php } ?>
|
||||
|
||||
<?php if (! empty($morelogincontent) && is_array($morelogincontent)) {
|
||||
foreach ($morelogincontent as $format => $option)
|
||||
{
|
||||
if ($format == 'js') {
|
||||
echo "\n".'<!-- Javascript by hook -->';
|
||||
echo $option."\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
else if (! empty($moreloginextracontent)) {
|
||||
echo '<!-- Javascript by hook -->';
|
||||
echo $moreloginextracontent;
|
||||
}
|
||||
?>
|
||||
|
||||
</div>
|
||||
</div> <!-- end of center -->
|
||||
|
||||
@ -797,7 +797,6 @@ if (empty($action))
|
||||
if ($optioncss != '') print '<input type="hidden" name="optioncss" value="'.$optioncss.'">';
|
||||
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
|
||||
print '<input type="hidden" name="formfilteraction" id="formfilteraction" value="list">';
|
||||
print '<input type="hidden" name="action" value="list">';
|
||||
print '<input type="hidden" name="sortfield" value="'.$sortfield.'">';
|
||||
print '<input type="hidden" name="sortorder" value="'.$sortorder.'">';
|
||||
print '<input type="hidden" name="page" value="'.$page.'">';
|
||||
|
||||
@ -71,7 +71,7 @@ MaxSize=Maximum size
|
||||
AttachANewFile=Attach a new file/document
|
||||
LinkedObject=Linked object
|
||||
NbOfActiveNotifications=Number of notifications (nb of recipient emails)
|
||||
PredefinedMailTest=This is a test mail.\nThe two lines are separated by a carriage return.\n\n__SIGNATURE__
|
||||
PredefinedMailTest=This is a test mail sent to __EMAIL__.\nThe two lines are separated by a carriage return.\n\n__SIGNATURE__
|
||||
PredefinedMailTestHtml=This is a <b>test</b> mail (the word test must be in bold).<br>The two lines are separated by a carriage return.<br><br>__SIGNATURE__
|
||||
PredefinedMailContentSendInvoice=__CONTACTCIVNAME__\n\nYou will find here the invoice __REF__\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__
|
||||
PredefinedMailContentSendInvoiceReminder=__CONTACTCIVNAME__\n\nWe would like to warn you that the invoice __REF__ seems to not being payed. So this is the invoice in attachment again, as a reminder.\n\n__PERSONALIZED__Sincerely\n\n__SIGNATURE__
|
||||
|
||||
@ -224,10 +224,19 @@ if (function_exists("imagecreatefrompng") && ! $disabled)
|
||||
$captcha_refresh = img_picto($langs->trans("Refresh"),'refresh','id="captcha_refresh_img"');
|
||||
}
|
||||
|
||||
// Execute hook getPasswordForgottenPageOptions
|
||||
// Should be an array with differents options in $hookmanager->resArray
|
||||
// Execute hook getPasswordForgottenPageOptions (for table)
|
||||
$parameters=array('entity' => GETPOST('entity','int'));
|
||||
$hookmanager->executeHooks('getPasswordForgottenPageOptions',$parameters); // Note that $action and $object may have been modified by some hooks
|
||||
if (is_array($hookmanager->resArray) && ! empty($hookmanager->resArray)) {
|
||||
$morelogincontent = $hookmanager->resArray; // (deprecated) For compatibility
|
||||
} else {
|
||||
$morelogincontent = $hookmanager->resPrint;
|
||||
}
|
||||
|
||||
// Execute hook getPasswordForgottenPageExtraOptions (eg for js)
|
||||
$parameters=array('entity' => GETPOST('entity','int'));
|
||||
$reshook = $hookmanager->executeHooks('getPasswordForgottenPageExtraOptions',$parameters); // Note that $action and $object may have been modified by some hooks.
|
||||
$moreloginextracontent = $hookmanager->resPrint;
|
||||
|
||||
include $template_dir.'passwordforgotten.tpl.php'; // To use native PHP
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user