--- upload_preview.module.orig 2008-01-16 11:54:44.000000000 +0000
+++ upload_preview.module 2008-01-16 12:07:16.000000000 +0000
@@ -128,9 +128,9 @@
if ($path) {
// The image exists and the preview can be added.
+ $image = theme('upload_preview_image', file_create_url($path), $file->description);
return array(
- '#type' => 'upload_preview_image',
- '#value' => file_create_url($path),
+ '#value' => l($image, file_create_url($file->filepath), array(), NULL, NULL, FALSE, TRUE),
);
}
}
@@ -317,6 +317,6 @@
/**
* Theme a file upload preview image.
*/
-function theme_upload_preview_image($element) {
- return '
';
+function theme_upload_preview_image($url, $alt) {
+ return '
';
}