diff options
author | Ermal Luçi <eri@pfsense.org> | 2013-07-22 00:52:14 -0700 |
---|---|---|
committer | Ermal Luçi <eri@pfsense.org> | 2013-07-22 00:52:14 -0700 |
commit | fb25965988f2ca788f7b94987759a9960fbdbcb9 (patch) | |
tree | 99969da1eb1929a94042f1a8b4995ceefaea470a | |
parent | efc17dcbcfc1a0a3378f23e46e43124a63e3a31f (diff) | |
parent | 7b6ce87468914d5e18d316a6f0fe49af516fa64c (diff) | |
download | pfsense-packages-fb25965988f2ca788f7b94987759a9960fbdbcb9.tar.gz pfsense-packages-fb25965988f2ca788f7b94987759a9960fbdbcb9.tar.bz2 pfsense-packages-fb25965988f2ca788f7b94987759a9960fbdbcb9.zip |
Merge pull request #469 from pvenezia/master
Fixed cosmetic table display bug in haproxy_listeners.php, and DOS newli...
-rw-r--r-- | config/haproxy-devel/haproxy.inc | 7 | ||||
-rw-r--r-- | config/haproxy-devel/haproxy_listeners.php | 2 |
2 files changed, 5 insertions, 4 deletions
diff --git a/config/haproxy-devel/haproxy.inc b/config/haproxy-devel/haproxy.inc index 3afefb49..f871ddd7 100644 --- a/config/haproxy-devel/haproxy.inc +++ b/config/haproxy-devel/haproxy.inc @@ -459,7 +459,7 @@ function write_backend($fd, $name, $pool, $frontend) { $adv_be = explode("\n", base64_decode($pool['advanced_backend'])); foreach($adv_be as $adv_line) { if ($adv_line != "") { - fwrite($fd, "\t" . $adv_line . "\n"); + fwrite($fd, "\t" . str_replace("\r", "", $adv_line) . "\n"); } } } @@ -573,7 +573,8 @@ function haproxy_writeconf($configfile) { if($a_global['advanced']) { $adv = explode("\n", base64_decode($a_global['advanced'])); foreach($adv as $adv_line) { - fwrite($fd, "\t" . $adv_line . "\n"); + fwrite($fd, "\t" . str_replace("\r", "", $adv_line) . "\n"); + } } fwrite ($fd, "\n"); @@ -687,7 +688,7 @@ function haproxy_writeconf($configfile) { $advanced = explode("\n", base64_decode($bind['advanced'])); foreach($advanced as $adv_line) { if ($adv_line != "") { - fwrite($fd, "\t" . $adv_line . "\n"); + fwrite($fd, "\t" . str_replace("\r", "", $adv_line) . "\n"); } } } diff --git a/config/haproxy-devel/haproxy_listeners.php b/config/haproxy-devel/haproxy_listeners.php index d634ded4..2a58ac9a 100644 --- a/config/haproxy-devel/haproxy_listeners.php +++ b/config/haproxy-devel/haproxy_listeners.php @@ -136,7 +136,7 @@ include("head.inc"); foreach ($a_backend as $backend): $backendname = $backend['name']; $textgray = $backend['status'] != 'active' ? " gray" : ""; - if (isset($ipport_previous ) && $backend['ipport'] != $ipport_previous): + if (isset($ipport_previous ) && $backend['ipport'] == $ipport_previous): ?> <tr class="<?=$textgray?>"><td collspan="7"> </td></tr> <? |