Merge remote-tracking branch 'upstream/develop' into free_email
This commit is contained in:
commit
f13c3447f1
@ -60,7 +60,7 @@ function printDropdownBookmarksList()
|
||||
}
|
||||
|
||||
$searchForm = '<!-- form with POST method by default, will be replaced with GET for external link by js -->'."\n";
|
||||
$searchForm .= '<form id="top-menu-action-bookmark" name="actionbookmark" method="POST" action=""'.(empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? 'onsubmit="return false"' : '').'>';
|
||||
$searchForm .= '<form id="top-menu-action-bookmark" name="actionbookmark" method="POST" action=""'.(empty($conf->global->MAIN_OPTIMIZEFORTEXTBROWSER) ? ' onsubmit="return false"' : '').'>';
|
||||
$searchForm .= '<input type="hidden" name="token" value="'.newToken().'">';
|
||||
|
||||
|
||||
|
||||
@ -6358,6 +6358,17 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
|
||||
{
|
||||
foreach ($extrafields->attributes[$object->table_element]['label'] as $key => $label) {
|
||||
$substitutionarray['__EXTRAFIELD_'.strtoupper($key).'__'] = $object->array_options['options_'.$key];
|
||||
if ($extrafields->attribute_type[$key] == 'date') {
|
||||
$substitutionarray['__EXTRAFIELD_' . strtoupper($key) . '__'] = dol_print_date($object->array_options['options_' . $key], 'day');
|
||||
$substitutionarray['__EXTRAFIELD_' . strtoupper($key) . '_LOCALE__'] = dol_print_date($object->array_options['options_' . $key], 'day', 'tzserver', $outputlangs);
|
||||
$substitutionarray['__EXTRAFIELD_' . strtoupper($key) . '_RFC__'] = dol_print_date($object->array_options['options_' . $key], 'dayrfc');
|
||||
} elseif ($extrafields->attribute_type[$key] == 'datetime') {
|
||||
$datetime = $object->array_options['options_'.$key];
|
||||
$substitutionarray['__EXTRAFIELD_' . strtoupper($key) . '__'] = ($datetime != "0000-00-00 00:00:00" ? dol_print_date($datetime, 'dayhour') : '');
|
||||
$substitutionarray['__EXTRAFIELD_' . strtoupper($key) . '_LOCALE__'] = ($datetime != "0000-00-00 00:00:00" ? dol_print_date($datetime, 'dayhour', 'tzserver', $outputlangs) : '');
|
||||
$substitutionarray['__EXTRAFIELD_' . strtoupper($key) . '_DAY_LOCALE__'] = ($datetime != "0000-00-00 00:00:00" ? dol_print_date($datetime, 'day', 'tzserver', $outputlangs) : '');
|
||||
$substitutionarray['__EXTRAFIELD_' . strtoupper($key) . '_RFC__'] = ($datetime != "0000-00-00 00:00:00" ? dol_print_date($datetime, 'dayhourrfc') : '');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -32,6 +32,11 @@ if (!defined('NOLOGIN')) define('NOLOGIN', 1); // File must be accessed
|
||||
if (!defined('NOREQUIREHTML')) define('NOREQUIREHTML', 1);
|
||||
if (!defined('NOREQUIREAJAX')) define('NOREQUIREAJAX', '1');
|
||||
|
||||
session_cache_limiter('public');
|
||||
// false or '' = keep cache instruction added by server
|
||||
// 'public' = remove cache instruction added by server
|
||||
// and if no cache-control added later, a default cache delay (10800) will be added by PHP.
|
||||
|
||||
// Load Dolibarr environment
|
||||
$res = 0;
|
||||
// Try main.inc.php into web root known defined into CONTEXT_DOCUMENT_ROOT (not always defined)
|
||||
@ -48,10 +53,6 @@ if (!$res) die("Include of main fails");
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/lib/functions2.lib.php';
|
||||
|
||||
session_cache_limiter('public');
|
||||
// false or '' = keep cache instruction added by server
|
||||
// 'public' = remove cache instruction added by server and if no cache-control added later, a default cache delay (10800) will be added by PHP.
|
||||
|
||||
// Load user to have $user->conf loaded (not done by default here because of NOLOGIN constant defined) and load permission if we need to use them in CSS
|
||||
/*if (empty($user->id) && ! empty($_SESSION['dol_login']))
|
||||
{
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user