Subelements weren't checking for properties as children

git-svn-id: svn://10.0.0.236/trunk@215469 18797224-902f-48f8-a5cc-f745e15eee43
This commit is contained in:
ghendricks%novell.com
2006-11-20 17:09:26 +00:00
parent e6f5a47e35
commit 5bcb0906e9

View File

@@ -232,12 +232,19 @@ sub check_for_children{
my $dbh = Bugzilla->dbh;
my $self = shift;
my ($used) = $dbh->selectrow_array(qq{
SELECT 1
FROM test_environment_element
WHERE parent_id = ? },undef,$self->{'element_id'});
my ($has_element) = $dbh->selectrow_array(
"SELECT 1
FROM test_environment_element
WHERE parent_id = ?",
undef, $self->{'element_id'});
return $used;
my ($has_property) = $dbh->selectrow_array(
"SELECT 1
FROM test_environment_property
WHERE element_id = ?",
undef, $self->{'element_id'});
return $has_element || $has_property;
}
sub children_to_json{