* scripts/decode_bug.php3:

- Cleaned up code to use <pre> arouund output
This commit is contained in:
Robin Johnson
2002-08-07 05:46:48 +00:00
parent 0b55f80a01
commit dae1c7b741

View File

@@ -56,7 +56,13 @@
/** /**
* If the form has been submitted -> decodes the bug report * If the form has been submitted -> decodes the bug report
*/ */
if (!empty($_POST) && isset($_POST['bug_encoded'])) { function PMA_printDecodedBug($textdata)
{
return 'Decoded:<br />' . "\n"
. '<pre>' . $textdata . '</pre><br />' . "\n";
}
if (!empty($_POST) && isset($_POST['bug_encoded'])) {
$bug_encoded = $_POST['bug_encoded']; $bug_encoded = $_POST['bug_encoded'];
} }
else if (!empty($HTTP_POST_VARS) && isset($HTTP_POST_VARS['bug_encoded'])) { else if (!empty($HTTP_POST_VARS) && isset($HTTP_POST_VARS['bug_encoded'])) {
@@ -72,17 +78,16 @@ if (!empty($bug_encoded)) {
$bug_decoded = base64_decode($bug_encoded); $bug_decoded = base64_decode($bug_encoded);
if (substr($bug_encoded, 0, 2) == 'eN') { if (substr($bug_encoded, 0, 2) == 'eN') {
if (function_exists('gzuncompress')) { if (function_exists('gzuncompress')) {
$result = ' Decoded:<br />' . "\n" $result = PMA_printDecodedBug(gzuncompress($bug_decoded));
. ' ' . gzuncompress($bug_decoded) . '<br />' . "\n"; } else {
} else {
$result = 'Error: &quot;gzuncompress()&quot; is unavailable!' . "\n"; $result = 'Error: &quot;gzuncompress()&quot; is unavailable!' . "\n";
} }
} }
else { else {
$result = ' Decoded:<br />' . "\n" $result = PMA_printDecodedBug($bug_decoded);
. ' ' . $bug_decoded . '<br />'. "\n";
} // end if... else... } // end if... else...
echo '<p>' . "\n" . $result . '</p>' . "\n"; echo '<p>' . "\n" . $result . '</p>' . "\n";
} // end if } // end if
?> ?>