diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 9dab2667b..c8ba7d1e8 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -6,6 +6,9 @@ - Fixed a version check problem in Syndicated Content wobject. - Fixed some GUID problems in the scheduler plug-ins. - Fixed some epoch bugs in the scheduler plug-ins. + - Updated scheduler plug-ins to use the new page tree the way they're + supposed to. + - Fixed some POD errors. 6.2.0 diff --git a/docs/create.sql b/docs/create.sql index e7e04a89a..61202102e 100644 --- a/docs/create.sql +++ b/docs/create.sql @@ -3093,7 +3093,7 @@ CREATE TABLE webguiVersion ( -- -INSERT INTO webguiVersion VALUES ('6.2.0','initial install',unix_timestamp()); +INSERT INTO webguiVersion VALUES ('6.2.1','initial install',unix_timestamp()); -- -- Table structure for table `wobject` diff --git a/lib/WebGUI/HTML.pm b/lib/WebGUI/HTML.pm index a95a687ee..cb3a35dcd 100644 --- a/lib/WebGUI/HTML.pm +++ b/lib/WebGUI/HTML.pm @@ -249,6 +249,7 @@ The html to be made absolute. =item baseURL The base URL to use. Defaults to current page's url. + =back =cut diff --git a/lib/WebGUI/MetaData.pm b/lib/WebGUI/MetaData.pm index fffd59e89..b19625845 100644 --- a/lib/WebGUI/MetaData.pm +++ b/lib/WebGUI/MetaData.pm @@ -104,6 +104,7 @@ The fieldId for which you want to retrieve field properties. If specified, the method will not only get the field properties, but the value for this wobjectId as well. + =back =cut diff --git a/lib/WebGUI/PassiveProfiling.pm b/lib/WebGUI/PassiveProfiling.pm index 45ed7715f..cd84e0146 100644 --- a/lib/WebGUI/PassiveProfiling.pm +++ b/lib/WebGUI/PassiveProfiling.pm @@ -104,6 +104,8 @@ sub addPage { Summarizes passive profile log data using the metadata attributes. An entry is logged in the passiveProfileAOI table. +=over + =item hashRef A hashRef with userId and wobjectId. diff --git a/sbin/Hourly/DeleteExpiredClipboard.pm b/sbin/Hourly/DeleteExpiredClipboard.pm index 14b100d72..e792766c9 100644 --- a/sbin/Hourly/DeleteExpiredClipboard.pm +++ b/sbin/Hourly/DeleteExpiredClipboard.pm @@ -13,6 +13,7 @@ package Hourly::DeleteExpiredClipboard; use strict; use WebGUI::DateTime; +use WebGUI::Page; use WebGUI::Session; use WebGUI::SQL; @@ -20,12 +21,13 @@ use WebGUI::SQL; sub process { if ($session{config}{DeleteExpiredClipboard_offset} ne "") { my $expireDate = (time()-(86400*$session{config}{DeleteExpiredClipboard_offset})); - WebGUI::ErrorHandler::audit("moving expired clipboard items to trash"); - - WebGUI::SQL->write("update page set parentId=3, bufferPrevId=2, bufferDate=" .WebGUI::DateTime::time() - ." where parentId=2 and bufferDate < ". $expireDate ); - + my $sth = WebGUI::SQL->read("select pageId from page where parentId=2 and bufferDate <".$expireDate); + while (my ($pageId) = $sth->array) { + my $page = WebGUI::Page->new($pageId); + $page->delete; + } + $sth->finish; WebGUI::SQL->write("update wobject set pageId=3, bufferPrevId=2, bufferDate=" .WebGUI::DateTime::time() ." where pageId=2 and bufferDate < ". $expireDate ); } diff --git a/sbin/Hourly/DeleteExpiredTrash.pm b/sbin/Hourly/DeleteExpiredTrash.pm index 0377b6830..c9afab2c7 100644 --- a/sbin/Hourly/DeleteExpiredTrash.pm +++ b/sbin/Hourly/DeleteExpiredTrash.pm @@ -13,6 +13,7 @@ package Hourly::DeleteExpiredTrash; use strict; use WebGUI::DateTime; +use WebGUI::Page; use WebGUI::Session; use WebGUI::SQL; @@ -44,7 +45,8 @@ sub process { WebGUI::ErrorHandler::audit("purging expired page ". $pageId ." from trash"); WebGUI::Operation::Trash::_recursePageTree($pageId); WebGUI::Operation::Trash::_purgeWobjects($pageId); - WebGUI::SQL->write("delete from page where pageId=".quote($pageId)); + my $page = WebGUI::Page->new($pageId); + $page->purge; } $a->finish; } diff --git a/sbin/Hourly/TrashExpiredContent.pm b/sbin/Hourly/TrashExpiredContent.pm index 5b0a6e0d7..a657918af 100644 --- a/sbin/Hourly/TrashExpiredContent.pm +++ b/sbin/Hourly/TrashExpiredContent.pm @@ -12,6 +12,7 @@ package Hourly::TrashExpiredContent; use strict; use WebGUI::DateTime; +use WebGUI::Page; use WebGUI::Session; use WebGUI::SQL; @@ -20,7 +21,12 @@ sub process { my $offset = $session{config}{TrashExpiredContent_offset}; if ($offset ne "") { my $epoch = time()-(86400*$offset); - WebGUI::SQL->write("update page set parentId=3, endDate=endDate+31536000 where endDate<".$epoch); + my $sth = WebGUI::SQL->read("select pageId from page where endDate<".$epoch); + while (my ($pageId) = $sth->array) { + my $page = WebGUI::Page->new($pageId); + $page->delete; + } + $sth->finish; WebGUI::SQL->write("update wobject set pageId=3, endDate=endDate+31536000 where endDate<".$epoch); } }