Skip to content

Commit da922bd

Browse files
committed
QA: Be consistent with polling and update CHANGELOG.md
1 parent 539e30f commit da922bd

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

poller_apcupsd.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,6 @@
100100
/* apcupsd upses first UPS */
101101
$upses = db_fetch_assoc_prepared('SELECT ups.*
102102
FROM apcupsd_ups AS ups
103-
LEFT JOIN apcupsd_ups_stats AS stats
104-
ON ups.id = stats.ups_id
105103
WHERE type_id = 1
106104
AND enabled = "on"
107105
AND poller_id = ?',
@@ -134,10 +132,12 @@
134132
}
135133

136134
/* apcupsd upses first UPS */
137-
$upses = db_fetch_assoc('SELECT *
135+
$upses = db_fetch_assoc_prepared('SELECT *
138136
FROM apcupsd_ups
139137
WHERE type_id = 2
140-
AND enabled = "on"');
138+
AND enabled = "on"
139+
AND poller_id = ?',
140+
array($config['poller_id']));
141141

142142
$snmpupses = cacti_sizeof($upses);
143143

0 commit comments

Comments
 (0)