diff --git a/docs/gotcha.txt b/docs/gotcha.txt index 3dc27acfb..6bf6b810a 100644 --- a/docs/gotcha.txt +++ b/docs/gotcha.txt @@ -7,6 +7,15 @@ upgrading from one version to the next, or even between multiple versions. Be sure to heed the warnings contained herein as they will save you many hours of grief. +3.0.2 +-------------------------------------------------------------------- + * 3.0.2 was accidentally released with an internal version number + of 3.0.1. If you're having problems figuring out what + version you actually have, look at the definition of your + widget table. If you see a field with the name + "widgetType", then you're on 3.0.1. If you have a field + named "namespace", then you're on 3.0.2. + 3.0.1 -------------------------------------------------------------------- * The macro syntax of old has officially been removed. If you're diff --git a/docs/previousVersion.sql b/docs/previousVersion.sql index 8ffd62df6..7576a16f8 100644 --- a/docs/previousVersion.sql +++ b/docs/previousVersion.sql @@ -9,7 +9,7 @@ # CREATE TABLE Article ( - widgetId int(11) default NULL, + widgetId int(11) NOT NULL default '0', startDate int(11) default NULL, endDate int(11) default NULL, body mediumtext, @@ -17,7 +17,8 @@ CREATE TABLE Article ( linkTitle varchar(255) default NULL, linkURL text, attachment varchar(255) default NULL, - convertCarriageReturns int(11) NOT NULL default '0' + convertCarriageReturns int(11) NOT NULL default '0', + PRIMARY KEY (widgetId) ) TYPE=MyISAM; # @@ -113,10 +114,11 @@ CREATE TABLE FAQ_question ( # CREATE TABLE Item ( - widgetId int(11) default NULL, + widgetId int(11) NOT NULL default '0', description text, linkURL text, - attachment varchar(255) default NULL + attachment varchar(255) default NULL, + PRIMARY KEY (widgetId) ) TYPE=MyISAM; # @@ -166,10 +168,11 @@ CREATE TABLE LinkList_link ( # CREATE TABLE MessageBoard ( - widgetId int(11) default NULL, + widgetId int(11) NOT NULL default '0', groupToPost int(11) default NULL, messagesPerPage int(11) NOT NULL default '50', - editTimeout int(11) default NULL + editTimeout int(11) default NULL, + PRIMARY KEY (widgetId) ) TYPE=MyISAM; # @@ -2375,6 +2378,7 @@ INSERT INTO international VALUES (36,'UserSubmission','English','Delete file.'); INSERT INTO international VALUES (378,'WebGUI','English','User ID'); INSERT INTO international VALUES (379,'WebGUI','English','Group ID'); INSERT INTO international VALUES (380,'WebGUI','English','Style ID'); +INSERT INTO international VALUES (381,'WebGUI','English','WebGUI received a malformed request and was unable to continue. Proprietary characters being passed through a form typically cause this. Please feel free to hit your back button and try again.'); # # Table structure for table 'messageLog' @@ -2631,7 +2635,7 @@ INSERT INTO users VALUES (25,'Reserved','No Login',NULL,'WebGUI',NULL,NULL,'Engl CREATE TABLE widget ( widgetId int(11) NOT NULL default '0', pageId int(11) default NULL, - widgetType varchar(35) default NULL, + namespace varchar(35) default NULL, sequenceNumber int(11) NOT NULL default '1', title varchar(255) default NULL, displayTitle int(11) NOT NULL default '1', diff --git a/docs/upgrades/upgrade_3.0.2-3.0.3.sql b/docs/upgrades/upgrade_3.0.2-3.0.3.sql new file mode 100644 index 000000000..e69de29bb diff --git a/lib/WebGUI.pm b/lib/WebGUI.pm index 9a22896fc..9e0d0b8cf 100644 --- a/lib/WebGUI.pm +++ b/lib/WebGUI.pm @@ -1,5 +1,5 @@ package WebGUI; -our $VERSION = "3.0.1"; +our $VERSION = "3.0.3"; #------------------------------------------------------------------- # WebGUI is Copyright 2001-2002 Plain Black Software. diff --git a/lib/WebGUI/Operation/Account.pm b/lib/WebGUI/Operation/Account.pm index 63c42b4fd..fd3220239 100644 --- a/lib/WebGUI/Operation/Account.pm +++ b/lib/WebGUI/Operation/Account.pm @@ -491,7 +491,7 @@ sub www_viewMessageLog { if ($data[2] ne "") { $row[$i] .= ''; } - $row[$i] .= ''.epochToHuman($data[3],"%m/%d/%Y").''; + $row[$i] .= ''.epochToHuman($data[3],"%m/%d/%Y @ %H:%m%p").''; $i++; } $sth->finish; diff --git a/lib/WebGUI/Operation/User.pm b/lib/WebGUI/Operation/User.pm index 83b67d7b8..f1ce7b44b 100644 --- a/lib/WebGUI/Operation/User.pm +++ b/lib/WebGUI/Operation/User.pm @@ -266,7 +266,7 @@ sub www_editUserSave { my ($error, $uid, $encryptedPassword, $passwordStatement); if (WebGUI::Privilege::isInGroup(3)) { ($uid) = WebGUI::SQL->quickArray("select userId from users where username='$session{form}{username}'"); - unless ($uid) { + if ($uid == $session{form}{uid} || $uid < 1) { if ($session{form}{identifier} ne "password") { $encryptedPassword = Digest::MD5::md5_base64($session{form}{identifier}); $passwordStatement = ', identifier='.quote($encryptedPassword); diff --git a/lib/WebGUI/Widget/Poll.pm b/lib/WebGUI/Widget/Poll.pm index c8e3ea27a..b8915b8a3 100644 --- a/lib/WebGUI/Widget/Poll.pm +++ b/lib/WebGUI/Widget/Poll.pm @@ -233,9 +233,10 @@ sub www_view { #------------------------------------------------------------------- sub www_vote { - my ($voteGroup); + my ($voteGroup,$hasVoted); ($voteGroup) = WebGUI::SQL->quickArray("select voteGroup from Poll where widgetId='$session{form}{wid}'"); - if (WebGUI::Privilege::isInGroup($voteGroup,$session{user}{userId})) { + ($hasVoted) = WebGUI::SQL->quickArray("select count(*) from Poll_answer where widgetId=$session{form}{wid} and ((userId=$session{user}{userId} and userId<>1) or (userId=1 and ipAddress='$session{env}{REMOTE_ADDR}'))"); + if (WebGUI::Privilege::isInGroup($voteGroup,$session{user}{userId}) && !($hasVoted)) { WebGUI::SQL->write("insert into Poll_answer values ($session{form}{wid}, '$session{form}{answer}', $session{user}{userId}, '$session{env}{REMOTE_ADDR}')"); } return ""; diff --git a/lib/WebGUI/Widget/SiteMap.pm b/lib/WebGUI/Widget/SiteMap.pm index 7b5dc5fd0..6239eeb79 100644 --- a/lib/WebGUI/Widget/SiteMap.pm +++ b/lib/WebGUI/Widget/SiteMap.pm @@ -91,7 +91,7 @@ sub www_add { $output .= tableFormRow(WebGUI::International::get(4,$namespace),WebGUI::Form::text("depth",20,2,0)); $output .= tableFormRow(WebGUI::International::get(6,$namespace),WebGUI::Form::text("indent",20,2,5)); $output .= tableFormRow(WebGUI::International::get(7,$namespace),WebGUI::Form::text("bullet",20,30,'·')); - $output .= tableFormRow(WebGUI::International::get(8,$namespace),WebGUI::Form::text("bullet",20,1,1)); + $output .= tableFormRow(WebGUI::International::get(8,$namespace),WebGUI::Form::text("lineSpacing",20,1,1)); $output .= formSave(); $output .= ''; return $output;