fixed bug 718522
This commit is contained in:
parent
505476216e
commit
0d3dd0fcd8
1 changed files with 19 additions and 7 deletions
|
|
@ -567,15 +567,21 @@ This method should be overridden by all wobjects and should return an internatio
|
||||||
=cut
|
=cut
|
||||||
|
|
||||||
sub name {
|
sub name {
|
||||||
my $cmd = "\$WebGUI::Wobject::".$_[0]->get("namespace")."::name";
|
my $namespace = $_[0]->get("namespace");
|
||||||
my $name = eval($cmd);
|
if ($namespace eq "") {
|
||||||
if ($@) {
|
WebGUI::ErrorHandler::warn("No namespace available in this wobject instance.");
|
||||||
WebGUI::ErrorHandler::warn($_[0]->get("namespace")." does not appear to have any sort of name definition at all.");
|
return "! Unknown Wobject !";
|
||||||
return $_[0]->get("namespace");
|
|
||||||
} else {
|
} else {
|
||||||
|
my $cmd = "\$WebGUI::Wobject::".$namespace."::name";
|
||||||
|
my $name = eval($cmd);
|
||||||
|
if ($name eq "") {
|
||||||
|
WebGUI::ErrorHandler::warn($namespace." does not appear to have any sort of name definition at all.");
|
||||||
|
return $namespace;
|
||||||
|
}
|
||||||
return $name;
|
return $name;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
#-------------------------------------------------------------------
|
#-------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
@ -620,7 +626,13 @@ NOTE: This is used to define the wobject and should only be passed in by a wobje
|
||||||
|
|
||||||
sub new {
|
sub new {
|
||||||
my ($self, @p) = @_;
|
my ($self, @p) = @_;
|
||||||
my ($properties, $extendedProperties, $useDiscussion) = rearrange([qw(properties extendedProperties useDiscussion)], @p);
|
my ($properties, $extendedProperties, $useDiscussion);
|
||||||
|
if (ref $_[1] eq "HASH") {
|
||||||
|
$properties = $_[1]; # reverse compatibility prior to 5.2
|
||||||
|
} else {
|
||||||
|
($properties, $extendedProperties, $useDiscussion) =
|
||||||
|
rearrange([qw(properties extendedProperties useDiscussion)], @p);
|
||||||
|
}
|
||||||
$useDiscussion = 0 unless ($useDiscussion);
|
$useDiscussion = 0 unless ($useDiscussion);
|
||||||
my $wobjectProperties = {
|
my $wobjectProperties = {
|
||||||
userDefined1=>{},
|
userDefined1=>{},
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue