aboutsummaryrefslogtreecommitdiffstats
path: root/config/haproxy
diff options
context:
space:
mode:
authorScott Ullrich <sullrich@pfsense.org>2010-01-23 17:42:40 -0500
committerScott Ullrich <sullrich@pfsense.org>2010-01-23 17:42:40 -0500
commit58cf0204a4722077ac3b11c81798603a28197677 (patch)
tree0f31ceb1a0bed1dcd477a9ea374b22da8bd2fda5 /config/haproxy
parentc157b0df0a874142253e3caeabad83c59c8d7d4c (diff)
downloadpfsense-packages-58cf0204a4722077ac3b11c81798603a28197677.tar.gz
pfsense-packages-58cf0204a4722077ac3b11c81798603a28197677.tar.bz2
pfsense-packages-58cf0204a4722077ac3b11c81798603a28197677.zip
Only show option if haproxy.cfg exists
Diffstat (limited to 'config/haproxy')
-rwxr-xr-xconfig/haproxy/haproxy_global.php27
1 files changed, 14 insertions, 13 deletions
diff --git a/config/haproxy/haproxy_global.php b/config/haproxy/haproxy_global.php
index f25c3ed3..e547aa10 100755
--- a/config/haproxy/haproxy_global.php
+++ b/config/haproxy/haproxy_global.php
@@ -299,19 +299,20 @@ function enable_change(enable_change) {
</div>
</table>
-<p/>
-
-<div id="configuration" style="display:none; border-style:dashed; padding: 8px;">
- <b><i>/var/etc/haproxy.cfg file contents:</b></i>
- <?php
- if(file_exists("/var/etc/haproxy.cfg")) {
- echo "<pre>" . trim(file_get_contents("/var/etc/haproxy.cfg")) . "</pre>";
- }
- ?>
-</div>
-<div id="showconfiguration">
- <a onClick="new Effect.Fade('showconfiguration'); new Effect.Appear('configuration'); setTimeout('scroll_after_fade();', 250); return false;" href="#">Show</a> automatically generated configuration.
-</div>
+<?php if(file_exists("/var/etc/haproxy.cfg")): ?>
+ <p/>
+ <div id="configuration" style="display:none; border-style:dashed; padding: 8px;">
+ <b><i>/var/etc/haproxy.cfg file contents:</b></i>
+ <?php
+ if(file_exists("/var/etc/haproxy.cfg")) {
+ echo "<pre>" . trim(file_get_contents("/var/etc/haproxy.cfg")) . "</pre>";
+ }
+ ?>
+ </div>
+ <div id="showconfiguration">
+ <a onClick="new Effect.Fade('showconfiguration'); new Effect.Appear('configuration'); setTimeout('scroll_after_fade();', 250); return false;" href="#">Show</a> automatically generated configuration.
+ </div>
+<?php endif; ?>
</form>
<script language="JavaScript">