Skip to content
Snippets Groups Projects
Commit 39b24a33 authored by Maximilien Rozniecki's avatar Maximilien Rozniecki
Browse files

Merge branch '2022.5_rc_php8_compat' into '2022.5_rc'

php8 compat

See merge request !1
parents 01a562c2 6fc0f3ad
No related branches found
No related tags found
3 merge requests!32022.5.3 rc,!22022.5_rc -> 2022.5,!1php8 compat
......@@ -136,7 +136,7 @@ print "<br>\n";
$head = pdfdownloadnotifier_admin_prepare_head();
dol_fiche_head($head, 'settings', $langs->trans("Module163050Name"), 0, 'opendsi@pdfdownloadnotifier');
print dol_get_fiche_head($head, 'settings', $langs->trans("Module163050Name"), 0, 'opendsi@pdfdownloadnotifier');
/**
......@@ -169,7 +169,7 @@ print '<tr class="oddeven">' . "\n";
print '<td>' . $langs->trans("PdfDownloadNotifierDefaultSendToName") . '</td>' . "\n";
print '<td>' . $langs->trans("PdfDownloadNotifierDefaultSendToDesc") . '</td>' . "\n";
print '<td class="nowrap right">' . "\n";
print '<input type="text" name="PDFDOWNLOADNOTIFIER_DEFAULT_SEND_TO" size="50" value="' . dol_escape_htmltag($conf->global->PDFDOWNLOADNOTIFIER_DEFAULT_SEND_TO) . '" />' . "\n";
print '<input type="text" name="PDFDOWNLOADNOTIFIER_DEFAULT_SEND_TO" size="50" value="' . dol_escape_htmltag(empty($conf->global->PDFDOWNLOADNOTIFIER_DEFAULT_SEND_TO)?'':$conf->global->PDFDOWNLOADNOTIFIER_DEFAULT_SEND_TO) . '" />' . "\n";
print '</td></tr>' . "\n";
print '</table>';
......@@ -200,7 +200,7 @@ print "</tr>\n";
foreach ($element_list as $element_type => $element_info) {
$element_prop = getElementProperties($element_type);
if (is_array($element_prop) && $conf->{$element_prop['module']}->enabled) {
if (is_array($element_prop) && !empty($conf->{$element_prop['module']}->enabled) && $conf->{$element_prop['module']}->enabled) {
if (!empty($element_info['langs'])) $langs->load($element_info['langs']);
dol_include_once('/' . $element_prop['classpath'] . '/' . $element_prop['classfile'] . '.class.php');
$objecttmp = new $element_prop['classname']($db);
......@@ -214,7 +214,7 @@ foreach ($element_list as $element_type => $element_info) {
// Contact type to notify by email
$emailNotifyContactTypeConstName = 'PDFDOWNLOADNOTIFIER_NOTIFY_CONTACT_TYPE_BY_EMAIL_' . $key;
print '<td>';
print $formpdfdownloadnotifier->multiselectTypeContact($objecttmp, $conf->global->$emailNotifyContactTypeConstName, $emailNotifyContactTypeConstName, 'internal', 'position', 'minwidth500');
print $formpdfdownloadnotifier->multiselectTypeContact($objecttmp, empty($conf->global->$emailNotifyContactTypeConstName)?'':$conf->global->$emailNotifyContactTypeConstName, $emailNotifyContactTypeConstName, 'internal', 'position', 'minwidth500');
print "</td>\n";
// Notify by email
......@@ -258,7 +258,7 @@ print '</div>';
print '</form>';
dol_fiche_end();
print dol_get_fiche_end();
llxFooter();
......
......@@ -23,7 +23,7 @@
function pdfdownloadnotifier_completesubstitutionarray(&$substitutionarray, $langs, $object, $parameters)
{
$mode = $parameters['mode'];
$mode = empty($parameters['mode'])?'':$parameters['mode'];
if ($mode == 'formemail' || $mode == 'formemailwithlines') {
$langs->load('pdfdownloadnotifier@pdfdownloadnotifier');
$substitutionarray['__PDFDOWNLOADNOTIFIER_DOWNLOAD_FILENAME__'] = isset($object->context['pdfdownloadnotifier_download_filename']) ? $object->context['pdfdownloadnotifier_download_filename'] : $langs->trans('PdfDownloadNotifierDownloadFilename');
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment