mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Fix transport options when edited on Windows (#10001)
Windows puts line returns as \r\n, when parsing LibreNMS previously left the \r, which could cause issues Centralize the code so we just have one place to fix. Try to fix SMSEagle, it had the options wrong (copied from another transport)
This commit is contained in:
@@ -32,13 +32,11 @@ class Hipchat extends Transport
|
||||
if (empty($this->config)) {
|
||||
return $this->deliverAlertOld($obj, $opts);
|
||||
}
|
||||
$hipchat_opts = $this->parseUserOptions($this->config['hipchat-options']);
|
||||
$hipchat_opts['url'] = $this->config['hipchat-url'];
|
||||
$hipchat_opts['room_id'] = $this->config['hipchat-room-id'];
|
||||
$hipchat_opts['from'] = $this->config['hipchat-from-name'];
|
||||
foreach (explode(PHP_EOL, $this->config['hipchat-options']) as $option) {
|
||||
list($k,$v) = explode('=', $option);
|
||||
$hipchat_opts[$k] = $v;
|
||||
}
|
||||
|
||||
return $this->contactHipchat($obj, $hipchat_opts);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user