templatePosition is set to '0' on any wobject that belongs to a page where the templatePosition is higher than the number of positions available.

This commit is contained in:
JT Smith 2002-06-18 04:14:40 +00:00
parent 1fe905fee4
commit 8ebfe3f788
2 changed files with 14 additions and 1 deletions

View file

@ -17,6 +17,17 @@ use WebGUI::HTMLForm;
use WebGUI::Session;
use WebGUI::SQL;
#-------------------------------------------------------------------
sub countPositions {
my ($template, $i);
($template) = WebGUI::SQL->quickArray("select template from template where templateId=".$_[0]);
$i = 0;
while ($template =~ m/\^$i\;/) {
$i++;
}
return $i;
}
#-------------------------------------------------------------------
sub generate {
my ($output, $content, %template);
@ -36,7 +47,7 @@ sub getList {
#-------------------------------------------------------------------
sub getPositions {
my ($cmd, %hash, $template, $i);
my (%hash, $template, $i);
tie %hash, "Tie::IxHash";
($template) = WebGUI::SQL->quickArray("select template from template where templateId=".$_[0]);
$i = 0;