diff options
author | Dries Buytaert <dries@buytaert.net> | 2007-06-17 10:43:25 +0000 |
---|---|---|
committer | Dries Buytaert <dries@buytaert.net> | 2007-06-17 10:43:25 +0000 |
commit | 3c8991d0b7b21239133071918a88ec3b10d69a87 (patch) | |
tree | 401cb2d2012c3adec4075154b31f9a7d2e99fc82 /modules/upload | |
parent | 931a4f32dc4841048d088e9f4e61fec89008cd61 (diff) | |
download | brdo-3c8991d0b7b21239133071918a88ec3b10d69a87.tar.gz brdo-3c8991d0b7b21239133071918a88ec3b10d69a87.tar.bz2 |
- Patch #152291 by dopry: remove some remaining cruft for handling preview URLs from upload.module.
Diffstat (limited to 'modules/upload')
-rw-r--r-- | modules/upload/upload.module | 8 |
1 files changed, 2 insertions, 6 deletions
diff --git a/modules/upload/upload.module b/modules/upload/upload.module index ab36b6c69..cdc6cb563 100644 --- a/modules/upload/upload.module +++ b/modules/upload/upload.module @@ -499,8 +499,7 @@ function theme_upload_attachments($files) { foreach ($files as $file) { $file = (object)$file; if ($file->list && empty($file->remove)) { - // Generate valid URL for both existing attachments and preview of new attachments (these have 'upload' in fid) - $href = file_create_url((strpos($file->fid, 'upload') === FALSE ? $file->filepath : file_create_filename($file->filename, file_create_path()))); + $href = file_create_url($file->filepath); $text = $file->description ? $file->description : $file->filename; $rows[] = array(l($text, $href), format_size($file->filesize)); } @@ -612,12 +611,9 @@ function _upload_form($node) { $form['files']['#theme'] = 'upload_form_current'; $form['files']['#tree'] = TRUE; foreach ($node->files as $key => $file) { - // Generate valid URL for both existing attachments and preview of new - // attachments (these have 'upload' in fid). - $description = file_create_url((strpos($file->fid, 'upload') === FALSE ? $file->filepath : file_create_filename($file->filename, file_create_path()))); + $description = file_create_url($file->filepath); $description = "<small>". check_plain($description) ."</small>"; $form['files'][$key]['description'] = array('#type' => 'textfield', '#default_value' => !empty($file->description) ? $file->description : $file->filename, '#maxlength' => 256, '#description' => $description ); - $form['files'][$key]['size'] = array('#value' => format_size($file->filesize)); $form['files'][$key]['remove'] = array('#type' => 'checkbox', '#default_value' => !empty($file->remove)); $form['files'][$key]['list'] = array('#type' => 'checkbox', '#default_value' => $file->list); |