diff --git a/lib/WebGUI/AdminConsole.pm b/lib/WebGUI/AdminConsole.pm index 847509cbe..2677f91e8 100644 --- a/lib/WebGUI/AdminConsole.pm +++ b/lib/WebGUI/AdminConsole.pm @@ -34,6 +34,7 @@ The admin console is a menuing system to manage webgui's administrative function addSubmenuItem getAdminConsoleParams getAdminFunction + getHelp new render setHelp diff --git a/lib/WebGUI/Storage.pm b/lib/WebGUI/Storage.pm index ddf6d7355..fb7946064 100644 --- a/lib/WebGUI/Storage.pm +++ b/lib/WebGUI/Storage.pm @@ -47,6 +47,7 @@ This package provides a mechanism for storing and retrieving files that are not $filename = $store->addFileFromHashref($filename,$hashref); $filename = $store->addFileFromScalar($filename,$content); + $arrayref = $store->getErrors; $integer = $store->getErrorCount; $hashref = $store->getFileContentsAsHashref($filename); $string = $store->getFileContentsAsScalar($filename); @@ -420,7 +421,7 @@ sub get { my $id = shift; return undef unless $id; $id =~ m/^(.{2})(.{2})/; - my $self = {_session=>$session, _id => $id, _part1 => $1, _part2 => $2}; + my $self = {_session=>$session, _id => $id, _part1 => $1, _part2 => $2, _errors => []}; bless $self, ref($class)||$class; $self->_makePath unless (-e $self->getPath); # create the folder in case it got deleted somehow return $self; @@ -441,6 +442,20 @@ sub getErrorCount { } +#------------------------------------------------------------------- + +=head2 getErrors ( ) + +Returns an arrayref with all errors for this object + +=cut + +sub getErrors { + my $self = shift; + return $self->{_errors}; +} + + #------------------------------------------------------------------- =head2 getFileContentsAsScalar ( filename )