From f63658b9d81e183b4878191cb826f7598da7c98c Mon Sep 17 00:00:00 2001 From: Adam Amstrong Date: Thu, 22 Sep 2011 18:28:00 +0000 Subject: [PATCH] move external_exec to common git-svn-id: http://www.observium.org/svn/observer/trunk@2549 61d68cd4-352d-0410-923a-c4978735b2b8 --- includes/common.php | 11 +++++++++++ includes/functions.php | 12 ------------ 2 files changed, 11 insertions(+), 12 deletions(-) diff --git a/includes/common.php b/includes/common.php index bb51a1a602..2f19272f55 100644 --- a/includes/common.php +++ b/includes/common.php @@ -2,6 +2,17 @@ ## Common Functions +function external_exec($command) +{ + global $debug; + + if ($debug) { echo($command."\n"); } + $output = shell_exec($command); + if ($debug) { echo($output."\n"); } + + return $output; +} + function shorthost($hostname, $len=12) { $parts = explode(".", $hostname); diff --git a/includes/functions.php b/includes/functions.php index 12fca48aa9..adb591722a 100755 --- a/includes/functions.php +++ b/includes/functions.php @@ -18,18 +18,6 @@ include_once($config['install_dir'] . "/includes/services.inc.php"); include_once($config['install_dir'] . "/includes/dbFacile.php"); include_once($config['install_dir'] . "/includes/console_colour.php"); -function external_exec($command) -{ - global $debug; - - if ($debug) { echo($command."\n"); } - $output = shell_exec($command); - if ($debug) { echo($output."\n"); } - - return $output; -} - - function mac_clean_to_readable($mac) { $r = substr($mac, 0, 2);