From fb0e7ede8942abe74577f9e222598c10bd192da6 Mon Sep 17 00:00:00 2001 From: Yaman Qalieh <ybq987@gmail.com> Date: Sat, 2 Apr 2022 06:53:10 -0400 Subject: [PATCH] [ParksOnTheAirBridge] Fix links (#2590) --- bridges/ParksOnTheAirBridge.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/bridges/ParksOnTheAirBridge.php b/bridges/ParksOnTheAirBridge.php index f46ffc43..ceaf78b6 100644 --- a/bridges/ParksOnTheAirBridge.php +++ b/bridges/ParksOnTheAirBridge.php @@ -3,7 +3,8 @@ class ParksOnTheAirBridge extends BridgeAbstract { const MAINTAINER = 's0lesurviv0r'; const NAME = 'Parks On The Air Spots'; - const URI = 'https://api.pota.app/spot/activator'; + const URI = 'https://pota.app/#'; + const API_URI = 'https://api.pota.app/spot/activator'; const CACHE_TIMEOUT = 60; // 1m const DESCRIPTION = 'Parks On The Air Activator Spots'; @@ -11,16 +12,17 @@ class ParksOnTheAirBridge extends BridgeAbstract { $header = array('Content-type:application/json'); $opts = array(CURLOPT_HTTPGET => 1); - $json = getContents($this->getURI(), $header, $opts); + $json = getContents(self::API_URI, $header, $opts); $spots = json_decode($json, true); foreach ($spots as $spot) { $title = $spot['activator'] . ' @ ' . $spot['reference'] . ' ' . $spot['frequency'] . ' kHz'; + $park_link = self::URI . '/park/' . $spot['reference']; $content = <<<EOL -<a href="https://pota.us/#/parks/{$spot['reference']}"> +<a href="{$park_link}"> {$spot['reference']}, {$spot['name']}</a><br /> Location: {$spot['locationDesc']}<br /> Frequency: {$spot['frequency']} kHz<br /> @@ -29,7 +31,7 @@ Comments: {$spot['comments']} EOL; $this->items[] = array( - 'uri' => 'https://pota.us/#/', + 'uri' => $park_link, 'title' => $title, 'content' => $content, 'timestamp' => $spot['spotTime']