From 1d7f34ff62d9bf25038fa1a83350ad022bdc7928 Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Sun, 5 Oct 2008 09:01:20 +0000 Subject: [PATCH] "fs_modifier was not updated (it's currently not available, as no posix attribute, but for a dms it's quite usefully)" --- phpgwapi/inc/class.sqlfs_stream_wrapper.inc.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/phpgwapi/inc/class.sqlfs_stream_wrapper.inc.php b/phpgwapi/inc/class.sqlfs_stream_wrapper.inc.php index 26449ff4c2..709d3cf7dc 100644 --- a/phpgwapi/inc/class.sqlfs_stream_wrapper.inc.php +++ b/phpgwapi/inc/class.sqlfs_stream_wrapper.inc.php @@ -297,15 +297,16 @@ class sqlfs_stream_wrapper implements iface_stream_wrapper // todo: analyse the file for the mime-type ':fs_mime' => $mime_magic->filename2mime($this->opened_path), ':fs_id' => $this->opened_fs_id, + ':fs_modifier' => egw_vfs::$user, ); if ($this->operation == self::STORE2FS) { - $stmt = self::$pdo->prepare('UPDATE '.self::TABLE.' SET fs_size=:fs_size,fs_mime=:fs_mime 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 WHERE fs_id=:fs_id'); } else { - $stmt = self::$pdo->prepare('UPDATE '.self::TABLE.' SET fs_size=:fs_size,fs_mime=:fs_mime,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_content=:fs_content WHERE fs_id=:fs_id'); $this->stream_seek(0,SEEK_SET); // rewind to the start $stmt->bindParam(':fs_content', $this->opened_stream, PDO::PARAM_LOB); } @@ -707,10 +708,11 @@ class sqlfs_stream_wrapper implements iface_stream_wrapper } $stat = self::url_stat($path,0); } - $stmt = self::$pdo->prepare('UPDATE '.self::TABLE.' SET fs_modified=:fs_modified WHERE fs_id=:fs_id'); + $stmt = self::$pdo->prepare('UPDATE '.self::TABLE.' SET fs_modified=:fs_modified,fs_modifier=:fs_modifier WHERE fs_id=:fs_id'); return $stmt->execute(array( ':fs_modified' => self::_pdo_timestamp($time ? $time : time()), + ':fs_modifier' => egw_vfs::$user, ':fs_id' => $stat['ino'], )); }