Skip to content
Snippets Groups Projects
Commit 467b90d5 authored by Kirill Roskolii's avatar Kirill Roskolii
Browse files

Fixed paths to add relationship page.

parent eba93568
No related branches found
No related tags found
No related merge requests found
......@@ -30,15 +30,7 @@ function crm_core_relationship_ui_menu() {
'title' => 'Add ' . $info->label,
'description' => 'Add a relationship to this contact',
'page callback' => 'crm_core_relation_entity_ui_get_form_wrapper',
'page arguments' => ($key == 'contact' ? array(
2,
5,
6
) : array(
NULL,
3,
4
)),
'page arguments' => ($key == 'contact' ? array( 2, 5, 6) : array(NULL, 3, 4)),
'access callback' => 'crm_core_relationship_access_permissions',
'access arguments' => array(NULL, 'create_view'),
'type' => MENU_NORMAL_ITEM,
......
......@@ -208,7 +208,7 @@ function crm_core_relationship_ui_add_relationship($contact) {
$relationship_types = crm_core_relationship_load_relationship_types($contact_type->type, $reverse);
foreach ($relationship_types as $relationship_type) {
if (user_access('create relation entities of bundle ' . $relationship_type->relation_type) || user_access('create relation entities of any contact relationship')) {
$href = 'crm-core/relationship/add/' . $relationship_type->relation_type . '/' . $reverse;
$href = 'crm-core/contact/relationship-add/' . $relationship_type->relation_type . '/' . $reverse;
$title = $reverse ? $relationship_type->reverse_label : $relationship_type->label;
$relationship_type_links[] = array(
'title' => $title,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment