That code is pretty hard to read, with the very long lines and the high level of nesting.

As per http://drupal.org/node/1619392#comment-6427312, some judicious use of continue statements will dramatically reduce that, and make the function much cleaner.

Comments

jweowu’s picture

This patch incorporates the fix from #1619392: Errors given when creating view (as per the second patch in comment #6), and significantly reduces the amount of nesting in the function.

I've also added a variable check to (optionally) disable the contextual links (if you only want the relationship from this module), but have not otherwise modified the function logic -- this is mostly to make the existing code more readable.

This patch requires the coding standards patch from http://drupal.org/node/1619400#comment-6427070 to be applied first.

jweowu’s picture

Status: Active » Needs review
jweowu’s picture

Issue summary: View changes

Linked to previous related comment

azinck’s picture

Issue summary: View changes
Status: Needs review » Fixed

Merged to 1.x-dev. Thanks!

  • c0dbb99 committed on 7.x-1.x
    Issues #1920700 and #1619392 by DamienMcKenna, jpstrikesback, jweowu:...

Status: Fixed » Closed (fixed)

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