| Project: | Ubercart Contributions |
| Component: | Code |
| Category: | bug report |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | active |
Jump to:
Just testing the File Downloads area under user/#/edit and noticed that using the select list adds the file to the user, but does not send a pfid. Thats required for getting the description in the My Files list.
So, its an easy fix. At line 155, change this:
<?php
_user_table_action('allow',$fid,$account->uid);
?>to this:
<?php
$pfid = db_result(db_query("SELECT `pfid` FROM {uc_file_products} WHERE `fid` = %d", $fid));
_user_table_action('allow',$fid,$account->uid,$pfid);
?>I still think in some cases it'll be easier to add a product, and let the system assign all files currently attached to the product, as I did here. Might work well as a Contrib, or an addition to my uc_file_retro Contrib.
(It also occurred to me that I could probably fix the autocomplete / Secure Pages issue by adding the autocomplete path to the S.P. config .. d'oh!)
EDIT: Also, to the $files db_query above (that builds the select list) I added "ORDER BY filename" to make the list a little easier to read 
