4 use CXGN
::Scrap
::AjaxPage
;
5 use CXGN
::DB
::Connection
;
9 my $dbh = CXGN
::DB
::Connection
->new();
10 my($login_person_id,$login_user_type)=CXGN
::Login
->new($dbh)->verify_session();
12 if ($login_user_type eq 'curator' || $login_user_type eq 'submitter') {
15 my $doc = CXGN
::Scrap
::AjaxPage
->new();
16 my ($locus_id, $registry_id, $sp_person_id) = $doc->get_encoded_arguments("locus_id", "registry_id", "sp_person_id");
19 my $registry_query = $dbh->prepare("INSERT INTO phenome.locus_registry (locus_id, registry_id, sp_person_id) VALUES (?, ?, ?)");
21 $registry_query->execute($locus_id, $registry_id, $sp_person_id);
23 if ($@
) { warn "locus-registry association failed!"; }
26 my $subject="[New registry associated] locus $locus_id";
27 my $fdbk_body="user $login_person_id has associated registry $registry_id with locus $locus_id \n ";
28 CXGN
::Contact
::send_email
($subject,$fdbk_body, 'sgn-db-curation@sgn.cornell.edu');
29 CXGN
::Feed
::update_feed
($subject,$fdbk_body);