FIX #16077
This commit is contained in:
parent
f462e353e9
commit
9d0945bbe2
@ -1984,7 +1984,7 @@ function dol_print_date($time, $format = '', $tzoutput = 'auto', $outputlangs =
|
|||||||
{
|
{
|
||||||
global $conf, $langs;
|
global $conf, $langs;
|
||||||
|
|
||||||
if ($tzoutput == 'auto') {
|
if ($tzoutput === 'auto') {
|
||||||
$tzoutput = (empty($conf) ? 'tzserver' : $conf->tzuserinputkey);
|
$tzoutput = (empty($conf) ? 'tzserver' : $conf->tzuserinputkey);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@ -217,8 +217,9 @@ if (empty($reshook))
|
|||||||
if (!empty($origin) && !empty($originid))
|
if (!empty($origin) && !empty($originid))
|
||||||
{
|
{
|
||||||
// Parse element/subelement (ex: project_task)
|
// Parse element/subelement (ex: project_task)
|
||||||
$element = $subelement = $_POST['origin'];
|
$regs = array();
|
||||||
if (preg_match('/^([^_]+)_([^_]+)/i', $_POST['origin'], $regs))
|
$element = $subelement = GETPOST('origin', 'alphanohtml');
|
||||||
|
if (preg_match('/^([^_]+)_([^_]+)/i', GETPOST('origin', 'alphanohtml'), $regs))
|
||||||
{
|
{
|
||||||
$element = $regs[1];
|
$element = $regs[1];
|
||||||
$subelement = $regs[2];
|
$subelement = $regs[2];
|
||||||
@ -478,8 +479,7 @@ if (empty($reshook))
|
|||||||
|
|
||||||
$desc = GETPOST('np_desc', 'restricthtml');
|
$desc = GETPOST('np_desc', 'restricthtml');
|
||||||
$date_intervention = dol_mktime(GETPOST('dihour', 'int'), GETPOST('dimin', 'int'), 0, GETPOST('dimonth', 'int'), GETPOST('diday', 'int'), GETPOST('diyear', 'int'));
|
$date_intervention = dol_mktime(GETPOST('dihour', 'int'), GETPOST('dimin', 'int'), 0, GETPOST('dimonth', 'int'), GETPOST('diday', 'int'), GETPOST('diyear', 'int'));
|
||||||
$duration = empty($conf->global->FICHINTER_WITHOUT_DURATION) ?convertTime2Seconds(GETPOST('durationhour', 'int'), GETPOST('durationmin', 'int')) : 0;
|
$duration = empty($conf->global->FICHINTER_WITHOUT_DURATION) ? convertTime2Seconds(GETPOST('durationhour', 'int'), GETPOST('durationmin', 'int')) : 0;
|
||||||
|
|
||||||
|
|
||||||
// Extrafields
|
// Extrafields
|
||||||
$extrafields->fetch_name_optionals_label($object->table_element_line);
|
$extrafields->fetch_name_optionals_label($object->table_element_line);
|
||||||
@ -1335,8 +1335,7 @@ if ($action == 'create')
|
|||||||
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" name="addinter" method="post">';
|
print '<form action="'.$_SERVER["PHP_SELF"].'?id='.$object->id.'" name="addinter" method="post">';
|
||||||
print '<input type="hidden" name="token" value="'.newToken().'">';
|
print '<input type="hidden" name="token" value="'.newToken().'">';
|
||||||
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
print '<input type="hidden" name="id" value="'.$object->id.'">';
|
||||||
if ($action == 'editline')
|
if ($action == 'editline') {
|
||||||
{
|
|
||||||
print '<input type="hidden" name="action" value="updateline">';
|
print '<input type="hidden" name="action" value="updateline">';
|
||||||
print '<input type="hidden" name="line_id" value="'.GETPOST('line_id', 'int').'">';
|
print '<input type="hidden" name="line_id" value="'.GETPOST('line_id', 'int').'">';
|
||||||
} else {
|
} else {
|
||||||
@ -1348,8 +1347,9 @@ if ($action == 'create')
|
|||||||
$sql .= ' ft.date as date_intervention';
|
$sql .= ' ft.date as date_intervention';
|
||||||
$sql .= ' FROM '.MAIN_DB_PREFIX.'fichinterdet as ft';
|
$sql .= ' FROM '.MAIN_DB_PREFIX.'fichinterdet as ft';
|
||||||
$sql .= ' WHERE ft.fk_fichinter = '.$object->id;
|
$sql .= ' WHERE ft.fk_fichinter = '.$object->id;
|
||||||
if (!empty($conf->global->FICHINTER_HIDE_EMPTY_DURATION))
|
if (!empty($conf->global->FICHINTER_HIDE_EMPTY_DURATION)) {
|
||||||
$sql .= ' AND ft.duree <> 0';
|
$sql .= ' AND ft.duree <> 0';
|
||||||
|
}
|
||||||
$sql .= ' ORDER BY ft.rang ASC, ft.date ASC, ft.rowid';
|
$sql .= ' ORDER BY ft.rang ASC, ft.date ASC, ft.rowid';
|
||||||
|
|
||||||
$resql = $db->query($sql);
|
$resql = $db->query($sql);
|
||||||
@ -1376,13 +1376,11 @@ if ($action == 'create')
|
|||||||
print '<td class="liste_titre"> </td>';
|
print '<td class="liste_titre"> </td>';
|
||||||
print "</tr>\n";
|
print "</tr>\n";
|
||||||
}
|
}
|
||||||
while ($i < $num)
|
while ($i < $num) {
|
||||||
{
|
|
||||||
$objp = $db->fetch_object($resql);
|
$objp = $db->fetch_object($resql);
|
||||||
|
|
||||||
// Ligne en mode visu
|
// Ligne en mode visu
|
||||||
if ($action != 'editline' || GETPOST('line_id', 'int') != $objp->rowid)
|
if ($action != 'editline' || GETPOST('line_id', 'int') != $objp->rowid) {
|
||||||
{
|
|
||||||
print '<tr class="oddeven">';
|
print '<tr class="oddeven">';
|
||||||
|
|
||||||
// No.
|
// No.
|
||||||
@ -1402,8 +1400,7 @@ if ($action == 'create')
|
|||||||
|
|
||||||
print "</td>\n";
|
print "</td>\n";
|
||||||
|
|
||||||
|
// Icon to edit and delete
|
||||||
// Econ to edit and delete
|
|
||||||
if ($object->statut == 0 && $user->rights->ficheinter->creer)
|
if ($object->statut == 0 && $user->rights->ficheinter->creer)
|
||||||
{
|
{
|
||||||
print '<td class="center">';
|
print '<td class="center">';
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user