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
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

starbow - April 5, 2008 - 15:44

Thanks for the tip. I will make sure this gets into the next roll.

#2

starbow - July 3, 2008 - 08:01
Status:active» fixed

#3

Anonymous (not verified) - July 23, 2008 - 10:56
Status:fixed» closed

Automatically closed -- issue fixed for two weeks with no activity.

 
 

Drupal is a registered trademark of Dries Buytaert.