forked from extern/egroupware
"fixed not updated modification time, if file get's updated (eg. replaced via a new update in filemanager)"
This commit is contained in:
parent
405d0c2e19
commit
b4a4e081e4
@ -308,15 +308,16 @@ class sqlfs_stream_wrapper implements iface_stream_wrapper
|
|||||||
':fs_mime' => $mime_magic->filename2mime($this->opened_path),
|
':fs_mime' => $mime_magic->filename2mime($this->opened_path),
|
||||||
':fs_id' => $this->opened_fs_id,
|
':fs_id' => $this->opened_fs_id,
|
||||||
':fs_modifier' => egw_vfs::$user,
|
':fs_modifier' => egw_vfs::$user,
|
||||||
|
':fs_modified' => self::_pdo_timestamp(time()),
|
||||||
);
|
);
|
||||||
|
|
||||||
if ($this->operation == self::STORE2FS)
|
if ($this->operation == self::STORE2FS)
|
||||||
{
|
{
|
||||||
$stmt = self::$pdo->prepare('UPDATE '.self::TABLE.' SET fs_size=:fs_size,fs_mime=:fs_mime,fs_modifier=:fs_modifier WHERE fs_id=:fs_id');
|
$stmt = self::$pdo->prepare('UPDATE '.self::TABLE.' SET fs_size=:fs_size,fs_mime=:fs_mime,fs_modifier=:fs_modifier,fs_modified=:fs_modified WHERE fs_id=:fs_id');
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
$stmt = self::$pdo->prepare('UPDATE '.self::TABLE.' SET fs_size=:fs_size,fs_mime=:fs_mime,fs_modifier=:fs_modifier,fs_content=:fs_content WHERE fs_id=:fs_id');
|
$stmt = self::$pdo->prepare('UPDATE '.self::TABLE.' SET fs_size=:fs_size,fs_mime=:fs_mime,fs_modifier=:fs_modifier,fs_modified=:fs_modified,fs_content=:fs_content WHERE fs_id=:fs_id');
|
||||||
$this->stream_seek(0,SEEK_SET); // rewind to the start
|
$this->stream_seek(0,SEEK_SET); // rewind to the start
|
||||||
$stmt->bindParam(':fs_content', $this->opened_stream, PDO::PARAM_LOB);
|
$stmt->bindParam(':fs_content', $this->opened_stream, PDO::PARAM_LOB);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user