Skip to content

Commit

Permalink
🐛 Fix issues found in prod
Browse files Browse the repository at this point in the history
  • Loading branch information
akrherz committed Mar 7, 2025
1 parent 09e7979 commit 821ffd8
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
4 changes: 2 additions & 2 deletions htdocs/COOP/extremes.php
Original file line number Diff line number Diff line change
Expand Up @@ -115,7 +115,7 @@
$eyear,
);
$jdata = file_get_contents($inturl);
$URI = str_replace($INTERNAL_BASEURL, $EXTERNAL_BASEURL, $inturl);
$URL = str_replace($INTERNAL_BASEURL, $EXTERNAL_BASEURL, $inturl);
$json = json_decode($jdata, $assoc = TRUE);
$data = array();
$table = "";
Expand Down Expand Up @@ -200,7 +200,7 @@
<p>The data found in this table was derived from the following
<a href="/json/">JSON webservice</a>:<br />
<code>{$URI}</code>
<code>{$URL}</code>
</p>
<form method="GET" action="extremes.php" name="myform">
Expand Down
11 changes: 6 additions & 5 deletions htdocs/request/coop/dl.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,9 @@
$year2 = isset($_GET["year2"]) ? $_GET["year2"] : die("No year2 specified");
$vars = isset($_GET["vars"]) ? $_GET["vars"] : die("No vars specified");

$gis = isset($_GET["gis"]) ? $_GET["gis"] : 'no';
$delim = isset($_GET["delim"]) ? $_GET["delim"] : ",";
$sample = isset($_GET["sample"]) ? $_GET["sample"] : "1min";
$what = isset($_GET["what"]) ? $_GET["what"] : 'dl';
$gis = isset($_GET["gis"]) ? xssafe($_GET["gis"]) : 'no';
$delim = isset($_GET["delim"]) ? xssafe($_GET["delim"]) : ",";
$what = isset($_GET["what"]) ? xssafe($_GET["what"]) : 'dl';

$nt = new NetworkTable($network);
$cities = $nt->table;
Expand Down Expand Up @@ -318,7 +317,9 @@
}
} else if ($what != "plot") {

$rs = pg_exec($connection, $sqlStr);
$stname = uniqid();
pg_prepare($connection, $stname, $sqlStr);
$rs = pg_execute($connection, $stname, Array($stationSQL));

if ($gis == "yes") {
echo "station" . $d[$delim] . "station_name" . $d[$delim] . "lat" . $d[$delim] . "lon" . $d[$delim] . "day" . $d[$delim] . "julianday" . $d[$delim];
Expand Down
1 change: 1 addition & 0 deletions tests/urls.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
/GIS/apps/rview/warnings.phtml?autopilot=0&osite=AKQ&tzoff=0&lat0=36.98&lon0=-77&layers=nexrad&layers=warnings&layers=watches&layers=blank&layers=cwas&layers=uscounties&site=AKQ&tz=EST&year=2012&month=2&day=29&hour=13&minute=25&warngeo=both&zoom=250&imgsize=800x600&loop=0&frames=10&interval=5&filter=1&cu=1&sortcol=expire&sortdir=0&lsrlook=+/-&lsrwindow=15&extents=-78.333889816361,35.98,-75.666110183639,37.98
/request/awos/1min_dl.php?station%5B%5D=AXA&tz=UTC&year1=2025&month1=1&day1=1&hour1=0&minute1=0&year2=2025&month2=1&day2=1&hour2=0&minute2=0&vars%5B%5D=tmpf&vars%5B%5D=dwpf&sample=1min&what=download&delim=comma&gis=no
/request/coop/dl.php?network=IACLIMATE&station[]=IA8742&year1=2025&month1=03&day1=06&year2=2025&month2=03&day2=07&vars[]=high&vars[]=low&vars[]=precip&what=view&delim=comma&gis=no

0 comments on commit 821ffd8

Please sign in to comment.