mirror of
https://github.com/wavelog/wavelog.git
synced 2026-03-22 10:24:14 +00:00
Catch empty dates
This commit is contained in:
@@ -178,9 +178,9 @@ function echo_table_col($row, $name) {
|
||||
|
||||
?>
|
||||
|
||||
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date($custom_date_format, $timestamp); ?></td>
|
||||
<td><?php $timestamp = strtotime($row->COL_TIME_ON ?? '1970-01-01 00:00:00'); echo date($custom_date_format, $timestamp); ?></td>
|
||||
<?php if(($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?>
|
||||
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('H:i', $timestamp); ?></td>
|
||||
<td><?php $timestamp = strtotime($row->COL_TIME_ON ?? '1970-01-01 00:00:00'); echo date('H:i', $timestamp); ?></td>
|
||||
|
||||
<?php } ?>
|
||||
<td>
|
||||
|
||||
@@ -144,9 +144,9 @@ $ci =& get_instance();
|
||||
}
|
||||
?>
|
||||
<?php echo '<tr class="tr'.($i & 1).'" id="qso_'. $row->COL_PRIMARY_KEY .'">'; ?>
|
||||
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date($custom_date_format, $timestamp); ?></td>
|
||||
<td><?php $timestamp = strtotime($row->COL_TIME_ON ?? '1970-01-01 00:00:00'); echo date($custom_date_format, $timestamp); ?></td>
|
||||
<?php if(($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?>
|
||||
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('H:i', $timestamp); ?></td>
|
||||
<td><?php $timestamp = strtotime($row->COL_TIME_ON ?? '1970-01-01 00:00:00'); echo date('H:i', $timestamp); ?></td>
|
||||
<?php } ?>
|
||||
<td>
|
||||
<a id="edit_qso" href="javascript:displayQso(<?php echo $row->COL_PRIMARY_KEY; ?>)"><?php echo str_replace("0","Ø",strtoupper($row->COL_CALL)); ?></a>
|
||||
|
||||
@@ -104,9 +104,9 @@ function echo_table_col($row, $name) {
|
||||
$custom_date_format = $this->config->item('qso_date_format');
|
||||
}
|
||||
echo '<tr class="tr'.($i & 1).'" id="qso_'. $row->COL_PRIMARY_KEY .'">'; ?>
|
||||
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date($custom_date_format, $timestamp); ?></td>
|
||||
<td><?php $timestamp = strtotime($row->COL_TIME_ON ?? '1970-01-01 00:00:00'); echo date($custom_date_format, $timestamp); ?></td>
|
||||
<?php if(($this->config->item('use_auth') && ($this->session->userdata('user_type') >= 2)) || $this->config->item('use_auth') === FALSE || ($this->config->item('show_time'))) { ?>
|
||||
<td><?php $timestamp = strtotime($row->COL_TIME_ON); echo date('H:i', $timestamp); ?></td>
|
||||
<td><?php $timestamp = strtotime($row->COL_TIME_ON ?? '1970-01-01 00:00:00'); echo date('H:i', $timestamp); ?></td>
|
||||
<?php } ?>
|
||||
<td>
|
||||
<a id="edit_qso" href="javascript:displayQso(<?php echo $row->COL_PRIMARY_KEY; ?>)"><?php echo str_replace("0","Ø",strtoupper($row->COL_CALL)); ?></a>
|
||||
|
||||
@@ -144,7 +144,7 @@ class QSO
|
||||
// Get Default date format from /config/wavelog.php
|
||||
$custom_date_format = $CI->config->item('qso_date_format');
|
||||
}
|
||||
$this->qsoDateTime = date($custom_date_format . " H:i", strtotime($data['COL_TIME_ON']));
|
||||
$this->qsoDateTime = date($custom_date_format . " H:i", strtotime($data['COL_TIME_ON'] ?? '1970-01-01 00:00:00'));
|
||||
|
||||
$this->de = $data['station_callsign'];
|
||||
$this->dx = $data['COL_CALL'];
|
||||
|
||||
Reference in New Issue
Block a user