From e305e8ca07b528a9d31cd04f701a7ed415a951f5 Mon Sep 17 00:00:00 2001 From: JT Smith Date: Wed, 28 Aug 2002 02:16:09 +0000 Subject: [PATCH] Bug fixes for 4.6.5 --- docs/create.sql | 2 +- docs/previousVersion.sql | 8 +++++++- docs/upgrades/upgrade_4.6.4-4.6.5.sql | 8 ++++++++ lib/WebGUI.pm | 2 +- lib/WebGUI/Operation/Page.pm | 28 ++++++++++++++------------- lib/WebGUI/Wobject/UserSubmission.pm | 7 ++----- 6 files changed, 34 insertions(+), 21 deletions(-) create mode 100644 docs/upgrades/upgrade_4.6.4-4.6.5.sql diff --git a/docs/create.sql b/docs/create.sql index 10e52b31c..627ec477a 100644 --- a/docs/create.sql +++ b/docs/create.sql @@ -6937,7 +6937,7 @@ CREATE TABLE webguiVersion ( -- -INSERT INTO webguiVersion VALUES ('4.6.4','initial install',unix_timestamp()); +INSERT INTO webguiVersion VALUES ('4.6.5','initial install',unix_timestamp()); -- -- Table structure for table 'wobject' diff --git a/docs/previousVersion.sql b/docs/previousVersion.sql index e9f9212c0..10e52b31c 100644 --- a/docs/previousVersion.sql +++ b/docs/previousVersion.sql @@ -6937,7 +6937,7 @@ CREATE TABLE webguiVersion ( -- -INSERT INTO webguiVersion VALUES ('4.6.3','initial install',unix_timestamp()); +INSERT INTO webguiVersion VALUES ('4.6.4','initial install',unix_timestamp()); -- -- Table structure for table 'wobject' @@ -6975,3 +6975,9 @@ CREATE TABLE wobject ( INSERT INTO wobject VALUES (-1,4,'SiteMap',0,'Page Not Found',1,'The page you were looking for could not be found on this system. Perhaps it has been deleted or renamed. The following list is a site map of this site. If you don\'t find what you\'re looking for on the site map, you can always start from the Home Page.',1,1001744792,3,1016077239,3,0,1001744792,1336444487,2,3600,4,0,'after'); INSERT INTO wobject VALUES (-2,1,'Article',1,'Welcome to WebGUI!',1,'
\r\n

If you’re reading this message it means that you’ve got WebGUI up and running. Good job! The installation is not trivial.

\r\n

 

\r\n

In order to do anything useful with your new installation you’ll need to log in as the default administrator account. Follow these steps to get started:

\r\n

 

\r\n
    \r\n
  1. Click here to log in. (username: Admin password: 123qwe) \r\n
  2. Click here to turn the administrative interface on.
\r\n

 Now that you’re in as the administrator, you should change your password so no one else can log in and mess with your site. You might also want to create another account for yourself with Administrative privileges in case you can\'t log in with the Admin account for some reason.

\r\n

 

\r\n

You’ll notice three menus at the top of your screen. Those are your administrative menus. Going from left to right they are Content, Clipboard, and Admin. The content menu allows you to add new pages and content to your site. The clipboard menu is currently empty, but if you cut or copy anything from any of your pages, it will end up there. The admin menu controls things like system settings and users.

\r\n

 

\r\n

For more information about how to administer WebGUI consider getting a copy of Ruling WebGUI. Plain Black Software also provides several Support Programs for WebGUI if you run into trouble.

\r\n

 

Enjoy your new WebGUI site!\r\n
',1,1023555430,3,1023555630,3,0,1023512400,1338872400,2,3600,4,0,'after'); +alter table wobject add column userDefined1 varchar(255); +alter table wobject add column userDefined2 varchar(255); +alter table wobject add column userDefined3 varchar(255); +alter table wobject add column userDefined4 varchar(255); +alter table wobject add column userDefined5 varchar(255); + diff --git a/docs/upgrades/upgrade_4.6.4-4.6.5.sql b/docs/upgrades/upgrade_4.6.4-4.6.5.sql new file mode 100644 index 000000000..efbbb2221 --- /dev/null +++ b/docs/upgrades/upgrade_4.6.4-4.6.5.sql @@ -0,0 +1,8 @@ +insert into webguiVersion values ('4.6.5','upgrade',unix_timestamp()); + + + + + + + diff --git a/lib/WebGUI.pm b/lib/WebGUI.pm index d96c9f8f9..d5503e5ff 100644 --- a/lib/WebGUI.pm +++ b/lib/WebGUI.pm @@ -1,5 +1,5 @@ package WebGUI; -our $VERSION = "4.6.4"; +our $VERSION = "4.6.5"; #------------------------------------------------------------------- # WebGUI is Copyright 2001-2002 Plain Black LLC. diff --git a/lib/WebGUI/Operation/Page.pm b/lib/WebGUI/Operation/Page.pm index fc5f05538..4013b291f 100644 --- a/lib/WebGUI/Operation/Page.pm +++ b/lib/WebGUI/Operation/Page.pm @@ -75,20 +75,22 @@ sub _traversePageTree { } $a = WebGUI::SQL->read("select * from page where (pageId<2 or pageId>25) and parentId='$_[0]' order by sequenceNumber"); while (%page = $a->hash) { - $output .= $depth - .pageIcon() - .deleteIcon('op=deletePage',$page{urlizedTitle}) - .editIcon('op=editPage',$page{urlizedTitle}) - .' '.$page{title}.'
'; - $b = WebGUI::SQL->read("select * from wobject where pageId=$page{pageId}"); - while (%wobject = $b->hash) { - $output .= $depth.$spacer - .wobjectIcon() - .deleteIcon('func=delete&wid='.$wobject{wobjectId},$page{urlizedTitle}) - .editIcon('func=edit&wid='.$wobject{wobjectId},$page{urlizedTitle}) - .' '. $wobject{title}.'
'; + if (WebGUI::Privilege::canEditPage($page{pageId})) { + $output .= $depth + .pageIcon() + .deleteIcon('op=deletePage',$page{urlizedTitle}) + .editIcon('op=editPage',$page{urlizedTitle}) + .' '.$page{title}.'
'; + $b = WebGUI::SQL->read("select * from wobject where pageId=$page{pageId}"); + while (%wobject = $b->hash) { + $output .= $depth.$spacer + .wobjectIcon() + .deleteIcon('func=delete&wid='.$wobject{wobjectId},$page{urlizedTitle}) + .editIcon('func=edit&wid='.$wobject{wobjectId},$page{urlizedTitle}) + .' '. $wobject{title}.'
'; + } + $b->finish; } - $b->finish; $output .= _traversePageTree($page{pageId},$_[1]+1); } $a->finish; diff --git a/lib/WebGUI/Wobject/UserSubmission.pm b/lib/WebGUI/Wobject/UserSubmission.pm index 85ac10a47..d68b2eb89 100644 --- a/lib/WebGUI/Wobject/UserSubmission.pm +++ b/lib/WebGUI/Wobject/UserSubmission.pm @@ -434,9 +434,7 @@ sub www_editSubmission { $submission->{convertCarriageReturns} = 1; $submission->{userId} = $session{user}{userId}; } - if (WebGUI::Privilege::isInGroup($_[0]->get("groupToContribute")) - || $submission->{userId} == $session{user}{userId} - || WebGUI::Privilege::isInGroup($_[0]->get("groupToApprove"))) { + if (WebGUI::Privilege::isInGroup($_[0]->get("groupToContribute")) || $submission->{userId} == $session{user}{userId} || WebGUI::Privilege::isInGroup($_[0]->get("groupToApprove"))) { $output = '

'.WebGUI::International::get(19,$namespace).'

'; $f = WebGUI::HTMLForm->new; $f->hidden("wid",$session{form}{wid}); @@ -472,8 +470,7 @@ sub www_editSubmission { sub www_editSubmissionSave { my ($sqlAdd,$submission,$image,$attachment,$title,$u); $submission = $_[0]->getCollateral("UserSubmission_submission","submissionId",$session{form}{sid}); - if ($submission->{owner} == $session{user}{userId} || ($submission->{submissionId} eq "new" - && WebGUI::Privilege::isInGroup($_[0]->get("groupToContribute"))) || WebGUI::Privilege::isInGroup($_[0]->get("groupToApprove"))) { + if ($submission->{userId} == $session{user}{userId} || ($submission->{submissionId} eq "new" && WebGUI::Privilege::isInGroup($_[0]->get("groupToContribute"))) || WebGUI::Privilege::isInGroup($_[0]->get("groupToApprove"))) { if ($submission->{submissionId} eq "new") { $session{form}{sid} = getNextId("submissionId"); WebGUI::SQL->write("insert into UserSubmission_submission (wobjectId,submissionId,userId,username)