forked from elplatt/seltzer
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
remove duplicate function & correct url elplatt#281
remove duplicate function & correct url elplatt#281
- Loading branch information
1 parent
7c668c8
commit b03accc
Showing
2 changed files
with
3 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
<?php | ||
<?php | ||
|
||
/* | ||
Copyright 2009-2014 Edward L. Platt <[email protected]> | ||
|
@@ -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); | ||
|
||
|
@@ -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'] | ||
|
@@ -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"); | ||
} | ||
|
||
/** | ||
|
@@ -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"); | ||
} | ||
|
||
/** | ||
|
@@ -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); | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters