FYI: the file attachments table should be weighted
dylanb - April 4, 2008 - 11:15
| Project: | Private Upload |
| Version: | 5.x-1.0-beta6 |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
FYI: I noticed a small problem with this otherwise excellent module. When I view a node with file attachments (private or public) the file attachments table appears at the bottom of the node when I'm logged in but at the top when I'm anonymous.
I fixed it by adding a new line in the `private_upload_nodeapi` function
<?php
// Always rebuild the files table and overwrite default.
$node->content['files']['#value'] = theme('private_upload_attachments', $node->files);
/********************
**new line here
********************/
$node->content['files']['#weight'] = 50;
break;
?>Basically, I explicitly set the weight of the table to something high (like in the core `upload` module) to make sure it behaved like the core module.

#1
Thanks for the tip. I will make sure this gets into the next roll.
#2
#3
Automatically closed -- issue fixed for two weeks with no activity.