From 85f8ef7f434d0f6f59a4c51f1af2e646e01732cd Mon Sep 17 00:00:00 2001 From: JT Smith Date: Wed, 13 Jul 2005 02:10:16 +0000 Subject: [PATCH] merging some of the 6.6.4 changes --- docs/changelog/6.x.x.txt | 1 + docs/gotcha.txt | 5 +++++ docs/upgrades/upgrade_6.6.1-6.6.2.pl | 21 --------------------- lib/WebGUI/Asset.pm | 2 +- lib/WebGUI/Asset/Wobject/Layout.pm | 2 +- lib/WebGUI/Session.pm | 4 ++-- lib/WebGUI/URL.pm | 9 +++++++-- sbin/uploadsAccessHandler.perl | 28 +++++++++++++++++++++------- 8 files changed, 38 insertions(+), 34 deletions(-) delete mode 100644 docs/upgrades/upgrade_6.6.1-6.6.2.pl diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index cbd87b1b8..0ca5751cd 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -1,4 +1,5 @@ 6.7.0 + - fix [ 1229042 ] crumbtrail should show full path... - Added asset versioning. - fix [ 1229188 ] typo in Help: Collaboration, Post List Template Variables - fix [ 1221284 ] Operation\user.pm i18n {internationalize labels} diff --git a/docs/gotcha.txt b/docs/gotcha.txt index 91bd3592b..0ab858620 100644 --- a/docs/gotcha.txt +++ b/docs/gotcha.txt @@ -86,6 +86,11 @@ save you many hours of grief. 6.3.0 -------------------------------------------------------------------- + * After upgrading your site you'll have to reset the privileges on + your uploads folder to make sure that the web server has + the privileges it needs to write due to a large number of + changes on the filesystem. + * In order to upgrade to 6.3.0 or beyond you need to have already already upgraded to 6.2.0 or above. The upgrades will fail if you try to jump from any 6.1 (or prior) version directly to diff --git a/docs/upgrades/upgrade_6.6.1-6.6.2.pl b/docs/upgrades/upgrade_6.6.1-6.6.2.pl deleted file mode 100644 index 87f33692c..000000000 --- a/docs/upgrades/upgrade_6.6.1-6.6.2.pl +++ /dev/null @@ -1,21 +0,0 @@ -#!/usr/bin/perl - -use lib "../../lib"; -use Getopt::Long; -use strict; -use WebGUI::Session; - -my $configFile; -my $quiet; - -GetOptions( - 'configFile=s'=>\$configFile, - 'quiet'=>\$quiet -); - -WebGUI::Session::open("../..",$configFile); - - -WebGUI::Session::close(); - - diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index 1fd3f1946..b141dd6e1 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -958,7 +958,7 @@ Creates and returns a tabform to edit parameters of an Asset. sub getEditForm { my $self = shift; - my $tabform = WebGUI::TabForm->new(undef,undef,$self->getContainer->getUrl()); + my $tabform = WebGUI::TabForm->new(undef,undef,$self->getUrl()); $tabform->hidden({ name=>"func", value=>"editSave" diff --git a/lib/WebGUI/Asset/Wobject/Layout.pm b/lib/WebGUI/Asset/Wobject/Layout.pm index ed2f89c82..c7d7c794b 100644 --- a/lib/WebGUI/Asset/Wobject/Layout.pm +++ b/lib/WebGUI/Asset/Wobject/Layout.pm @@ -191,7 +191,7 @@ sub view { } # deal with unplaced children foreach my $child (@{$children}) { - unless (isIn($child->getId, @found)) { + unless (isIn($child->getId, @found)||isIn($child->getId,@hidden)) { push(@{$vars{"position1_loop"}},{ id=>$child->getId, content=>$child->view diff --git a/lib/WebGUI/Session.pm b/lib/WebGUI/Session.pm index ecd00fd86..fa8dd4e3d 100644 --- a/lib/WebGUI/Session.pm +++ b/lib/WebGUI/Session.pm @@ -194,8 +194,8 @@ sub convertVisitorToUser { if ($session{setting}{passiveProfilingEnabled}) { WebGUI::SQL->write("update passiveProfileLog set userId = ".quote($_[1])." where sessionId = ".quote($_[0])); } - undef $session{isInGroup}; # decache some performance enhancers because we're - undef $session{gotGroupsForUser}; # user ids. + delete $session{isInGroup}; # decache some performance enhancers because we're + delete $session{gotGroupsForUser}; # user ids. $session{var}{userId} = $_[1]; refreshUserInfo($_[1]); } diff --git a/lib/WebGUI/URL.pm b/lib/WebGUI/URL.pm index 6089c5836..f8680b4ee 100644 --- a/lib/WebGUI/URL.pm +++ b/lib/WebGUI/URL.pm @@ -263,8 +263,13 @@ sub page { $url = getSiteURL(); } $url .= getScriptURL(); - my $pathinfo = $session{env}{PATH_INFO}; - $pathinfo =~ s/^\/(.*)/$1/; + my $pathinfo; + if ($session{asset}) { + $pathinfo = $session{asset}->get("url"); + } else { + $pathinfo = $session{env}{PATH_INFO}; + $pathinfo =~ s/^\/(.*)/$1/; + } $url .= $pathinfo; if ($session{setting}{preventProxyCache} == 1 && !$skipPreventProxyCache) { $url = append($url,"noCache=".randint(0,1000).';'.time()); diff --git a/sbin/uploadsAccessHandler.perl b/sbin/uploadsAccessHandler.perl index f3ddb7690..82713a679 100644 --- a/sbin/uploadsAccessHandler.perl +++ b/sbin/uploadsAccessHandler.perl @@ -13,15 +13,18 @@ package WebGUI::UploadsAccessHandler; our $webguiRoot; BEGIN { - use Apache::ServerUtil; - my $s = Apache->server; + my $s; + if ($mod_perl::VERSION >= 1.999023) { + $s = Apache2::ServerUtil->server; + } else { + $s = Apache->server; + } $webguiRoot = $s->dir_config('WebguiRoot'); unshift (@INC, $webguiRoot."/lib"); } print "Starting WebGUI Uploads Access Handler\n"; -use Apache::RequestUtil; use strict; use CGI::Util qw/escape/; use WebGUI::Grouping; @@ -29,7 +32,18 @@ use WebGUI::Session; use WebGUI::URL; sub handler { - my $r = Apache->request; + my $r; + my $ok; + my $notfound; + if ($mod_perl::VERSION >= 1.999023) { + $r = Apache2::RequestUtil->request; + $ok = Apache2::Const::OK(); + $notfound = Apache2::Const::NOT_FOUND(); + } else { + $r = Apache->request; + $ok = Apache::OK(); + $notfound = Apache::NOT_FOUND(); + } if (-e $r->filename) { my $path = $r->filename; $path =~ s/^(\/.*\/).*$/$1/; @@ -47,14 +61,14 @@ sub handler { $cookie =~ s/wgSession\=(.*)/$1/; $cookie = WebGUI::URL::unescape($cookie); WebGUI::Session::refreshSessionVars($cookie); - return Apache::OK if ($session{user}{userId} eq $privs[0] || WebGUI::Grouping::isInGroup($privs[1]) || WebGUI::Grouping::isInGroup($privs[2])); + return $ok if ($session{user}{userId} eq $privs[0] || WebGUI::Grouping::isInGroup($privs[1]) || WebGUI::Grouping::isInGroup($privs[2])); WebGUI::Session::close(); return 401; } } - return Apache::OK; + return $ok; } else { - return Apache::NOT_FOUND; + return $notfound; } }