Active
Project:
Content Construction Kit (CCK)
Version:
6.x-2.x-dev
Component:
content.module
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
16 Jun 2008 at 19:51 UTC
Updated:
8 Oct 2008 at 20:11 UTC
It seem that the code brought into 6.x:
http://api.drupal.org/api/function/drupal_write_record/6
Is nearly identical or identical with the code in function content_write_record($table, &$object, $update = array())
Seems that it would be reasonable to just use the core function and eliminate this custom function?
Comments
Comment #1
karens commentedSee the PHP docs -- drupal_write_record() has a problem if you use NULL columns, which we need. Someone should have noted the issue number where that was discovered, I think it was a core patch that never made it in. I'll see if I can find it.
Comment #2
karens commentedHere are the issues, and I'll add it to the PHP docs -- http://drupal.org/node/227677 and http://drupal.org/node/226264.
The fix never did get committed to core, so it seems it is still needed.
Comment #3
karens commentedThinking more, this is really a TODO. I added a TODO to get rid of the duplicate function once the core function gets patched. We'll have to think about how to do that without breaking things for people who aren't current on the latest Drupal core version.
Comment #4
pwolanin commentedhook requirements for Drupal core version?
Comment #5
zeta ζ commentedWill the .info file need updating to require core 6.3?
(sorry if this is what pwolanin said in #4 – not sure what that means)
Comment #6
pwolanin commentedI'm not sure that can be specified in the .info file (though maybe) - there is also a hook_requirements which is usually in the .install file.
Comment #7
karens commentedDouble-checking this one again, it is still not committed, even to D7, let alone D6, so this is still needed.