mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 09:38:23 +01:00
Remove warnings
This commit is contained in:
@@ -691,11 +691,11 @@ if ($resql)
|
||||
// Date creation
|
||||
if (! empty($arrayfields['a.datec']['checked'])) {
|
||||
// Status/Percent
|
||||
print '<td align="center" class="nowrap">'.dol_print_date($obj->datec, 'dayhour').'</td>';
|
||||
print '<td align="center" class="nowrap">'.dol_print_date($db->jdate($obj->datec), 'dayhour').'</td>';
|
||||
}
|
||||
// Date update
|
||||
if (! empty($arrayfields['a.tms']['checked'])) {
|
||||
print '<td align="center" class="nowrap">'.dol_print_date($obj->datem, 'dayhour').'</td>';
|
||||
print '<td align="center" class="nowrap">'.dol_print_date($db->jdate($obj->datem), 'dayhour').'</td>';
|
||||
}
|
||||
if (! empty($arrayfields['a.percent']['checked'])) {
|
||||
// Status/Percent
|
||||
|
||||
@@ -1790,9 +1790,9 @@ function dol_print_date($time, $format = '', $tzoutput = 'tzserver', $outputlang
|
||||
if (preg_match('/^([0-9]+)\-([0-9]+)\-([0-9]+) ?([0-9]+)?:?([0-9]+)?:?([0-9]+)?/i', $time, $reg)
|
||||
|| preg_match('/^([0-9][0-9][0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])([0-9][0-9])$/i', $time, $reg)) // Deprecated. Ex: 1970-01-01, 1970-01-01 01:00:00, 19700101010000
|
||||
{
|
||||
// TODO Remove this.
|
||||
// This part of code should not be used.
|
||||
// TODO Remove this. This part of code should not be used.
|
||||
dol_syslog("Functions.lib::dol_print_date function call with deprecated value of time in page ".$_SERVER["PHP_SELF"], LOG_ERR);
|
||||
//if (function_exists('debug_print_backtrace')) debug_print_backtrace();
|
||||
// Date has format 'YYYY-MM-DD' or 'YYYY-MM-DD HH:MM:SS' or 'YYYYMMDDHHMMSS'
|
||||
$syear = (! empty($reg[1]) ? $reg[1] : '');
|
||||
$smonth = (! empty($reg[2]) ? $reg[2] : '');
|
||||
@@ -1801,7 +1801,7 @@ function dol_print_date($time, $format = '', $tzoutput = 'tzserver', $outputlang
|
||||
$smin = (! empty($reg[5]) ? $reg[5] : '');
|
||||
$ssec = (! empty($reg[6]) ? $reg[6] : '');
|
||||
|
||||
$time=dol_mktime($shour, $smin, $ssec, $smonth, $sday, $syear, true);
|
||||
$time=²($shour, $smin, $ssec, $smonth, $sday, $syear, true);
|
||||
$ret=adodb_strftime($format, $time+$offsettz+$offsetdst, $to_gmt);
|
||||
}
|
||||
else
|
||||
|
||||
@@ -226,8 +226,8 @@ if (! empty($conf->holiday->enabled) && $user->rights->holiday->read)
|
||||
$starthalfday=($obj->halfday == -1 || $obj->halfday == 2)?'afternoon':'morning';
|
||||
$endhalfday=($obj->halfday == 1 || $obj->halfday == 2)?'morning':'afternoon';
|
||||
|
||||
print '<td>'.dol_print_date($obj->date_start, 'day').' '.$langs->trans($listhalfday[$starthalfday]);
|
||||
print '<td>'.dol_print_date($obj->date_end, 'day').' '.$langs->trans($listhalfday[$endhalfday]);
|
||||
print '<td>'.dol_print_date($db->jdate($obj->date_start), 'day').' '.$langs->trans($listhalfday[$starthalfday]);
|
||||
print '<td>'.dol_print_date($db->jdate($obj->date_end), 'day').' '.$langs->trans($listhalfday[$endhalfday]);
|
||||
print '<td class="right">'.dol_print_date($db->jdate($obj->dm), 'day').'</td>';
|
||||
print '<td>'.$holidaystatic->LibStatut($obj->status, 3).'</td>';
|
||||
print '</tr>';
|
||||
|
||||
@@ -503,7 +503,9 @@ while ($i < min($num, $limit))
|
||||
print $val['css'];
|
||||
if ($cssforfield || $val['css']) print '"';
|
||||
print '>';
|
||||
print $object->showOutputField($val, $key, $obj->$key, '');
|
||||
if ($key == 'status') print $object->getLibStatut(5);
|
||||
elseif (in_array($val['type'], array('date','datetime','timestamp'))) print $object->showOutputField($val, $key, $db->jdate($obj->$key), '');
|
||||
else print $object->showOutputField($val, $key, $obj->$key, '');
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
if (! empty($val['isameasure']))
|
||||
|
||||
@@ -640,6 +640,7 @@ while ($i < min($num, $limit))
|
||||
if ($cssforfield || $val['css']) print '"';
|
||||
print '>';
|
||||
if ($key == 'fk_statut') print $object->getLibStatut(5);
|
||||
elseif (in_array($val['type'], array('date','datetime','timestamp'))) print $object->showOutputField($val, $key, $db->jdate($obj->$key), '');
|
||||
else print $object->showOutputField($val, $key, $obj->$key, '');
|
||||
print '</td>';
|
||||
if (! $i) $totalarray['nbfield']++;
|
||||
|
||||
Reference in New Issue
Block a user