Closed (fixed)
Project:
Content Distribution
Version:
6.x-2.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
9 Feb 2010 at 08:52 UTC
Updated:
24 Feb 2010 at 22:00 UTC
Jump to comment: Most recent file
Comments
Comment #1
joachim commentedPS. The main reason for doing this with two hooks in sequence rather than one is to guarantee that the alter hook runs first before any data is saved.
Comment #2
joachim commentedHeyho, another huge patch :)
Here's what it does:
- split out the code for handling a single node from _content_retriever_save_nodes() to _content_retriever_save_node(). Yes, bad names: singular/plural. But to handle that I'd need to rename _content_retriever_save_nodes() and that's really patch creep. Plus there's already a case of that in this module...
- split out unsetting of $node properties such as path, comment, etc to alter hook implementations in an .inc file. This is a temporary measure -- next we want a setting to either preserve the local ones, eg path, or copy the new one.
- split out filefield/imagefield stuff to a new module, content_retriever_process_filefield
- split out the CCK part of _content_retriever_save_file() into content_retriever_process_filefield
The upload module stuff should be farmed out too, but I'm not sure why some of it is done prior to node_save and some of it after, and I don't really have time to figure it out. I'll file a followup issue in case someone else wants to do it.
#708830 by joachim: Added hooks for alter and save on retrieved nodes; split out filefield handling to separate module; split out core node properties handling to an inc file.