[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.402, Thu Dec 1 22:28:13 2005 UTC revision 1.403, Fri Dec 2 20:13:44 2005 UTC
# Line 2811  Line 2811 
2811    
2812      my $rdbH = $self->db_handle;      my $rdbH = $self->db_handle;
2813    
2814        #
2815        # Strip the figdisk path from the file. N2file replaces it if the path
2816        # in the database is relative.
2817        #
2818        $file =~ s,^$FIG_Config::fig_disk/,,;
2819    
2820      if (($relational_db_response = $rdbH->SQL("SELECT fileno FROM file_table WHERE ( file = \'$file\')")) &&      if (($relational_db_response = $rdbH->SQL("SELECT fileno FROM file_table WHERE ( file = \'$file\')")) &&
2821          (@$relational_db_response == 1)) {          (@$relational_db_response == 1)) {
2822          return $relational_db_response->[0]->[0];          return $relational_db_response->[0]->[0];
# Line 2845  Line 2851 
2851      # accessed multiple times (as in when a bunch of sims are requested).      # accessed multiple times (as in when a bunch of sims are requested).
2852      #      #
2853    
   
2854      my $fcache = $self->cached("_n2file");      my $fcache = $self->cached("_n2file");
2855    
2856      my $fname;      my $fname;
# Line 2861  Line 2866 
2866      if ($relational_db_response and @$relational_db_response == 1)      if ($relational_db_response and @$relational_db_response == 1)
2867      {      {
2868          $fname = $relational_db_response->[0]->[0];          $fname = $relational_db_response->[0]->[0];
2869    
2870            #
2871            # If $fname is relative, prepend the base of the fig_disk.
2872            #
2873    
2874            if ($fname !~ m,^/,)
2875            {
2876                $fname = "$FIG_Config::fig_disk/$fname";
2877            }
2878    
2879          $fcache->{$fileno} = $fname;          $fcache->{$fileno} = $fname;
2880          return $fname;          return $fname;
2881      }      }

Legend:
Removed from v.1.402  
changed lines
  Added in v.1.403

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3