[Bio] / FigKernelPackages / FIG.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/FIG.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.86, Wed May 19 15:54:10 2004 UTC revision 1.87, Thu May 20 12:26:47 2004 UTC
# Line 1545  Line 1545 
1545    
1546  sub feature_aliases {  sub feature_aliases {
1547      my($self,$feature_id) = @_;      my($self,$feature_id) = @_;
1548      my($rdbH,$relational_db_response,$aliases);      my($rdbH,$relational_db_response,@aliases,$aliases,%aliases,$x);
1549    
1550      $rdbH = $self->db_handle;      $rdbH = $self->db_handle;
1551        @aliases = ();
1552      if (($relational_db_response = $rdbH->SQL("SELECT aliases FROM features WHERE ( id = \'$feature_id\' )")) &&      if (($relational_db_response = $rdbH->SQL("SELECT aliases FROM features WHERE ( id = \'$feature_id\' )")) &&
1553              (@$relational_db_response == 1))              (@$relational_db_response == 1))
1554      {      {
1555          $aliases = $relational_db_response->[0]->[0];          $aliases = $relational_db_response->[0]->[0];
1556            %aliases = map { $_ => 1 } split(/,/,$aliases);
1557            if (($relational_db_response = $rdbH->SQL("SELECT alias FROM ext_alias WHERE ( id = \'$feature_id\' )")) &&
1558                (@$relational_db_response > 0))
1559            {
1560                foreach $x (@$relational_db_response)
1561                {
1562                    $aliases{$x->[0]} = 1;
1563      }      }
1564      return $aliases ? (wantarray ? split(/,/,$aliases) : $aliases) : undef;          }
1565            @aliases = sort keys(%aliases);
1566        }
1567    
1568        return ((@aliases > 0) ? (wantarray() ? @aliases : join(",",@aliases)) : undef);
1569  }  }
1570    
1571  =pod  =pod

Legend:
Removed from v.1.86  
changed lines
  Added in v.1.87

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3