Skip to content
Snippets Groups Projects
Commit 190862a0 authored by Dave Reid's avatar Dave Reid
Browse files

Restored assigning $node->path to the newly created alias.

parent 0039c55f
No related branches found
Tags 6.x-2.0-rc1
No related merge requests found
......@@ -506,8 +506,8 @@ function pathauto_create_alias($module, $op, $source, $data, $entity_id, $type =
'alias' => $alias,
'language' => $language,
);
_pathauto_set_alias($path, $existing_alias, $op);
return $alias;
$success = _pathauto_set_alias($path, $existing_alias, $op);
return $success ? $alias : NULL;
}
/**
......
......@@ -428,7 +428,9 @@ function pathauto_node_update_alias($node, $op, $options = array()) {
}
module_load_include('inc', 'pathauto');
pathauto_create_alias('node', $op, "node/{$node->nid}", array('node' => $node), $node->nid, $node->type, $language);
if ($alias = pathauto_create_alias('node', $op, "node/{$node->nid}", array('node' => $node), $node->nid, $node->type, $language)) {
$node->path = $alias;
}
}
/**
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment