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:41 +00:00
parent 8ebfe3f788
commit 5149560979

View file

@ -232,7 +232,7 @@ sub www_editPageSave {
synopsis=".quote($session{form}{synopsis})."
where pageId=$session{form}{pageId}");
WebGUI::SQL->write("update wobject set templatePosition=0 where pageId=$session{form}{pageId}
and templatePosition>".(WebGUI::Template::countPositions($session{form}{templateId})-1));
and templatePosition=".WebGUI::Template::countPositions($session{form}{templateId}));
_recursivelyChangeStyle($session{page}{pageId}) if ($session{form}{recurseStyle});
_recursivelyChangePrivileges($session{page}{pageId}) if ($session{form}{recursePrivs});
WebGUI::Session::refreshPageInfo($session{page}{pageId}) if ($session{form}{pageId} == $session{page}{pageId});