Fixed a bug where when creating a new root, everything goes haywire.
This commit is contained in:
parent
7b0f03c998
commit
cc70ba7acd
1 changed files with 5 additions and 1 deletions
|
|
@ -211,7 +211,11 @@ sub www_editPage {
|
||||||
if (WebGUI::Privilege::canEditPage($session{form}{npp})) {
|
if (WebGUI::Privilege::canEditPage($session{form}{npp})) {
|
||||||
$f = WebGUI::HTMLForm->new;
|
$f = WebGUI::HTMLForm->new;
|
||||||
if ($session{form}{npp} ne "") {
|
if ($session{form}{npp} ne "") {
|
||||||
%page = WebGUI::SQL->quickHash("select * from page where pageId=$session{form}{npp}");
|
my $buildFromPage = $session{form}{npp};
|
||||||
|
if ($buildFromPage == 0) {
|
||||||
|
$buildFromPage = $session{setting}{defaultPage};
|
||||||
|
}
|
||||||
|
%page = WebGUI::SQL->quickHash("select * from page where pageId=$buildFromPage");
|
||||||
$page{templateId} = 1;
|
$page{templateId} = 1;
|
||||||
$page{pageId} = "new";
|
$page{pageId} = "new";
|
||||||
$page{title} = $page{menuTitle} = $page{urlizedTitle} = $page{synopsis} = '';
|
$page{title} = $page{menuTitle} = $page{urlizedTitle} = $page{synopsis} = '';
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue