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:
parent
1fe905fee4
commit
8ebfe3f788
2 changed files with 14 additions and 1 deletions
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue