mirror of
https://github.com/danog/tgseclib.git
synced 2024-11-30 04:39:02 +01: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