Skip to content

Commit

Permalink
remove duplicate function & correct url elplatt#281
Browse files Browse the repository at this point in the history
remove duplicate function & correct url elplatt#281
  • Loading branch information
chris18890 committed Apr 27, 2014
1 parent 7c668c8 commit b03accc
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 14 deletions.
14 changes: 3 additions & 11 deletions crm/modules/member/command.inc.php
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?php
<?php

/*
Copyright 2009-2014 Edward L. Platt <[email protected]>
Expand Down Expand Up @@ -94,9 +94,6 @@ function command_member_add () {
);
$member = array('membership' => $membership);
$contact['member'] = $member;
// Add user fields
$user = array('username' => $username);
$contact['user'] = $user;
// Save to database
$contact = contact_save($contact);

Expand Down Expand Up @@ -213,8 +210,6 @@ function command_member_membership_add () {
return crm_url('members');
}

// Add membership

// Construct membership object and save
$membership = array(
'sid' => $_POST['sid']
Expand All @@ -225,7 +220,7 @@ function command_member_membership_add () {
);
member_membership_save($membership);

return crm_url("contact&cid=$_POST[cid]");
return crm_url("contact&cid=$_POST[cid]&tab=plan");
}

/**
Expand Down Expand Up @@ -275,7 +270,7 @@ function command_member_membership_delete () {
// Delete membership
member_membership_delete($esc_post['sid']);

return crm_url("contact&cid=$_POST[cid]");
return crm_url("contact&cid=$_POST[cid]&tab=plan");
}

/**
Expand Down Expand Up @@ -431,9 +426,6 @@ function command_member_import () {
);
$member = array('membership' => $membership);
$contact['member'] = $member;
// Add user
$user = array('username' => $username);
$contact['user'] = $user;

$contact = contact_save($contact);

Expand Down
3 changes: 0 additions & 3 deletions crm/modules/register/register.inc.php
Original file line number Diff line number Diff line change
Expand Up @@ -158,9 +158,6 @@ function command_register () {
);
$member = array('membership' => $membership);
$contact['member'] = $member;
// Add user fields
$user = array('username' => $username);
$contact['user'] = $user;
// Save to database
$contact = contact_save($contact);

Expand Down

0 comments on commit b03accc

Please sign in to comment.