mirror of
https://github.com/phpseclib/phpseclib.git
synced 2025-01-13 18:02:58 +00:00
SSH2: move _connect() call to _login() from login()
Per bantu, this is required for it to work with Net/SFTP.php
This commit is contained in:
parent
0ad0bb4c37
commit
79719e8f74
@ -1760,13 +1760,6 @@ class Net_SSH2
|
|||||||
*/
|
*/
|
||||||
function login($username)
|
function login($username)
|
||||||
{
|
{
|
||||||
if (!($this->bitmap & NET_SSH2_MASK_CONSTRUCTOR)) {
|
|
||||||
$this->bitmap |= NET_SSH2_MASK_CONSTRUCTOR;
|
|
||||||
if (!$this->_connect()) {
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$args = func_get_args();
|
$args = func_get_args();
|
||||||
return call_user_func_array(array(&$this, '_login'), $args);
|
return call_user_func_array(array(&$this, '_login'), $args);
|
||||||
}
|
}
|
||||||
@ -1783,6 +1776,13 @@ class Net_SSH2
|
|||||||
*/
|
*/
|
||||||
function _login($username)
|
function _login($username)
|
||||||
{
|
{
|
||||||
|
if (!($this->bitmap & NET_SSH2_MASK_CONSTRUCTOR)) {
|
||||||
|
$this->bitmap |= NET_SSH2_MASK_CONSTRUCTOR;
|
||||||
|
if (!$this->_connect()) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
$args = array_slice(func_get_args(), 1);
|
$args = array_slice(func_get_args(), 1);
|
||||||
if (empty($args)) {
|
if (empty($args)) {
|
||||||
return $this->_login_helper($username);
|
return $this->_login_helper($username);
|
||||||
|
Loading…
Reference in New Issue
Block a user