From 29076406280ccae5b2c3e09acab2fbf2a8afee18 Mon Sep 17 00:00:00 2001 From: Peter Goodhall Date: Wed, 24 Aug 2022 17:18:11 +0100 Subject: [PATCH] [Tweet] Only show distance if gridsquare is provided --- application/views/view_log/qso.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/application/views/view_log/qso.php b/application/views/view_log/qso.php index 3fa8fed1..3d32a119 100644 --- a/application/views/view_log/qso.php +++ b/application/views/view_log/qso.php @@ -309,9 +309,11 @@ $twitter_band_sat = $row->COL_BAND; $hashtags = "#hamr #cloudlog"; } - if (!isset($distance)) - $distance = ""; - $twitter_string = urlencode("Just worked ".$row->COL_CALL." in ".ucwords(strtolower(($row->COL_COUNTRY)))." (Gridsquare: ".$row->COL_GRIDSQUARE." / distance: ".$distance.") on ".$twitter_band_sat." using ".($row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE)." ".$hashtags); + if (!isset($distance)) { + $twitter_string = urlencode("Just worked ".$row->COL_CALL." in ".ucwords(strtolower(($row->COL_COUNTRY)))." on ".$twitter_band_sat." using ".($row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE)." ".$hashtags); + } else { + $twitter_string = urlencode("Just worked ".$row->COL_CALL." in ".ucwords(strtolower(($row->COL_COUNTRY)))." (Gridsquare: ".$row->COL_GRIDSQUARE." / distance: ".$distance.") on ".$twitter_band_sat." using ".($row->COL_SUBMODE==null?$row->COL_MODE:$row->COL_SUBMODE)." ".$hashtags); + } ?>