mirror of
https://github.com/stylersnico/librenms.git
synced 2026-08-01 16:26:55 +02:00
syntaxer run
git-svn-id: http://www.observium.org/svn/observer/trunk@2642 61d68cd4-352d-0410-923a-c4978735b2b8
This commit is contained in:
+6
-5
@@ -26,9 +26,10 @@ function shorthost($hostname, $len=12)
|
|||||||
return ($shorthost);
|
return ($shorthost);
|
||||||
}
|
}
|
||||||
|
|
||||||
function isCli() {
|
function isCli()
|
||||||
|
{
|
||||||
if (php_sapi_name() == 'cli' && empty($_SERVER['REMOTE_ADDR'])) {
|
if (php_sapi_name() == 'cli' && empty($_SERVER['REMOTE_ADDR']))
|
||||||
|
{
|
||||||
return true;
|
return true;
|
||||||
} else {
|
} else {
|
||||||
return false;
|
return false;
|
||||||
@@ -53,7 +54,6 @@ function print_message($text)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
function delete_port($int_id)
|
function delete_port($int_id)
|
||||||
{
|
{
|
||||||
global $config;
|
global $config;
|
||||||
@@ -62,7 +62,8 @@ function delete_port($int_id)
|
|||||||
|
|
||||||
$interface_tables = array('adjacencies', 'ipaddr', 'ip6adjacencies', 'ip6addr', 'mac_accounting', 'bill_ports', 'pseudowires', 'ports');
|
$interface_tables = array('adjacencies', 'ipaddr', 'ip6adjacencies', 'ip6addr', 'mac_accounting', 'bill_ports', 'pseudowires', 'ports');
|
||||||
|
|
||||||
foreach($interface_tables as $table) {
|
foreach ($interface_tables as $table)
|
||||||
|
{
|
||||||
dbDelete($table, "`interface_id` = ?", array($int_id));
|
dbDelete($table, "`interface_id` = ?", array($int_id));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -68,7 +68,6 @@ function rrdtool_pipe_open(&$rrd_process, &$rrd_pipes)
|
|||||||
|
|
||||||
function rrdtool_pipe_close(&$rrd_process, &$rrd_pipes)
|
function rrdtool_pipe_close(&$rrd_process, &$rrd_pipes)
|
||||||
{
|
{
|
||||||
|
|
||||||
if ($debug)
|
if ($debug)
|
||||||
{
|
{
|
||||||
echo stream_get_contents($rrd_pipes[1]);
|
echo stream_get_contents($rrd_pipes[1]);
|
||||||
@@ -100,7 +99,6 @@ function rrdtool_pipe_close(&$rrd_process, &$rrd_pipes)
|
|||||||
|
|
||||||
function rrdtool_graph($graph_file, $options)
|
function rrdtool_graph($graph_file, $options)
|
||||||
{
|
{
|
||||||
|
|
||||||
global $config, $debug;
|
global $config, $debug;
|
||||||
|
|
||||||
rrdtool_pipe_open($rrd_process, $rrd_pipes);
|
rrdtool_pipe_open($rrd_process, $rrd_pipes);
|
||||||
@@ -178,8 +176,8 @@ function rrdtool($command, $filename, $options)
|
|||||||
|
|
||||||
function rrdtool_create($filename, $options)
|
function rrdtool_create($filename, $options)
|
||||||
{
|
{
|
||||||
|
global $config, $debug;
|
||||||
|
|
||||||
global $config; global $debug;
|
|
||||||
$command = $config['rrdtool'] . " create $filename $options";
|
$command = $config['rrdtool'] . " create $filename $options";
|
||||||
if ($debug) { echo($command."\n"); }
|
if ($debug) { echo($command."\n"); }
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user