lots of litlte bug fixes and tweaks
This commit is contained in:
parent
499981d092
commit
1c6fddb206
9 changed files with 25 additions and 0 deletions
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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};
|
||||
|
|
|
|||
|
|
@ -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 "";
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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")}).".");
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@ form variable C<classLimiter>. 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;
|
||||
|
|
|
|||
|
|
@ -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")}).".");
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue