diff options
author | Scott Ullrich <sullrich@pfsense.org> | 2008-08-28 21:24:34 +0000 |
---|---|---|
committer | Scott Ullrich <sullrich@pfsense.org> | 2008-08-28 21:24:34 +0000 |
commit | 9175156fc01be8eb3c9622c2215cf4b993d4d44a (patch) | |
tree | 3a082141f028987b1ca3f834cecb6e227a0be299 /usr/local/www/carp_status.php | |
parent | 172bd0750ed15d7c491a3f2860fcc26477aa0a9e (diff) | |
download | pfsense-9175156fc01be8eb3c9622c2215cf4b993d4d44a.zip pfsense-9175156fc01be8eb3c9622c2215cf4b993d4d44a.tar.gz |
It makes no sense to show a enable/disable button when no carp interfaces
are configured. Do not show it under these conditions.
Diffstat (limited to 'usr/local/www/carp_status.php')
-rwxr-xr-x | usr/local/www/carp_status.php | 20 |
1 files changed, 11 insertions, 9 deletions
diff --git a/usr/local/www/carp_status.php b/usr/local/www/carp_status.php index e386c19..5d4875b 100755 --- a/usr/local/www/carp_status.php +++ b/usr/local/www/carp_status.php @@ -81,17 +81,19 @@ include("head.inc"); <tr> <td class="tabcont"> <?php - if($status == false) { - $carp_enabled = false; - echo "<input type=\"submit\" name=\"disablecarp\" id=\"disablecarp\" value=\"Enable Carp\">"; - } else { - $carp_enabled = true; - echo "<input type=\"submit\" name=\"disablecarp\" id=\"disablecarp\" value=\"Disable Carp\">"; - } - if(is_array($config['virtualip']['vip'])) { foreach($config['virtualip']['vip'] as $carp) { - if ($carp['mode'] == "carp") $carpcount++; + if ($carp['mode'] == "carp") + $carpcount++; + } + } + if($carpcount > 0) { + if($status == false) { + $carp_enabled = false; + echo "<input type=\"submit\" name=\"disablecarp\" id=\"disablecarp\" value=\"Enable Carp\">"; + } else { + $carp_enabled = true; + echo "<input type=\"submit\" name=\"disablecarp\" id=\"disablecarp\" value=\"Disable Carp\">"; } } ?> |