Changeset 7f37b87 in github
- Timestamp:
- Jul 31, 2009 5:13:11 AM (4 years ago)
- Branches:
- master, HEAD, courier-fix, dev-browser-capabilities, pdo, release-0.6, release-0.7, release-0.8
- Children:
- 1fcad15
- Parents:
- 269fb82
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
plugins/filesystem_attachments/filesystem_attachments.php
ra640647 r7f37b87 41 41 // Delete all temp files associated with this user 42 42 $this->add_hook('cleanup_attachments', array($this, 'cleanup')); 43 $this->add_hook('kill_session', array($this, 'cleanup')); 43 44 } 44 45 … … 74 75 { 75 76 $args['status'] = false; 76 77 if (!$args['path']) {78 $rcmail = rcmail::get_instance();77 78 if (!$args['path']) { 79 $rcmail = rcmail::get_instance(); 79 80 $temp_dir = unslashify($rcmail->config->get('temp_dir')); 80 $tmp_path = tempnam($temp_dir, 'rcmAttmnt');81 $tmp_path = tempnam($temp_dir, 'rcmAttmnt'); 81 82 82 if ($fp = fopen($tmp_path, 'w')) {83 fwrite($fp, $args['data']);84 fclose($fp);85 $args['path'] = $tmp_path;86 } else87 return $args;88 }83 if ($fp = fopen($tmp_path, 'w')) { 84 fwrite($fp, $args['data']); 85 fclose($fp); 86 $args['path'] = $tmp_path; 87 } else 88 return $args; 89 } 89 90 90 $args['id'] = count($_SESSION['plugins']['filesystem_attachments']['tmp_files'])+1;91 $args['id'] = count($_SESSION['plugins']['filesystem_attachments']['tmp_files'])+1; 91 92 $args['status'] = true; 92 93
Note: See TracChangeset
for help on using the changeset viewer.
