[Bio] / Sprout / ERDBTypeImage.pm Repository:
ViewVC logotype

Diff of /Sprout/ERDBTypeImage.pm

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

revision 1.2, Thu Feb 5 06:53:08 2009 UTC revision 1.4, Tue Jun 30 19:53:01 2009 UTC
# Line 25  Line 25 
25      use GD;      use GD;
26      use FIGRules;      use FIGRules;
27      use MIME::Base64;      use MIME::Base64;
28        use ERDBExtras;
29      use base qw(ERDBType);      use base qw(ERDBType);
30    
31  =head1 ERDB Image Type Definition  =head1 ERDB Image Type Definition
# Line 254  Line 255 
255      my $defaultValue = $et->default();      my $defaultValue = $et->default();
256    
257  Default value to be used for fields of this type if no default value is  Default value to be used for fields of this type if no default value is
258  specified in the database definition or in an [[ERDBLoadGroup#Put]]  specified in the database definition or in an L<ERDBLoadGroup/Put>
259  call during a loader operation. The default is undefined, which means  call during a loader operation. The default is undefined, which means
260  an error will be thrown during the load.  an error will be thrown during the load.
261    
# Line 292  Line 293 
293      # to a temporary file.      # to a temporary file.
294      my $sessionID = FIGRules::NewSessionID();      my $sessionID = FIGRules::NewSessionID();
295      my $fileName = FIGRules::NewSessionID() . "image$$.png";      my $fileName = FIGRules::NewSessionID() . "image$$.png";
296      my $oh = Open(undef, ">$FIG_Config::temp/$fileName");      my $oh = Open(undef, ">$ERDBExtras::temp/$fileName");
297      print $oh $value->png();      print $oh $value->png();
298      close $oh;      close $oh;
299      my $retVal = CGI::img({ src => "$FIG_Config::temp_url/$fileName" });      my $retVal = CGI::img({ src => "$ERDBExtras::temp_url/$fileName" });
300      return $retVal;      return $retVal;
301  }  }
302    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.4

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3