Merge remote branch 'upstream/WebGUI8' into 8-merge

Conflicts:
	docs/gotcha.txt
	docs/previousVersion.sql
	lib/WebGUI/Asset/Wobject/GalleryAlbum.pm
	lib/WebGUI/Asset/Wobject/Navigation.pm
	lib/WebGUI/AssetLineage.pm
	lib/WebGUI/Config.pm
	lib/WebGUI/Form/Template.pm
	lib/WebGUI/Group.pm
	lib/WebGUI/VersionTag.pm
	lib/WebGUI/Workflow/Activity/TrashExpiredEvents.pm
	t/AdSpace.t
	t/Asset/AssetExportHtml.t
	t/Asset/AssetLineage.t
	t/Asset/Story.t
	t/Asset/Template/HTMLTemplateExpr.t
	t/Asset/Wobject/Gallery/00base.t
	t/Asset/Wobject/GalleryAlbum/00base.t
	t/Asset/Wobject/GalleryAlbum/ajax.t
	t/Asset/Wobject/InOutBoard.t
	t/Asset/Wobject/StoryArchive.t
	t/Asset/Wobject/Survey/ExpressionEngine.t
	t/Asset/Wobject/Survey/Reports.t
	t/AssetAspect/RssFeed.t
	t/Auth/mech.t
	t/Group.t
	t/Mail/Send.t
	t/Operation/AdSpace.t
	t/Session/ErrorHandler.t
	t/Session/Scratch.t
	t/Session/Url.t
	t/Shop/Cart.t
	t/Shop/Pay.t
	t/Shop/Ship.t
	t/Shop/ShipDriver.t
	t/Shop/TaxDriver/Generic.t
	t/Shop/Vendor.t
	t/VersionTag.t
	t/lib/WebGUI/Test.pm
This commit is contained in:
Doug Bell 2010-07-14 18:20:00 -05:00
commit 708b47d73c
165 changed files with 3199 additions and 5718 deletions

View file

@ -211,8 +211,9 @@ sub appendTemplateVarsFileLoop {
my $assetIds = shift;
my $session = $self->session;
for my $assetId (@$assetIds) {
my $asset = WebGUI::Asset->newById($session, $assetId);
ASSET: for my $assetId (@$assetIds) {
my $asset = eval { WebGUI::Asset->newById($session, $assetId); };
next ASSET if Exception::Class->caught();
# Set the parent
$asset->{_parent} = $self;
push @{$var->{file_loop}}, $asset->getTemplateVars;

View file

@ -310,7 +310,7 @@ sub view {
return $self->processTemplate({},$self->templateId)
unless ($proxiedUrl ne "");
my $requestMethod = $self->session->env->get("REQUEST_METHOD") || "GET";
my $requestMethod = $self->session->request->method || "GET";
### Do we have cached content to get?
my $cache = $self->session->cache;
@ -328,7 +328,7 @@ sub view {
REDIRECT: for my $redirect (0..4) { # We follow max 5 redirects to prevent bouncing/flapping
my $userAgent = new LWP::UserAgent;
$userAgent->agent($self->session->env->get("HTTP_USER_AGENT"));
$userAgent->agent($self->session->request->user_agent);
$userAgent->timeout($self->timeout);
$userAgent->env_proxy;

View file

@ -203,7 +203,7 @@ sub _hasVoted {
my $self = shift;
my ($hasVoted) = $self->session->db->quickArray("select count(*) from Poll_answer
where assetId=".$self->session->db->quote($self->getId)." and ((userId=".$self->session->db->quote($self->session->user->userId)."
and userId<>'1') or (userId=".$self->session->db->quote($self->session->user->userId)." and ipAddress='".$self->session->env->getIp."'))");
and userId<>'1') or (userId=".$self->session->db->quote($self->session->user->userId)." and ipAddress='".$self->session->request->address."'))");
return $hasVoted;
}
@ -545,7 +545,7 @@ sub www_vote {
my $self = shift;
my $u;
if ($self->session->form->process("answer") ne "" && $self->session->user->isInGroup($self->get("voteGroup")) && !($self->_hasVoted())) {
$self->setVote($self->session->form->process("answer"),$self->session->user->userId,$self->session->env->getIp);
$self->setVote($self->session->form->process("answer"),$self->session->user->userId,$self->session->request->address);
if ($self->session->setting->get("useKarma")) {
$self->session->user->karma($self->get("karmaPerVote"),"Poll (".$self->getId.")","Voted on this poll.");
}

View file

@ -1044,7 +1044,7 @@ sub www_drawGanttChart {
}
#Adjust top for MSIE
my $isMSIE = ($session->env->get("HTTP_USER_AGENT") =~ /msie/i);
my $isMSIE = ($session->env->request->user_agent =~ /msie/i);
my $divTop = $isMSIE ? 45 : 45;
#Start at 45 px and add 20px as the start of the new task
#Set the propert mutiplier

View file

@ -2045,7 +2045,7 @@ sub responseId {
my $ignoreRevisionDate = $opts{ignoreRevisionDate};
my $user = WebGUI::User->new( $self->session, $userId );
my $ip = $self->session->env->getIp;
my $ip = $self->session->request->address;
my $responseId = $self->{responseId};
return $responseId if $responseId;
@ -2178,7 +2178,7 @@ sub canTakeSurvey {
}
my $maxResponsesPerUser = $self->maxResponsesPerUser;
my $ip = $self->session->env->getIp;
my $ip = $self->session->request->address;
my $userId = $self->session->user->userId();
my $takenCount = 0;

View file

@ -565,7 +565,7 @@ sub editThingDataSave {
if ($thingDataId eq "new"){
$thingData{dateCreated} = time();
$thingData{createdById} = $session->user->userId;
$thingData{ipAddress} = $session->env->getIp;
$thingData{ipAddress} = $session->request->address;
}
else {
%thingData = $session->db->quickHash("select * from ".$session->db->dbh->quote_identifier("Thingy_".$thingId)