- 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)
This commit is contained in:
JT Smith 2006-08-16 21:25:27 +00:00
parent da1b2d3581
commit 80ef5e925a
7 changed files with 27 additions and 17 deletions

View file

@ -1,13 +1,20 @@
7.0.6 7.0.6
- fix: Error in DateTime.pm - 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 - 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) - RFE: By default, search results need to match ALL keywords (Len Kranendonk / www.ilance.nl)
- fix: adding in groupdelete macro - fix: page redirect problem
- fix: semicolons missing - fix: adding in groupdelete macro
- fix: Typo in WebGUI/Form/Date.pm - fix: semicolons missing
- fix: snytax error in wobject skeleton - fix: Typo in WebGUI/Form/Date.pm
- fix: potential problem with posts if getThread->parent is not defined - fix: snytax error in wobject skeleton
- fix: macro_env semicolonmissing again!!!! - 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 7.0.5
- Added a --skipDelete option to upgrade.pl - Added a --skipDelete option to upgrade.pl

View file

@ -167,7 +167,6 @@ sub editSave {
delete $newAsset->{_storageLocation}; delete $newAsset->{_storageLocation};
$newAsset->setSize($storage->getFileSize($filename)); $newAsset->setSize($storage->getFileSize($filename));
$newAsset->generateThumbnail if ($selfName eq "WebGUI::Asset::File::Image"); $newAsset->generateThumbnail if ($selfName eq "WebGUI::Asset::File::Image");
$newAsset->commit;
} }
$tempStorage->delete; $tempStorage->delete;
return $self->getParent->www_manageAssets if ($self->session->form->process("proceed") eq "manageAssets"); return $self->getParent->www_manageAssets if ($self->session->form->process("proceed") eq "manageAssets");

View file

@ -113,7 +113,7 @@ sub www_view {
} }
unless ($url eq $self->get("url")) { unless ($url eq $self->get("url")) {
$self->session->http->setRedirect($url); $self->session->http->setRedirect($url);
return ""; return 1;
} }
return $i18n->get('self_referential'); return $i18n->get('self_referential');
} }

View file

@ -269,7 +269,7 @@ sub www_setContentPositions {
sub www_view { sub www_view {
my $self = shift; my $self = shift;
# slashdot / burst protection hack # 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; my $check = $self->checkView;
return $check if (defined $check); return $check if (defined $check);
my $cache = WebGUI::Cache->new($self->session, "view_".$self->getId); my $cache = WebGUI::Cache->new($self->session, "view_".$self->getId);

View file

@ -79,8 +79,7 @@ Returns a validated email address. If the result does not pass validation, it re
sub getValueFromPost { sub getValueFromPost {
my $self = shift; my $self = shift;
my $value = $self->session->form->param($self->get("name")); my $value = $self->session->form->param($self->get("name"));
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) {
if ($value =~ /^([A-Z0-9]+[._+-]?){1,}([A-Z0-9]+[_+-]?)+\@(([A-Z0-9]+[._-]?){1,}[A-Z0-9]+\.){1,}[A-Z]{2,4}$/i) {
return $value; return $value;
} }
return undef; return undef;

View file

@ -262,7 +262,7 @@ sub addFiles {
#----------------------------------------- #-----------------------------------------
sub setPrivileges { sub setPrivileges {
print "Setting filesystem privileges.\n" unless ($quiet); 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"))) { unless (system("chown -R ".$webUser." ".$session->config->get("uploadsPath"))) {
print "Privileges set.\n" unless ($quiet); print "Privileges set.\n" unless ($quiet);
} else { } else {

View file

@ -13,7 +13,7 @@ use strict;
use lib "$FindBin::Bin/lib"; use lib "$FindBin::Bin/lib";
use WebGUI::Test; 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 $config = WebGUI::Test->config;
my $configFile = WebGUI::Test->file; my $configFile = WebGUI::Test->file;
@ -51,4 +51,9 @@ foreach my $macro (keys %{$config->get("macros")}) {
$found = 1 if ($macro eq "TEST"); $found = 1 if ($macro eq "TEST");
} }
ok(!$found, "deleteFromHash()"); ok(!$found, "deleteFromHash()");
my $cookieName = $config->get("cookieName");
if ($cookieName eq "") {
is($config->getCookieName,"wgSession", "getCookieName()");
} else {
is($config->getCookieName,$cookieName, "getCookieName()");
}