This patch converts the node module please look over it closely for mistakes or misinterpretations i might have made concerning the point of this antipattern resolution and ill do the rest this week.

This patch:
* replaces a number pf plain statics with the new function based approach for consistency
* Removes the $reset argument from the node_get_types function and moves the reset_cache operation under types_rebuild() and _node_revision_access() as appropriate

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

michaelfavia’s picture

FileSize
3.82 KB

forgot to name "extras" in reset. makes a good argument for storing them as assoc array and unsetting the parent.

Status: Needs review » Needs work

The last submitted patch failed testing.

JamesAn’s picture

Assigned: michaelfavia » Unassigned
Status: Needs work » Needs review
FileSize
1.86 KB

Here's an updated attempt. The node module has been modified since the last attempt.

Status: Needs review » Needs work

The last submitted patch failed testing.

JamesAn’s picture

Status: Needs work » Needs review
FileSize
9.94 KB

I thought this patch would be a bit harder.. =P

The last submitted patch failed testing.

JamesAn’s picture

Status: Needs work » Needs review

Status: Needs review » Needs work

The last submitted patch failed testing.

lilou’s picture

Status: Needs work » Needs review

Setting to 'needs review' - testbot was broken.

JamesAn’s picture

FileSize
9.94 KB

Rerolled. Several of the changes were offset by a fair bit.

Status: Needs review » Needs work

The last submitted patch failed testing.

JamesAn’s picture

FileSize
9.94 KB

Rerolled.

Status: Needs review » Needs work

The last submitted patch failed testing.

JamesAn’s picture

Status: Needs work » Needs review
FileSize
1.51 KB

Rerolled. A lot of the changes are no longer necessary as node_load uses entity_load that doesn't use static vars.

Status: Needs review » Needs work

The last submitted patch failed testing.

agentrickard’s picture

Re-rolled.

Any reason for the array() values being passed in the original patch?

agentrickard’s picture

FileSize
1.48 KB

And the patch.

agentrickard’s picture

Status: Needs work » Needs review
agentrickard’s picture

FileSize
1.5 KB

I see why we need the array() params. Put back.

HedgeMage’s picture

I just tested the patch from #17 and it looks good to me.

cburschka’s picture

Status: Needs review » Reviewed & tested by the community

Not quite; the array() is indeed necessary to avoid notices. #19 seems ready, however.

webchick’s picture

Status: Reviewed & tested by the community » Fixed

Wow, this is a straggler. Committed to HEAD, thanks!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.