Show SAT displayname if name is empty

This commit is contained in:
phl0
2026-01-20 08:47:53 +01:00
parent 0fdfe4e226
commit 70b1873a9d

View File

@@ -3,11 +3,11 @@
<div class="tleinfo">
<?php
if ($tleinfo->tle) {
echo sprintf(__("TLE information for %s (last updated: %s)"), $satinfo[0]->name, date($custom_date_format . " H:i", strtotime($tleinfo->updated)));
echo sprintf(__("TLE information for %s (last updated: %s)"), ($satinfo[0]->name ? $satinfo[0]->name : $satinfo[0]->displayname), date($custom_date_format . " H:i", strtotime($tleinfo->updated)));
echo '<br /><br /><pre>' . $tleinfo->tle . '</pre>';
echo '<button class="btn btn-sm btn-danger deletetlebutton" onclick="deleteTle(' . $satinfo[0]->id . ');">'.__("Delete TLE"). '</button>';
} else {
echo sprintf(__("No TLE information found for %s"), $satinfo[0]->name);
echo sprintf(__("No TLE information found for %s"), ($satinfo[0]->name ? $satinfo[0]->name : $satinfo[0]->displayname));
echo '<br /><br /><button class="btn btn-sm btn-success addtlebutton" onclick="addTle(' . $satinfo[0]->id . ');">'.__("Add TLE"). '</button>';
} ?>
</div>