- add enableQuietMode to suppress stderr

This commit is contained in:
terrafrost 2012-07-23 07:17:53 -05:00
parent 4eaf6db3ab
commit 879a5c4364

View File

@ -687,6 +687,14 @@ class Net_SSH2 {
*/ */
var $realtime_log_wrap; var $realtime_log_wrap;
/**
* Flag to suppress stderr from output
*
* @see Net_SSH2::enableQuiteMode()
* @access private
*/
var $quiet_mode = false;
/** /**
* Default Constructor. * Default Constructor.
* *
@ -2123,6 +2131,30 @@ class Net_SSH2 {
return $payload; return $payload;
} }
/**
* Enable Quiet Mode
*
* Suppress stderr from output
*
* @access public
*/
function enableQuietMode()
{
$this->quiet_mode = true;
}
/**
* Disable Quiet Mode
*
* Show stderr in output
*
* @access public
*/
function disableQuietMode()
{
$this->quiet_mode = false;
}
/** /**
* Gets channel data * Gets channel data
* *
@ -2221,7 +2253,7 @@ class Net_SSH2 {
$this->channel_buffers[$client_channel][] = $data; $this->channel_buffers[$client_channel][] = $data;
break; break;
case NET_SSH2_MSG_CHANNEL_EXTENDED_DATA: case NET_SSH2_MSG_CHANNEL_EXTENDED_DATA:
if ($skip_extended) { if ($skip_extended || $this->quiet_mode) {
break; break;
} }
/* /*