Skip to content

Commit

Permalink
Merge pull request #1150 from akrherz/250306
Browse files Browse the repository at this point in the history
📝 Address lint and issues found
  • Loading branch information
akrherz authored Mar 6, 2025
2 parents 988afd0 + 53a6d3b commit 0271781
Show file tree
Hide file tree
Showing 5 changed files with 20 additions and 20 deletions.
10 changes: 5 additions & 5 deletions htdocs/DCP/tomb.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -21,14 +21,14 @@ $table = <<<EOM
EOM;
$floor = date("YmdHi", time() - 8 * 86400);
for ($i = 0; $row = pg_fetch_assoc($rs); $i++) {
$link = sprintf("<a href=\"/p.php?pid=%s\">%s</a>", $row[1], $row[1]);
if (substr($row[1], 0, 12) < $floor) {
$link = $row[1];
$link = sprintf("<a href=\"/p.php?pid=%s\">%s</a>", $row["max"], $row["nwsli"]);
if (substr($row["max"], 0, 12) < $floor) {
$link = $row["max"];
}
$table .= sprintf(
"<tr><td>%s</td><td>%s</td><td>%s</td>\n",
$row[0],
substr($row[1], 13, 4),
$row["nwsli"],
substr($row["max"], 13, 4),
$link
);
}
Expand Down
12 changes: 6 additions & 6 deletions htdocs/GIS/apps/coop/gsplot.php
Original file line number Diff line number Diff line change
Expand Up @@ -105,12 +105,12 @@ function plotNoData($map, $img)
$rs = pg_execute($dbconn, $stname, Array($state));
$row = pg_fetch_assoc($rs, 0);
$buf = 0.2; // 35km
$xsz = $row[1] - $row[0];
$ysz = $row[3] - $row[2];
$minx = $row[0] - $buf;
$maxx = $row[1] + $buf;
$miny = $row[2] - $buf;
$maxy = $row[3] + $buf;
$xsz = $row["st_xmax"] - $row["st_xmin"];
$ysz = $row["st_ymax"] - $row["st_ymin"];
$minx = $row["st_xmin"] - $buf;
$maxx = $row["st_xmax"] + $buf;
$miny = $row["st_ymin"] - $buf;
$maxy = $row["st_ymax"] + $buf;
$map->setextent($minx, $miny, $maxx, $maxy);

$counties = $map->getLayerByName("counties");
Expand Down
8 changes: 4 additions & 4 deletions htdocs/GIS/apps/coop/plot.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,10 @@ $rs = pg_execute($dbconn, $stname, Array($state));
$row = pg_fetch_assoc($rs, 0);
$buf = 0.5;
$map->setextent(
$row[0] - $buf,
$row[2] - $buf,
$row[1] + $buf,
$row[3] + $buf
$row["st_xmin"] - $buf,
$row["st_ymin"] - $buf,
$row["st_xmax"] + $buf,
$row["st_ymax"] + $buf
);

$states = $map->getLayerByName("states");
Expand Down
2 changes: 1 addition & 1 deletion htdocs/plotting/auto/js/mapselect.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ function stationLayerStyleFunc(feature) {
const network = feature.get("network");
if (network.search("CLIMATE") > 0) {
const sid = feature.get("sid");
if (sid.substr(2, 1) == "C") {
if (sid.substr(2, 1) === "C") {
climodistrictStyle.getText().setText(sid.substr(0, 2) + parseInt(sid.substr(3, 3)));
return climodistrictStyle;
}
Expand Down
8 changes: 4 additions & 4 deletions htdocs/rainfall/bypoint.phtml
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ $rs = pg_prepare($wepp, $stname2, "select hrap_i, ST_distance( the_geom,
ST_transform(ST_Point($1, $2, 4326), 26915) )
from hrap_utm ORDER by st_distance ASC LIMIT 1");
$rs = pg_execute($wepp, $stname2, array($longitude, $latitude));
$row = pg_fetch_array($rs);
if ($row[1] > 25000) {
$row = pg_fetch_assoc($rs);
if ($row["st_distance"] > 25000) {
echo sprintf(
"ERROR: Point is %.1f km outside of data domain, abort.",
$row[1] / 1000.0
$row["st_distance"] / 1000.0
);
die();
}
Expand All @@ -123,7 +123,7 @@ $rs = pg_execute($wepp, $stname, array(

$tot = 0;
$otot = 0;
while ($row = pg_fetch_array($rs)) {
while ($row = pg_fetch_assoc($rs)) {
$tot += $row["inch"];
$ob = $d[$row["valid"]]["ob"];
$otot += ($ob == "M") ? 0 : $ob;
Expand Down

0 comments on commit 0271781

Please sign in to comment.