mirror of
https://github.com/phpseclib/phpseclib.git
synced 2024-12-26 03:27:31 +00:00
Merge branch '1.0' into 2.0
Conflicts: phpseclib/Crypt/Base.php phpseclib/Crypt/Blowfish.php phpseclib/Crypt/DES.php phpseclib/Net/SFTP.php
This commit is contained in:
commit
ca0b56f05c
@ -1745,11 +1745,12 @@ class SFTP extends SSH2
|
|||||||
* @param optional Integer $mode
|
* @param optional Integer $mode
|
||||||
* @param optional Integer $start
|
* @param optional Integer $start
|
||||||
* @param optional Integer $local_start
|
* @param optional Integer $local_start
|
||||||
|
* @param optional callable|null $callback
|
||||||
* @return Boolean
|
* @return Boolean
|
||||||
* @access public
|
* @access public
|
||||||
* @internal ASCII mode for SFTPv4/5/6 can be supported by adding a new function - \phpseclib\Net\SFTP::setMode().
|
* @internal ASCII mode for SFTPv4/5/6 can be supported by adding a new function - \phpseclib\Net\SFTP::setMode().
|
||||||
*/
|
*/
|
||||||
function put($remote_file, $data, $mode = self::SOURCE_STRING, $start = -1, $local_start = -1)
|
function put($remote_file, $data, $mode = self::SOURCE_STRING, $start = -1, $local_start = -1, $callback = null)
|
||||||
{
|
{
|
||||||
if (!($this->bitmap & SSH2::MASK_LOGIN)) {
|
if (!($this->bitmap & SSH2::MASK_LOGIN)) {
|
||||||
return false;
|
return false;
|
||||||
@ -1846,6 +1847,9 @@ class SFTP extends SSH2
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
$sent+= strlen($temp);
|
$sent+= strlen($temp);
|
||||||
|
if (is_callable($callback)) {
|
||||||
|
call_user_func($callback, $sent);
|
||||||
|
}
|
||||||
|
|
||||||
$i++;
|
$i++;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user