mirror of
https://github.com/phpbb/phpbb.git
synced 2025-06-08 04:18:52 +00:00
Merge pull request #5324 from rubencm/ticket/15760
[ticket/15760] Fix write_stream
This commit is contained in:
commit
bf071ffac3
5 changed files with 3 additions and 7 deletions
|
@ -192,8 +192,6 @@ class acp_database
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
$storage->track_file($file);
|
|
||||||
|
|
||||||
// Remove file from tmp
|
// Remove file from tmp
|
||||||
@unlink($temp_dir . '/' . $file);
|
@unlink($temp_dir . '/' . $file);
|
||||||
|
|
||||||
|
|
|
@ -254,8 +254,6 @@ class upload
|
||||||
{
|
{
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
$this->storage->track_file($destination_name);
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
|
@ -456,8 +456,6 @@ class filespec_storage
|
||||||
{
|
{
|
||||||
fclose($fp);
|
fclose($fp);
|
||||||
}
|
}
|
||||||
|
|
||||||
$storage->track_file($this->destination_file);
|
|
||||||
}
|
}
|
||||||
catch (\phpbb\storage\exception\exception $e)
|
catch (\phpbb\storage\exception\exception $e)
|
||||||
{
|
{
|
||||||
|
|
|
@ -348,6 +348,8 @@ class local implements adapter_interface, stream_interface
|
||||||
fclose($stream);
|
fclose($stream);
|
||||||
throw new exception('STORAGE_CANNOT_COPY_RESOURCE');
|
throw new exception('STORAGE_CANNOT_COPY_RESOURCE');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
fclose($stream);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
@ -212,7 +212,6 @@ class storage
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Writes a new file using a stream
|
* Writes a new file using a stream
|
||||||
* The file needs to be tracked after using this method
|
|
||||||
*
|
*
|
||||||
* @param string $path The target file
|
* @param string $path The target file
|
||||||
* @param resource $resource The resource
|
* @param resource $resource The resource
|
||||||
|
@ -226,6 +225,7 @@ class storage
|
||||||
if ($adapter instanceof stream_interface)
|
if ($adapter instanceof stream_interface)
|
||||||
{
|
{
|
||||||
$adapter->write_stream($path, $resource);
|
$adapter->write_stream($path, $resource);
|
||||||
|
$this->track_file($path);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
|
Loading…
Add table
Reference in a new issue