"fixed not updated modification time, if file get's updated (eg. replaced via a new update in filemanager)"

This commit is contained in:
Ralf Becker 2009-04-16 16:32:30 +00:00
parent 5629c10e12
commit 7233f87413

View File

@ -316,15 +316,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);
} }