diff options
author | Renato Botelho <garga@FreeBSD.org> | 2013-07-23 21:22:16 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2013-07-23 21:22:16 -0300 |
commit | 64cb1e1f8848076c1a03fa80f8ec97de596d4c90 (patch) | |
tree | 1668b4617a3ff2b2ade3ad4ea584443ccf422ce9 /config | |
parent | 05a52039e0fe5c31a85a847107db79bbbe6b8a6f (diff) | |
download | pfsense-packages-64cb1e1f8848076c1a03fa80f8ec97de596d4c90.tar.gz pfsense-packages-64cb1e1f8848076c1a03fa80f8ec97de596d4c90.tar.bz2 pfsense-packages-64cb1e1f8848076c1a03fa80f8ec97de596d4c90.zip |
Remove unused code
Diffstat (limited to 'config')
-rw-r--r-- | config/openbgpd/openbgpd_status.php | 32 |
1 files changed, 8 insertions, 24 deletions
diff --git a/config/openbgpd/openbgpd_status.php b/config/openbgpd/openbgpd_status.php index 8da1d7ae..d4c6faff 100644 --- a/config/openbgpd/openbgpd_status.php +++ b/config/openbgpd/openbgpd_status.php @@ -44,32 +44,16 @@ function doCmdT($title, $command) { echo "<tr><td class=\"listtopic\">" . $title . "</td></tr>\n"; echo "<tr><td class=\"listlr\"><pre>"; /* no newline after pre */ - if ($command == "dumpconfigxml") { - $fd = @fopen("/conf/config.xml", "r"); - if ($fd) { - while (!feof($fd)) { - $line = fgets($fd); - /* remove sensitive contents */ - $line = preg_replace("/<password>.*?<\\/password>/", "<password>xxxxx</password>", $line); - $line = preg_replace("/<pre-shared-key>.*?<\\/pre-shared-key>/", "<pre-shared-key>xxxxx</pre-shared-key>", $line); - $line = preg_replace("/<rocommunity>.*?<\\/rocommunity>/", "<rocommunity>xxxxx</rocommunity>", $line); - $line = str_replace("\t", " ", $line); - echo htmlspecialchars($line,ENT_NOQUOTES); - } + $fd = popen("{$command} 2>&1", "r"); + $ct = 0; + while (($line = fgets($fd)) !== FALSE) { + echo htmlspecialchars($line, ENT_NOQUOTES); + if ($ct++ > 1000) { + ob_flush(); + $ct = 0; } - fclose($fd); - } else { - $fd = popen("{$command} 2>&1", "r"); - $ct = 0; - while (($line = fgets($fd)) !== FALSE) { - echo htmlspecialchars($line, ENT_NOQUOTES); - if ($ct++ > 1000) { - ob_flush(); - $ct = 0; - } - } - pclose($fd); } + pclose($fd); echo "</pre></td></tr>\n"; echo "</table>\n"; } |