Closed (fixed)
Project:
User Relationships
Version:
5.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Feature request
Assigned:
Unassigned
Reporter:
Created:
25 Sep 2007 at 23:01 UTC
Updated:
11 Oct 2007 at 18:08 UTC
Jump to comment: Most recent file
Comments
Comment #1
Annette Tisdale commentedAttached is a patch with code changes for this enhancement.
Comment #2
sprsquish commentedNice.
Needs a little work though:
variable_get requires the second ($default) argument. There are places where this is missed.
The variables wont necessarily be set to their default states so it's important that the default argument is an actual message. I'd suggest creating a function called _user_relationship_message_defaults that returns an array with keys that match the names of the variable_get variables. Then it'd be easy to do the following:
$default_messages = _user_relationship_message_defaults();
$msg_name = 'user_relationships_msg_too_many_relations';
$msg = variable_get($msg_name, $default_messages[$msg_name]);
Comment #3
Annette Tisdale commentedAttached is an updated patch with defaults messages.
Comment #4
gwen commentedComment #5
sprsquish commentedAnnette, I emailed you my thoughts.
Comment #6
Annette Tisdale commentedre-factored code generating default messages.
Comment #7
gwen commentedComment #8
Annette Tisdale commentedI have added a small change to make the plural name of the relationship available. A new patch is attached, containing this and the previously updated code.
Comment #9
sprsquish commentedComment #10
gwen commentedIt looks like the code was checked in without the ability to set an empty string as a notification. Also missing is the fix to hunt out messages in arrays #2 - n. A patch is attached.
Comment #11
sprsquish commentedFixed the blank string issue.
I'm still not clear on what's happening for you with that recursive function. Through my tests it's working just as it should
Comment #12
sprsquish commented