diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 8d3cb7a9c..e33c05614 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -12,6 +12,12 @@ - bugfix [ 1025755 ] UILevel can't be set to beginner (0) - bugfix [ 1006981 ] Syndicated Content doesn't show channel description (Don Ji). + - bugfix [ 996585 ] Fixed Package Add incompatibility w/new page tree in + 6.1.1 (OpenTech) + - bugfix [ 1024073 ] Problem with Collateral Management (ID?) + - bugfix [ 1023688 ] upgrade.pl from 6.03 - 6.10 using 6.2.1 beta + - bugfix [ 1024079 ] "Software error" message + 6.2.1 diff --git a/lib/Date/Manip.pm b/lib/Date/Manip.pm index 7f9e87e64..083063cbd 100644 --- a/lib/Date/Manip.pm +++ b/lib/Date/Manip.pm @@ -3455,6 +3455,7 @@ sub Date_TimeZone { } $in->close; } + push(@tz,"EST5EDT"); # if all else fails # Now parse each one to find the first valid one. foreach $tz (@tz) { diff --git a/lib/WebGUI/Operation/Collateral.pm b/lib/WebGUI/Operation/Collateral.pm index 838065b7a..740832a88 100644 --- a/lib/WebGUI/Operation/Collateral.pm +++ b/lib/WebGUI/Operation/Collateral.pm @@ -414,8 +414,8 @@ sub www_listCollateral { WebGUI::Session::setScratch("collateralPageNumber",$session{form}{pn}); WebGUI::Session::setScratch("collateralFolderId",$session{form}{fid}); $folderId = $session{scratch}{collateralFolderId} || 0; - $constraints = "collateralFolderId=".$folderId; - $constraints .= " and userId=$session{scratch}{collateralUser}" if ($session{scratch}{collateralUser}); + $constraints = "collateralFolderId=".quote($folderId); + $constraints .= " and userId=".quote($session{scratch}{collateralUser}) if ($session{scratch}{collateralUser}); $constraints .= " and collateralType=".quote($session{scratch}{collateralType}) if ($session{scratch}{collateralType}); $constraints .= " and name like ".quote('%'.$session{scratch}{keyword}.'%') if ($session{scratch}{keyword}); $p = WebGUI::Paginator->new(WebGUI::URL::page('op=listCollateral'),"",$session{scratch}{collateralPageNumber}); diff --git a/lib/WebGUI/Operation/Package.pm b/lib/WebGUI/Operation/Package.pm index 36d668d93..d9ad39c38 100644 --- a/lib/WebGUI/Operation/Package.pm +++ b/lib/WebGUI/Operation/Package.pm @@ -41,83 +41,43 @@ sub _duplicateWobjects { #------------------------------------------------------------------- sub _recursePageTree { - my ($a, %package, %newParent, $newPageId, $sequenceNumber, $urlizedTitle); + my ($a, %package, %newParent,$currentPage,$page); tie %newParent, 'Tie::CPHash'; tie %package, 'Tie::CPHash'; - %newParent = WebGUI::SQL->quickHash("select * from page where pageId=".quote($_[1])); + %newParent = WebGUI::SQL->quickHash("select * from page where pageId=$_[1]"); _duplicateWobjects($_[0],$_[1]); - ($sequenceNumber) = WebGUI::SQL->quickArray("select max(sequenceNumber) from page where parentId=".quote($_[1])); - $a = WebGUI::SQL->read("select * from page where parentId=".quote($_[0])." order by sequenceNumber"); + $a = WebGUI::SQL->read("select * from page where parentId=$_[0] order by sequenceNumber"); while (%package = $a->hash) { - $newPageId = WebGUI::Id::generate(); - $sequenceNumber++; - $urlizedTitle = WebGUI::Page::makeUnique($package{urlizedTitle}); - WebGUI::SQL->write("insert into page ( - pageId, - parentId, - title, - styleId, - ownerId, - groupIdView, - groupIdEdit, - sequenceNumber, - metaTags, - urlizedTitle, - defaultMetaTags, - menuTitle, - synopsis, - templateId, - startDate, - endDate, - redirectURL, - userDefined1, - userDefined2, - userDefined3, - userDefined4, - userDefined5, - hideFromNavigation, - newWindow, - encryptPage, - cacheTimeout, - cacheTimeoutVisitor, - printableStyleId, - wobjectPrivileges - ) values ( - $newPageId, - ".quote($_[1]).", - ".quote($package{title}).", - $newParent{styleId}, - $session{user}{userId}, - $newParent{groupIdView}, - $newParent{groupIdEdit}, - $sequenceNumber, - ".quote($package{metaTags}).", - ".quote($urlizedTitle).", - ".$package{defaultMetaTags}.", - ".quote($package{menuTitle}).", - ".quote($package{synopsis}).", - ".quote($package{templateId}).", - $newParent{startDate}, - $newParent{endDate}, - ".quote($newParent{redirectURL}).", - ".quote($newParent{userDefined1}).", - ".quote($newParent{userDefined2}).", - ".quote($newParent{userDefined3}).", - ".quote($newParent{userDefined4}).", - ".quote($newParent{userDefined5}).", - $package{hideFromNavigation}, - $package{newWindow}, - $package{encryptPage}, - $package{cacheTimeout}, - $package{cacheTimeoutVisitor}, - ".quote($package{printableStyleId}).", - $package{wobjectPrivileges} - )"); - _recursePageTree($package{pageId},$newPageId); + $currentPage = WebGUI::Page->getPage($_[1]); + $page = $currentPage->add; + $page->set({ + title => $package{title}, + styleId => $newParent{styleId}, + printableStyleId => $package{printableStyleId}, + ownerId => $session{user}{userId}, + groupIdView => $newParent{groupIdView}, + groupIdEdit => $newParent{groupIdEdit}, + newWindow => $package{newWindow}, + wobjectPrivileges => $package{wobjectPrivileges}, + hideFromNavigation => $package{hideFromNavigation}, + startDate => $newParent{startDate}, + endDate => $newParent{endDate}, + cacheTimeout => $package{cacheTimeout}, + cacheTimeoutVisitor => $package{cacheTimeoutVisitor}, + metaTags => $package{metaTags}, + urlizedTitle => WebGUI::Page::makeUnique($package{urlizedTitle}), + redirectURL => $newParent{redirectURL}, + defaultMetaTags => $package{defaultMetaTags}, + templateId => $package{templateId}, + menuTitle => $package{menuTitle}, + synopsis => $package{synopsis} + }); + _recursePageTree($package{pageId},$page->get('pageId')); } $a->finish; } + #------------------------------------------------------------------- sub www_deployPackage { if (WebGUI::Page::canEdit()) {