add missing filename methods

This commit is contained in:
Colin Kuskie 2006-07-19 18:10:37 +00:00
parent edf99fe361
commit 534855ddc8
2 changed files with 32 additions and 0 deletions

View file

@ -27,6 +27,7 @@
privs to the storage associated with it. (Martin Kamerbeek / Procolix) privs to the storage associated with it. (Martin Kamerbeek / Procolix)
- Added a reverse page loop option to the navigation asset (Martin - Added a reverse page loop option to the navigation asset (Martin
Kamerbeek / Procolix) Kamerbeek / Procolix)
- fix: WebGUI::Image missing methods
- Added runOnLogin and runOnLogout config file properties to Authentication to allow - Added runOnLogin and runOnLogout config file properties to Authentication to allow
for running an external script on successful login or logout. for running an external script on successful login or logout.

View file

@ -40,6 +40,24 @@ sub getBackgroundColor {
#------------------------------------------------------------------- #-------------------------------------------------------------------
=head2 getFilename ( )
Returns the filename that has been set for this Image. If no filename
has been set, then it throws a fatal error.
=cut
sub getFilename {
my $self = shift;
if (exists $self->{_properties}->{filename}) {
return $self->{_properties}->{filename};
}
$self->session->errorHandler->fatal('Attempted to retrieve filename before one was set');
return '';
}
#-------------------------------------------------------------------
=head2 getImageHeight ( ) =head2 getImageHeight ( )
Returns the height of the image in pixels. Returns the height of the image in pixels.
@ -203,6 +221,19 @@ sub setBackgroundColor {
#------------------------------------------------------------------- #-------------------------------------------------------------------
=head2 setFilename ($filename)
Set the default filename to be used for this image. Returns the filename.
=cut
sub setFilename {
my ($self,$filename) = shift;
$self->{_properties}->{filename} = $filename;
}
#-------------------------------------------------------------------
=head2 setImageHeight ( height ) =head2 setImageHeight ( height )
Set the height of the image. Set the height of the image.