realtime output for xcat command

git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@13514 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd
This commit is contained in:
xq2005 2012-08-15 12:45:57 +00:00
parent 0113179a9c
commit b27e9870ec

View File

@ -111,11 +111,13 @@ function submit_request($req, $skipVerify, $opts_array){
// Flush output to browser
if ($flush) {
// Strip HTML tags from output
$str = preg_replace('/<errorcode>.*<\/errorcode>/', '', $str);
if ($tmp = trim(strip_tags($str))) {
// Format the output based on what was given for $flush_format
if ($flush_format == "TDB") {
format_TBD($tmp);
} else {
$tmp = preg_replace('/\n\s*/', "\n", $tmp);
// Print out output by default
echo '<pre style="font-size: 10px;">' . $tmp . '</pre>';
ob_flush();