diff --git a/docs/changelog/7.x.x.txt b/docs/changelog/7.x.x.txt index e0e6ac286..6a8b7b31d 100644 --- a/docs/changelog/7.x.x.txt +++ b/docs/changelog/7.x.x.txt @@ -1,13 +1,20 @@ 7.0.6 -- fix: Error in DateTime.pm -- Added a cookieTTL parameter to the config file which lets you set an optional expiration time of the webgui session cookie -- RFE: By default, search results need to match ALL keywords (Len Kranendonk / www.ilance.nl) -- fix: adding in groupdelete macro -- fix: semicolons missing -- fix: Typo in WebGUI/Form/Date.pm -- fix: snytax error in wobject skeleton -- fix: potential problem with posts if getThread->parent is not defined -- fix: macro_env semicolonmissing again!!!! + - fix: Error in DateTime.pm + - Added a cookieTTL parameter to the config file which lets you set an optional expiration time of the webgui session cookie + - RFE: By default, search results need to match ALL keywords (Len Kranendonk / www.ilance.nl) + - fix: page redirect problem + - fix: adding in groupdelete macro + - fix: semicolons missing + - fix: Typo in WebGUI/Form/Date.pm + - fix: snytax error in wobject skeleton + - fix: potential problem with posts if getThread->parent is not defined + - fix: macro_env semicolonmissing again!!!! + - Made some changes to make WebGUI compatible with the WRE for Windows. + - fix: cacheTimeout not respected as Visitor (Eric Kennedy). + - fix: Email address with just one character in the user part not accepted + - fix: Image (file) added to page shows before committing changes + - fix: Typo in fileImport.pl at line 265 (zxp) + 7.0.5 - Added a --skipDelete option to upgrade.pl diff --git a/lib/WebGUI/Asset/FilePile.pm b/lib/WebGUI/Asset/FilePile.pm index ef4c2183c..d304a3159 100644 --- a/lib/WebGUI/Asset/FilePile.pm +++ b/lib/WebGUI/Asset/FilePile.pm @@ -167,7 +167,6 @@ sub editSave { delete $newAsset->{_storageLocation}; $newAsset->setSize($storage->getFileSize($filename)); $newAsset->generateThumbnail if ($selfName eq "WebGUI::Asset::File::Image"); - $newAsset->commit; } $tempStorage->delete; return $self->getParent->www_manageAssets if ($self->session->form->process("proceed") eq "manageAssets"); diff --git a/lib/WebGUI/Asset/Redirect.pm b/lib/WebGUI/Asset/Redirect.pm index 1b4b2aae0..0464e788f 100644 --- a/lib/WebGUI/Asset/Redirect.pm +++ b/lib/WebGUI/Asset/Redirect.pm @@ -113,7 +113,7 @@ sub www_view { } unless ($url eq $self->get("url")) { $self->session->http->setRedirect($url); - return ""; + return 1; } return $i18n->get('self_referential'); } diff --git a/lib/WebGUI/Asset/Wobject/Layout.pm b/lib/WebGUI/Asset/Wobject/Layout.pm index ae361476d..63d9f1403 100644 --- a/lib/WebGUI/Asset/Wobject/Layout.pm +++ b/lib/WebGUI/Asset/Wobject/Layout.pm @@ -269,7 +269,7 @@ sub www_setContentPositions { sub www_view { my $self = shift; # slashdot / burst protection hack - if ($self->session->var->get("userId") eq "1" && $self->session->form->param("func") eq "" && $self->session->form->param("op") eq "") { + if ($self->session->var->get("userId") eq "1" && $self->session->form->param() == 0) { my $check = $self->checkView; return $check if (defined $check); my $cache = WebGUI::Cache->new($self->session, "view_".$self->getId); diff --git a/lib/WebGUI/Form/Email.pm b/lib/WebGUI/Form/Email.pm index d25e75d81..544e4f2a8 100644 --- a/lib/WebGUI/Form/Email.pm +++ b/lib/WebGUI/Form/Email.pm @@ -79,8 +79,7 @@ Returns a validated email address. If the result does not pass validation, it re sub getValueFromPost { my $self = shift; my $value = $self->session->form->param($self->get("name")); - - if ($value =~ /^([A-Z0-9]+[._+-]?){1,}([A-Z0-9]+[_+-]?)+\@(([A-Z0-9]+[._-]?){1,}[A-Z0-9]+\.){1,}[A-Z]{2,4}$/i) { + if ($value =~ /^([0-9a-zA-Z]([-.\w]*[0-9a-zA-Z])*@([0-9a-zA-Z][-\w]*[0-9a-zA-Z]\.)+[a-zA-Z]{2,9})$/i) { return $value; } return undef; diff --git a/sbin/fileImport.pl b/sbin/fileImport.pl index eaecde51d..08893f95b 100644 --- a/sbin/fileImport.pl +++ b/sbin/fileImport.pl @@ -262,7 +262,7 @@ sub addFiles { #----------------------------------------- sub setPrivileges { print "Setting filesystem privileges.\n" unless ($quiet); - if ($session->os->get("type") = "Linuxish") { + if ($session->os->get("type") eq "Linuxish") { unless (system("chown -R ".$webUser." ".$session->config->get("uploadsPath"))) { print "Privileges set.\n" unless ($quiet); } else { diff --git a/t/Config.t b/t/Config.t index 042ebfcc2..cda573842 100644 --- a/t/Config.t +++ b/t/Config.t @@ -13,7 +13,7 @@ use strict; use lib "$FindBin::Bin/lib"; use WebGUI::Test; -use Test::More tests => 12; # increment this value for each test you create +use Test::More tests => 13; # increment this value for each test you create my $config = WebGUI::Test->config; my $configFile = WebGUI::Test->file; @@ -51,4 +51,9 @@ foreach my $macro (keys %{$config->get("macros")}) { $found = 1 if ($macro eq "TEST"); } ok(!$found, "deleteFromHash()"); - +my $cookieName = $config->get("cookieName"); +if ($cookieName eq "") { + is($config->getCookieName,"wgSession", "getCookieName()"); +} else { + is($config->getCookieName,$cookieName, "getCookieName()"); +}