diff --git a/docs/upgrades/7fixup.pl b/docs/upgrades/7fixup.pl index 533c03e05..2b2bfe9b2 100644 --- a/docs/upgrades/7fixup.pl +++ b/docs/upgrades/7fixup.pl @@ -17,11 +17,19 @@ addPrototypes(); rearrangeImportNode(); addNewStyles(); addRobots(); +#deleteOldContent(); +#addNewContent(); $versionTag->commit; purgeOldRevisions(); finish($session); # this line required +#------------------------------------------------- +sub deleteOldContent { + print "\tDeleting old content\n"; +} + + #------------------------------------------------- sub addRobots { print "\tAdding robots.txt file.\n"; @@ -70,6 +78,7 @@ sub addNewStyles { next if $file eq ".."; next if $file eq "."; $assetCounter++; + print "\t\t\tAdding $file\n"; if ($file =~ m/\.[png|jpg|gif]+$/) { my $asset = $folder->addChild({ className=>"WebGUI::Asset::File::Image", diff --git a/docs/upgrades/upgrade_6.8.8-6.99.0.pl b/docs/upgrades/upgrade_6.8.8-6.99.0.pl index 99324711e..af65e0867 100644 --- a/docs/upgrades/upgrade_6.8.8-6.99.0.pl +++ b/docs/upgrades/upgrade_6.8.8-6.99.0.pl @@ -826,6 +826,7 @@ sub addSearchEngine { } $deleteWobject->finish; $deleteAssetData->finish; + $session->config->deleteFromArray("assets","WebGUI::Asset::Wobject::IndexedSearch"); $session->db->write("drop table if exists IndexedSearch"); $session->db->write("drop table if exists IndexedSearch_default"); $session->db->write("drop table if exists IndexedSearch_default_data"); diff --git a/lib/WebGUI/AdminConsole.pm b/lib/WebGUI/AdminConsole.pm index 066f28b30..02497f5de 100644 --- a/lib/WebGUI/AdminConsole.pm +++ b/lib/WebGUI/AdminConsole.pm @@ -420,6 +420,7 @@ A string that defaults to _function's title. sub render { my $self = shift; + $self->session->http->setCacheControl("none"); my %var; $var{"application.workarea"} = shift; $var{"application.title"} = shift || $self->{_function}{title}; diff --git a/lib/WebGUI/Operation/Admin.pm b/lib/WebGUI/Operation/Admin.pm index 7d4c6a3a6..252503f23 100644 --- a/lib/WebGUI/Operation/Admin.pm +++ b/lib/WebGUI/Operation/Admin.pm @@ -51,6 +51,7 @@ via WebGUI::Session::Var::switchAdminOff() sub www_switchOffAdmin { my $session = shift; return "" unless ($session->user->isInGroup(12)); + $session->http->setCacheControl("none"); $session->var->switchAdminOff(); return ""; } @@ -66,6 +67,7 @@ If the current user is in the Turn On Admin Group, then allow them to turn on Ad sub www_switchOnAdmin { my $session = shift; return "" unless ($session->user->isInGroup(12)); + $session->http->setCacheControl("none"); $session->var->switchAdminOn(); return ""; } diff --git a/lib/WebGUI/Operation/Auth.pm b/lib/WebGUI/Operation/Auth.pm index 59ad3f784..404d5d773 100644 --- a/lib/WebGUI/Operation/Auth.pm +++ b/lib/WebGUI/Operation/Auth.pm @@ -59,6 +59,7 @@ is returned. sub www_auth { my $session = shift; + $session->http->setCacheControl("none"); my $auth; ($auth) = $session->db->quickArray("select authMethod from users where username=".$session->db->quote($session->form->process("username"))) if($session->form->process("username")); my $authMethod = getInstance($session,$auth); diff --git a/lib/WebGUI/Operation/Cron.pm b/lib/WebGUI/Operation/Cron.pm index 940ac8b8b..a78cae2a5 100644 --- a/lib/WebGUI/Operation/Cron.pm +++ b/lib/WebGUI/Operation/Cron.pm @@ -253,6 +253,7 @@ Checks to ensure the requestor is who we think it is, and then executes a cron j sub www_runCronJob { my $session = shift; $session->http->setMimeType("text/plain"); + $session->http->setCacheControl("none"); unless (isInSubnet($session->env->get("REMOTE_ADDR"), $session->config->get("spectreSubnets"))) { $session->errorHandler->security("make a Spectre cron job runner request, but we're only allowed to accept requests from ".join(",",@{$session->config->get("spectreSubnets")})."."); diff --git a/lib/WebGUI/Operation/FormHelpers.pm b/lib/WebGUI/Operation/FormHelpers.pm index e456a4820..c45da6ccb 100644 --- a/lib/WebGUI/Operation/FormHelpers.pm +++ b/lib/WebGUI/Operation/FormHelpers.pm @@ -36,6 +36,7 @@ form variable C. A crumb trail is provided for navigation. sub www_formAssetTree { my $session = shift; + $session->http->setCacheControl("none"); my $base = WebGUI::Asset->newByUrl($session) || WebGUI::Asset->getRoot($session); my @crumb; my $ancestors = $base->getLineage(["self","ancestors"],{returnObjects=>1}); @@ -73,6 +74,7 @@ Asset picker for the rich editor. sub www_richEditPageTree { my $session = shift; + $session->http->setCacheControl("none"); my $i18n = WebGUI::International->new($session); my $f = WebGUI::HTMLForm->new($session,-action=>"#",-extras=>'name"linkchooser"'); $f->text( @@ -138,6 +140,7 @@ Each link display a thumbnail of the image via www_richEditViewThumbnail. sub www_richEditImageTree { my $session = shift; + $session->http->setCacheControl("none"); my $base = WebGUI::Asset->newByUrl($session) || WebGUI::Asset->getRoot($session); my @crumb; my $ancestors = $base->getLineage(["self","ancestors"],{returnObjects=>1}); @@ -190,6 +193,7 @@ URL in the session object is used to determine which Image is used. sub www_richEditViewThumbnail { my $session = shift; + $session->http->setCacheControl("none"); my $image = WebGUI::Asset->newByUrl($session); my $i18n = WebGUI::International->new($session); $session->style->useEmptyStyle("1"); @@ -222,6 +226,7 @@ Returns a form to add a folder using the rich editor. The purpose of this featur sub www_richEditAddFolder { my $session = shift; + $session->http->setCacheControl("none"); my $i18n = WebGUI::International->new($session, 'Operation_FormHelpers'); my $f = WebGUI::HTMLForm->new($session); $f->hidden( @@ -254,6 +259,7 @@ Creates a directory under the current asset. The filename should be specified in sub www_richEditAddFolderSave { my $session = shift; + $session->http->setCacheControl("none"); # get base url my $base = WebGUI::Asset->newByUrl($session) || WebGUI::Asset->getRoot($session); # check if user can edit the current asset @@ -303,6 +309,7 @@ Returns a form to add an image using the rich editor. The purpose of this featur sub www_richEditAddImage { my $session = shift; + $session->http->setCacheControl("none"); my $i18n = WebGUI::International->new($session, 'Operation_FormHelpers'); my $f = WebGUI::HTMLForm->new($session); $f->hidden( @@ -335,6 +342,7 @@ Creates an Image asset under the current asset. The filename should be specified sub www_richEditAddImageSave { my $session = shift; + $session->http->setCacheControl("none"); # get base url my $base = WebGUI::Asset->newByUrl($session) || WebGUI::Asset->getRoot($session); #my $base = $session->asset; diff --git a/lib/WebGUI/Operation/Workflow.pm b/lib/WebGUI/Operation/Workflow.pm index 3c19ffaec..ffa62966a 100644 --- a/lib/WebGUI/Operation/Workflow.pm +++ b/lib/WebGUI/Operation/Workflow.pm @@ -358,6 +358,7 @@ Checks to ensure the requestor is who we think it is, and then executes a workfl sub www_runWorkflow { my $session = shift; $session->http->setMimeType("text/plain"); + $session->http->setCacheControl("none"); unless (isInSubnet($session->env->get("REMOTE_ADDR"), $session->config->get("spectreSubnets"))) { $session->errorHandler->security("make a Spectre workflow runner request, but we're only allowed to accept requests from ".join(",",@{$session->config->get("spectreSubnets")})."."); diff --git a/lib/WebGUI/Session/Style.pm b/lib/WebGUI/Session/Style.pm index 74236ca92..52f1f18f5 100644 --- a/lib/WebGUI/Session/Style.pm +++ b/lib/WebGUI/Session/Style.pm @@ -378,6 +378,7 @@ The content to be wrappered. sub userStyle { my $self = shift; my $output = shift; + $self->session->http->setCacheControl("none"); if ($output) { return $self->process($output,$self->session->setting->get("userFunctionStyleId")); } else {