fix - [ 1187040 ] getNextChildRank doesn't handle rank 999999

This commit is contained in:
Roy Johnson 2005-06-05 18:47:36 +00:00
parent 6b662543dd
commit 5282b959ca

View file

@ -1526,11 +1526,12 @@ Returns a 6 digit number with leading zeros of the next rank a child will get.
=cut
sub getNextChildRank {
my $self = shift;
my $self = shift;
my ($lineage) = WebGUI::SQL->quickArray("select max(lineage) from asset where parentId=".quote($self->getId));
my $rank;
if (defined $lineage) {
$rank = $self->getRank($lineage);
if ($rank >= 999998) { WebGUI::ErrorHandler->fatal; }
$rank++;
} else {
$rank = 1;