in user_relationships_type_edit_submit, you have code like this:


function user_relationships_type_edit_submit($form_id, &$form_values) {
  if (arg(3) == 'add') {

This effectively makes it impossible to programmatically submit this form because it is designed to only work if submitted from the form's page itself. Since creating relationship types is not an event that will happen often, you can afford to insert the row, check the number of rows affected, and if it is zero, update the row. Alternatively you could delete the row and then insert it, like is done with variable_set: http://api.drupal.org/api/function/variable_set/5

Comments

robertDouglass’s picture

Here as well I haven't looked into the later versions of the API to see if this limitation has been corrected.

sprsquish’s picture

Status: Active » Fixed

fixed on 5x-1.1 and 5x-2.x-dev

Anonymous’s picture

Status: Fixed » Closed (fixed)

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