mirror of
https://github.com/EGroupware/egroupware.git
synced 2024-12-26 00:29:38 +01:00
always return resource seeked to its start
This commit is contained in:
parent
b08f90d930
commit
08609c1e0b
@ -2091,7 +2091,7 @@ class Vfs extends Vfs\StreamWrapper
|
||||
if (is_resource($tmp_name))
|
||||
{
|
||||
$ret = ($dest = egw_vfs::fopen($target, 'w')) &&
|
||||
stream_copy_to_stream($tmp_name, $dest) &&
|
||||
stream_copy_to_stream($tmp_name, $dest) !== false &&
|
||||
fclose($dest) && self::stat($target);
|
||||
|
||||
fclose($tmp_name);
|
||||
|
@ -1596,6 +1596,8 @@ class egw_link extends solink
|
||||
}
|
||||
$ret = call_user_func_array('ExecMethod2', $data);
|
||||
|
||||
if (is_resource($ret)) fseek($ret, 0);
|
||||
|
||||
if ($return_resource != is_resource($ret))
|
||||
{
|
||||
if ($return_resource && ($fp = fopen('php://temp', 'w')))
|
||||
@ -1608,7 +1610,6 @@ class egw_link extends solink
|
||||
{
|
||||
$fp = $ret;
|
||||
$ret = '';
|
||||
fseek($fp, 0);
|
||||
while(!feof($fp))
|
||||
{
|
||||
$ret .= fread($fp, 8192);
|
||||
|
Loading…
Reference in New Issue
Block a user