-
Now correctly implementing the logic in $op = 'load' in hook_nodeapi so that we return an array that can be merged. ec_file_node_load() returns the full files array, which means a call to upload_load, otherwise $node->file doesn't get correctly populated. ec_file_node_delete() is now called with 2 arguments, not 1 optional one. The 'node load' bit in ec_file_form_alter() loses an extra db query, since we can get the values of the file product directly from the node object now.
-
Handle the case when a user marks a 'sell' node as not private any more.
-
Rewrote almost the entire logic in the first part of ec_file_form_alter() This code is HARD - hard to read, and hard to write. All we want to do is add a 'Sell' checkbox, and have it correctly remember its state. Turns out we need specific checks for: * loading the node * previewing the node * changing the checkbox value before previewing/saving. What a mission to test. I'm tempted to swear. Thank you #drupal-vent Most of this code is borrowed from the private_upload module. It's ugly, but it works.
-
Moved some functions around for readability.
-
Added ec_file_node_insert() for new nodes and ec_file_node_update() for updated nodes. Rewrote ec_file_form_submit() to get the logic right for making file sellable. What a mission! This should get all cases, though.
-
Same as last commit.
-
Getting the changelog right for 6.x-1.x-rc4
-
New function - ec_file_delete() New function - ec_file_presave() - adds or removes a file product to the database Adding and removing sellable files now works properly.
-
Small whitespace and documentation fixes.
-
Broke out the logic for putting ec_file data into the $node object into its own function - ec_file_node_load()