diff --git a/lib/WebGUI.pm b/lib/WebGUI.pm index 96221bef5..78fd26b7e 100644 --- a/lib/WebGUI.pm +++ b/lib/WebGUI.pm @@ -178,6 +178,8 @@ sub page { $output = "An error was encountered while processing your request."; } $output = "An error was encountered while processing your request." if $output eq ''; + } elsif ($output eq "chunked") { + $output = undef; } if ($session->errorHandler->canShowDebug()) { $output .= $session->errorHandler->showDebug(); diff --git a/lib/WebGUI/Asset.pm b/lib/WebGUI/Asset.pm index c2e6abcac..3397e57f6 100644 --- a/lib/WebGUI/Asset.pm +++ b/lib/WebGUI/Asset.pm @@ -28,8 +28,6 @@ use WebGUI::AdminConsole; use WebGUI::Cache; use WebGUI::Form; use WebGUI::HTMLForm; -use WebGUI::Search; -use WebGUI::Search::Index; use WebGUI::TabForm; use WebGUI::Utility; @@ -1421,7 +1419,7 @@ sub newByUrl { =head2 prepareView ( ) -Executes what is necessary to make the view() method work with content streaming. This includes things like processing template head tags. +Executes what is necessary to make the view() method work with content chunking. This includes things like processing template head tags. =cut diff --git a/lib/WebGUI/Asset/Wobject.pm b/lib/WebGUI/Asset/Wobject.pm index 7f276d670..9cc00cec7 100644 --- a/lib/WebGUI/Asset/Wobject.pm +++ b/lib/WebGUI/Asset/Wobject.pm @@ -579,10 +579,10 @@ sub www_view { return $self->session->privilege->noAccess(); } elsif ($self->session->var->get("adminOn") && $self->get("state") =~ /^trash/) { # show em trash $self->session->http->setRedirect($self->getUrl("func=manageTrash")); - return ""; + return undef; } elsif ($self->session->var->get("adminOn") && $self->get("state") =~ /^clipboard/) { # show em clipboard $self->session->http->setRedirect($self->getUrl("func=manageClipboard")); - return ""; + return undef; } else { # tell em it doesn't exist anymore $self->session->http->setStatus("410"); return WebGUI::Asset->getNotFound($self->session)->www_view; @@ -603,7 +603,7 @@ sub www_view { $self->session->output->print($head); $self->session->output->print($self->view); $self->session->output->print($foot); - return undef; + return "chunked"; } #------------------------------------------------------------------- diff --git a/lib/WebGUI/Asset/Wobject/Matrix.pm b/lib/WebGUI/Asset/Wobject/Matrix.pm index 5a7b92162..977e04f14 100644 --- a/lib/WebGUI/Asset/Wobject/Matrix.pm +++ b/lib/WebGUI/Asset/Wobject/Matrix.pm @@ -916,12 +916,12 @@ sub view { $var{'best.views.url'} = $self->formatURL("viewDetail",$data->{listingId}); $var{'best.views.count'} = $data->{views}; $var{'best.views.name'} = $data->{productName}; - my $data = $self->session->db->quickHashRef("select compares, productName, listingId from Matrix_listing + $data = $self->session->db->quickHashRef("select compares, productName, listingId from Matrix_listing where assetId=".$self->session->db->quote($self->getId)." and status='approved' order by compares desc limit 1"); $var{'best.compares.url'} = $self->formatURL("viewDetail",$data->{listingId}); $var{'best.compares.count'} = $data->{compares}; $var{'best.compares.name'} = $data->{productName}; - my $data = $self->session->db->quickHashRef("select clicks, productName, listingId from Matrix_listing + $data = $self->session->db->quickHashRef("select clicks, productName, listingId from Matrix_listing where assetId=".$self->session->db->quote($self->getId)." and status='approved' order by clicks desc limit 1"); $var{'best.clicks.url'} = $self->formatURL("viewDetail",$data->{listingId}); $var{'best.clicks.count'} = $data->{clicks}; diff --git a/lib/WebGUI/AssetVersioning.pm b/lib/WebGUI/AssetVersioning.pm index c74be7b89..a41fc4e1d 100644 --- a/lib/WebGUI/AssetVersioning.pm +++ b/lib/WebGUI/AssetVersioning.pm @@ -17,6 +17,7 @@ package WebGUI::Asset; use strict; use WebGUI::Paginator; use WebGUI::VersionTag; +use WebGUI::Search::Index; =head1 NAME diff --git a/lib/WebGUI/Search.pm b/lib/WebGUI/Search.pm index db9072785..15ec45c09 100644 --- a/lib/WebGUI/Search.pm +++ b/lib/WebGUI/Search.pm @@ -16,7 +16,6 @@ package WebGUI::Search; use strict; use WebGUI::Asset; -use WebGUI::SQL; =head1 NAME