From dfe2769c46d6f1a5fb29218e902901ea3ea080cb Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Tue, 30 Apr 2013 16:03:50 -0300 Subject: Use exec directly instead of exec_command --- usr/local/www/includes/functions.inc.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'usr') diff --git a/usr/local/www/includes/functions.inc.php b/usr/local/www/includes/functions.inc.php index 2a98883..274c45b 100644 --- a/usr/local/www/includes/functions.inc.php +++ b/usr/local/www/includes/functions.inc.php @@ -183,9 +183,9 @@ function disk_usage() { } function swap_usage() { - $swap_info = exec_command("/usr/sbin/swapinfo"); + exec("/usr/sbin/swapinfo", $swap_info); $swap_used = ""; - foreach (explode("\n", $swap_info) as $line) + foreach ($swap_info as $line) if (preg_match('/(\d+)%$/', $line, $matches)) { $swap_used = $matches[1]; break; -- cgit v1.1