diff options
| author | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-10-03 19:12:27 +0000 |
|---|---|---|
| committer | alec <alec@208e9e7b-5314-0410-a742-e7e81cd9613c> | 2009-10-03 19:12:27 +0000 |
| commit | 84b7551737fb20228dd52b0868a2421d7b51b5e2 (patch) | |
| tree | 53db6fe2023a1e009f3fe2d3ecb6cac709095b9b /roundcubemail/plugins | |
| parent | c019b35abd0731afbb3519aee9f4965a39ed00fd (diff) | |
- Added attachment upload indicator with parallel upload (#1486058)
git-svn-id: https://svn.roundcube.net/trunk@3011 208e9e7b-5314-0410-a742-e7e81cd9613c
Diffstat (limited to 'roundcubemail/plugins')
| -rw-r--r-- | roundcubemail/plugins/filesystem_attachments/filesystem_attachments.php | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/roundcubemail/plugins/filesystem_attachments/filesystem_attachments.php b/roundcubemail/plugins/filesystem_attachments/filesystem_attachments.php index fcdcea7a5..dce2de293 100644 --- a/roundcubemail/plugins/filesystem_attachments/filesystem_attachments.php +++ b/roundcubemail/plugins/filesystem_attachments/filesystem_attachments.php @@ -57,7 +57,7 @@ class filesystem_attachments extends rcube_plugin $tmpfname = tempnam($temp_dir, 'rcmAttmnt'); if (move_uploaded_file($args['path'], $tmpfname) && file_exists($tmpfname)) { - $args['id'] = count($_SESSION['plugins']['filesystem_attachments']['tmp_files'])+1; + $args['id'] = $this->file_id(); $args['path'] = $tmpfname; $args['status'] = true; @@ -88,7 +88,7 @@ class filesystem_attachments extends rcube_plugin return $args; } - $args['id'] = count($_SESSION['plugins']['filesystem_attachments']['tmp_files'])+1; + $args['id'] = $this->file_id(); $args['status'] = true; // Note the file for later cleanup @@ -146,4 +146,11 @@ class filesystem_attachments extends rcube_plugin } return $args; } + + function file_id() + { + $userid = rcmail::get_instance()->user->ID; + list($usec, $sec) = explode(' ', microtime()); + return preg_replace('/[^0-9]/', '', $userid . $sec . $usec); + } } |
