From 64cb1e1f8848076c1a03fa80f8ec97de596d4c90 Mon Sep 17 00:00:00 2001 From: Renato Botelho Date: Tue, 23 Jul 2013 21:22:16 -0300 Subject: Remove unused code --- config/openbgpd/openbgpd_status.php | 32 ++++++++------------------------ 1 file changed, 8 insertions(+), 24 deletions(-) (limited to 'config') 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 "" . $title . "\n"; echo "
";		/* 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>/", "xxxxx", $line);
-				$line = preg_replace("/.*?<\\/pre-shared-key>/", "xxxxx", $line);
-				$line = preg_replace("/.*?<\\/rocommunity>/", "xxxxx", $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 "
\n"; echo "\n"; } -- cgit v1.2.3