mirror of
https://github.com/librenms/librenms.git
synced 2024-10-07 16:52:45 +00:00
Feature: Added alerts output to capture system (#4574)
* Feature: Added alerts output to capture system * Renamed $output to $content * removed duplicate functions
This commit is contained in:
committed by
Tony Murray
parent
601074606d
commit
9936aa77ff
@ -1343,3 +1343,21 @@ function ipmiSensorName($hardwareId, $sensorIpmi, $rewriteArray)
|
||||
return $sensorIpmi;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* @param $filename
|
||||
* @param $content
|
||||
*/
|
||||
function file_download($filename, $content)
|
||||
{
|
||||
$length = strlen($content);
|
||||
header('Content-Description: File Transfer');
|
||||
header('Content-Type: text/plain');
|
||||
header("Content-Disposition: attachment; filename=$filename");
|
||||
header('Content-Transfer-Encoding: binary');
|
||||
header('Content-Length: ' . $length);
|
||||
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');
|
||||
header('Expires: 0');
|
||||
header('Pragma: public');
|
||||
echo $content;
|
||||
}
|
||||
|
Reference in New Issue
Block a user