Problem/Motivation

If you are programmatically creating relation types using relation_type_save(), then it calls menu_rebuild() each time when you only want it done once.

Proposed resolution

Add another parameter to relation_type_save() to allow for control over whether the menu is rebuilt. This will allow for multiple calls to this function before doing a menu rebuild. This functionality will be useful when an import from code is implemented.

Remaining tasks

None.

User interface changes

None.

API changes

This should be included in relation.api.php when it is written.

Comments

solotandem’s picture

Status: Active » Needs review
StatusFileSize
new878 bytes

Patch implements proposed resolution as described in summary.

naught101’s picture

Status: Needs review » Needs work

Ok, sounds reasonable, but please add a parameter line to the doxygen for that function.

solotandem’s picture

Status: Needs work » Needs review
StatusFileSize
new1.44 KB

Added the parameter line to the comment.

Status: Needs review » Needs work

The last submitted patch, 1327378-relation-type-save.patch, failed testing.

naught101’s picture

Component: Code » API
Status: Needs work » Active

Be careful with relation and relation type :)

Fixed in commit 9a17485. Thanks!

naught101’s picture

Status: Active » Fixed

I said fixed, dammit

Status: Fixed » Closed (fixed)

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