mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-11-11 08:10: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)
|
||||
{
|
||||
if (!($this->bitmap & NET_SSH2_MASK_CONSTRUCTOR)) {
|
||||
$this->bitmap |= NET_SSH2_MASK_CONSTRUCTOR;
|
||||
if (!$this->_connect()) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
$args = func_get_args();
|
||||
return call_user_func_array(array(&$this, '_login'), $args);
|
||||
}
|
||||
@ -1783,6 +1776,13 @@ class Net_SSH2
|
||||
*/
|
||||
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);
|
||||
if (empty($args)) {
|
||||
return $this->_login_helper($username);
|
||||
|
Loading…
Reference in New Issue
Block a user