To say it right away, I'm sorry about combining all of this into a kitchensink patch. It's tedious to keep multiple patchsets side by side, and even more so if they don't get committed. If you absolutely need them split, I'll still do that, but if not then I'd like to avoid that work as it's a lot of time for relatively little gain.

So this patch gets you the following:

  • All my and Egon's work from #123532 ("extract "api" into filefield.inc"), minus the "split" part. That sums up to: a) support for node revisions, b) making some of the "shared" functions non-private, c) applying Drupal coding style in all of the "shared" functions (if this would have been an .inc, nobody could have complained about mixing functionality with style fixes), and d) one or two minor fixes.
  • AJAX uploading support, with most pieces stolen from imagefield. Makes both the UI and the code behave more like imagefield.
  • Renamed $maycache to $may_cache, actually both variable names were used before, which can be considered a bug.

Thus, applying this bug would fix #123532 and #130269.

Tell me what you think, and what I can do to get stuff applied. I find it hard to keep track of all that stuff on my local working copy.

CommentFileSizeAuthor
filefield-kitchensink.patch17.41 KBjpetso

Comments

dopry’s picture

Status: Needs review » Needs work

1) whats going on with the files_count query at the beginning of filefield_load?
2) can you explain whats going on in filefield_field op = load
3) there are a couple of new , filefield_clear_field_session($fieldname);, why what is that fixing?

I would actually really appreciate these coming as seperate issues/patches so each change can be reviewed and tested more easily. I know its kind of a pain, but this is an awful lot to change at one time, which screams debugging nightmare to me.

.darrel.

jpetso’s picture

Status: Needs work » Closed (fixed)

> 3) there are a couple of new , filefield_clear_field_session($fieldname);, why what is that fixing?

That's private downlaods support, also available as standalone patch in #113900.

Given that the important pieces (private downlaods support, revisions support, and most importantly the database consistency fix) are now available as separate patches, and AJAX support will be soon, it seems appropriate to close this issue. Again, sorry for not splitting the patch in the first place.

jpetso’s picture

The AJAX uploading part of the patch is now available in this issue, which means that there's nothing left in the kitchensink anymore, apart from style fixes. So this patch can be dismissed for good.