more session related changes
This commit is contained in:
parent
16b9675b0c
commit
024514c549
106 changed files with 1498 additions and 1313 deletions
|
|
@ -870,7 +870,7 @@ Subscribes a user to this collaboration system.
|
|||
|
||||
sub subscribe {
|
||||
my $self = shift;
|
||||
WebGUI::Cache->new("wobject_".$self->getId."_".$self->session->user->profileField("userId"))->delete;
|
||||
WebGUI::Cache->new($self->session,"wobject_".$self->getId."_".$self->session->user->profileField("userId"))->delete;
|
||||
WebGUI::Grouping::addUsersToGroups([$self->session->user->profileField("userId")],[$self->get("subscriptionGroupId")]);
|
||||
}
|
||||
|
||||
|
|
@ -884,7 +884,7 @@ Unsubscribes a user from this collaboration system
|
|||
|
||||
sub unsubscribe {
|
||||
my $self = shift;
|
||||
WebGUI::Cache->new("wobject_".$self->getId."_".$self->session->user->profileField("userId"))->delete;
|
||||
WebGUI::Cache->new($self->session,"wobject_".$self->getId."_".$self->session->user->profileField("userId"))->delete;
|
||||
WebGUI::Grouping::deleteUsersFromGroups([$self->session->user->profileField("userId")],[$self->get("subscriptionGroupId")]);
|
||||
}
|
||||
|
||||
|
|
@ -1193,7 +1193,7 @@ sub www_viewRSS {
|
|||
|
||||
WebGUI::HTTP::setMimeType("text/xml");
|
||||
my $output = $self->processTemplate(\%var,$self->get("rssTemplateId"));
|
||||
WebGUI::Macro::process(\$output);
|
||||
WebGUI::Macro::process($self->session,\$output);
|
||||
return $output;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -419,7 +419,7 @@ sub getRecordTemplateVars {
|
|||
}
|
||||
if (not exists $data{value}) {
|
||||
my $defaultValue = $data{defaultValue};
|
||||
WebGUI::Macro::process(\$defaultValue);
|
||||
WebGUI::Macro::process($self->session,\$defaultValue);
|
||||
$data{value} = $defaultValue;
|
||||
}
|
||||
my $hidden = (($data{status} eq "hidden" && !$self->session->var->get("adminOn")) || ($data{isMailField} && !$self->get("mailData")));
|
||||
|
|
@ -463,7 +463,7 @@ sub getRecordTemplateVars {
|
|||
}
|
||||
if (not exists $data{value}) {
|
||||
my $defaultValue = $data{defaultValue};
|
||||
WebGUI::Macro::process(\$defaultValue);
|
||||
WebGUI::Macro::process($self->session,\$defaultValue);
|
||||
$data{value} = $defaultValue;
|
||||
}
|
||||
my $hidden = (($data{status} eq "hidden" && !$self->session->var->get("adminOn")) || ($data{isMailField} && !$self->get("mailData")));
|
||||
|
|
@ -579,7 +579,7 @@ sub sendEmail {
|
|||
my $self = shift;
|
||||
my $var = shift;
|
||||
my $message = $self->processTemplate($var,$self->get("emailTemplateId"));
|
||||
WebGUI::Macro::process(\$message);
|
||||
WebGUI::Macro::process($self->session,\$message);
|
||||
my ($to, $subject, $from, $bcc, $cc);
|
||||
foreach my $row (@{$var->{field_loop}}) {
|
||||
if ($row->{"field.name"} eq "to") {
|
||||
|
|
@ -1057,7 +1057,7 @@ sub www_process {
|
|||
}
|
||||
if ($row{status} eq "hidden") {
|
||||
$value = $row{defaultValue};
|
||||
WebGUI::Macro::process(\$value);
|
||||
WebGUI::Macro::process($self->session,\$value);
|
||||
}
|
||||
unless ($hadErrors) {
|
||||
my ($exists) = $self->session->db->quickArray("select count(*) from DataForm_entryData where DataForm_entryId=".$self->session->db->quote($entryId)."
|
||||
|
|
|
|||
|
|
@ -200,8 +200,8 @@ sub view {
|
|||
|
||||
return $self->processTemplate({},$self->get("templateId")) unless ($proxiedUrl ne "");
|
||||
|
||||
my $cachedContent = WebGUI::Cache->new($proxiedUrl,"URL");
|
||||
my $cachedHeader = WebGUI::Cache->new($proxiedUrl,"HEADER");
|
||||
my $cachedContent = WebGUI::Cache->new($self->session,$proxiedUrl,"URL");
|
||||
my $cachedHeader = WebGUI::Cache->new($self->session,$proxiedUrl,"HEADER");
|
||||
$var{header} = $cachedHeader->get;
|
||||
$var{content} = $cachedContent->get;
|
||||
unless ($var{content} && $self->session->env->get("REQUEST_METHOD")=~/GET/i) {
|
||||
|
|
|
|||
|
|
@ -483,7 +483,7 @@ sub www_preview {
|
|||
) . $nav->build . qq(</td></tr></table>);
|
||||
|
||||
# Because of the way the system is set up, the preview is cached. So let's remove it again...
|
||||
WebGUI::Cache->new($nav->{_identifier}."$session{page}{pageId}", "Navigation-".$self->session->config->getFilename)->delete;
|
||||
WebGUI::Cache->new($self->session,$nav->{_identifier}."$session{page}{pageId}", "Navigation-".$self->session->config->getFilename)->delete;
|
||||
|
||||
return _submenu($output,"preview");
|
||||
}
|
||||
|
|
|
|||
|
|
@ -293,7 +293,7 @@ sub _parsePlaceholderParams {
|
|||
} elsif ($type =~ /^query(\d)/) {
|
||||
$param = $self->{_query}{$1}{rowData}{$field};
|
||||
}
|
||||
WebGUI::Macro::process(\$param);
|
||||
WebGUI::Macro::process($self->session,\$param);
|
||||
push(@placeholderParams, $param);
|
||||
}
|
||||
return \@placeholderParams;
|
||||
|
|
@ -317,15 +317,15 @@ sub _processQuery {
|
|||
# Preprocess macros
|
||||
if ($self->{_query}{$nr}{preprocessMacros}) {
|
||||
$query = $self->{_query}{$nr}{dbQuery};
|
||||
WebGUI::Macro::process(\$query);
|
||||
WebGUI::Macro::process($self->session,\$query);
|
||||
} else {
|
||||
$query = $self->{_query}{$nr}{dbQuery};
|
||||
}
|
||||
|
||||
push(@{$self->{_debug_loop}},{'debug.output'=>WebGUI::International::get(17,"Asset_SQLReport").$query});
|
||||
push(@{$self->{_debug_loop}},{'debug.output'=>WebGUI::International::get('debug placeholder parameters',"Asset_SQLReport").join(",",@$placeholderParams)});
|
||||
my $dbLink = WebGUI::DatabaseLink->new($self->{_query}{$nr}{databaseLinkId});
|
||||
my $dbh = $dbLink->dbh;
|
||||
my $dbLink = WebGUI::DatabaseLink->new($self->session,$self->{_query}{$nr}{databaseLinkId});
|
||||
my $dbh = $dbLink->db;
|
||||
if (defined $dbh) {
|
||||
if ($query =~ /^select/i || $query =~ /^show/i || $query =~ /^describe/i) {
|
||||
my $url = $self->getUrl('func=view');
|
||||
|
|
|
|||
|
|
@ -242,7 +242,7 @@ sub _submenu {
|
|||
my $workarea = shift;
|
||||
my $title = shift;
|
||||
my $help = shift;
|
||||
my $ac = WebGUI::AdminConsole->new("editstocks");
|
||||
my $ac = WebGUI::AdminConsole->new($self->session,"editstocks");
|
||||
$ac->setHelp($help) if ($help);
|
||||
$ac->setIcon($self->getIcon);
|
||||
return $ac->render($workarea, $title);
|
||||
|
|
|
|||
|
|
@ -238,7 +238,7 @@ sub _normalize_items {
|
|||
sub _get_rss_data {
|
||||
my $url = shift;
|
||||
|
||||
my $cache = WebGUI::Cache->new('url:' . $url, 'RSS');
|
||||
my $cache = WebGUI::Cache->new($self->session,'url:' . $url, 'RSS');
|
||||
my $rss_serial = $cache->get;
|
||||
my $rss = {};
|
||||
if ($rss_serial) {
|
||||
|
|
@ -320,7 +320,7 @@ sub _assign_rss_dates {
|
|||
for my $item (@{$items}) {
|
||||
my $key = 'dates:' . ($item->{guid} || $item->{title} ||
|
||||
$item->{description} || $item->{link});
|
||||
my $cache = WebGUI::Cache->new($key, 'RSS');
|
||||
my $cache = WebGUI::Cache->new($self->session,$key, 'RSS');
|
||||
if (my $date = $cache->get()) {
|
||||
$item->{date} = $date;
|
||||
} else {
|
||||
|
|
@ -440,7 +440,7 @@ sub _get_items {
|
|||
|
||||
my $key=join(':',('aggregate', $displayMode,$hasTermsRegex,$maxHeadlines,$self->get('rssUrl')));
|
||||
|
||||
my $cache = WebGUI::Cache->new($key, 'RSS');
|
||||
my $cache = WebGUI::Cache->new($self->session,$key, 'RSS');
|
||||
my $items = Storable::thaw($cache->get());
|
||||
my @rss_feeds;
|
||||
if (!$items) {
|
||||
|
|
|
|||
|
|
@ -268,9 +268,9 @@ sub view {
|
|||
# snag our SOAP call and preprocess if needed
|
||||
if ($self->get('preprocessMacros')) {
|
||||
$call = $self->get("callMethod");
|
||||
WebGUI::Macro::process(\$call);
|
||||
WebGUI::Macro::process($self->session,\$call);
|
||||
$param_str = $self->get("params");
|
||||
WebGUI::Macro::process(\$param_str);
|
||||
WebGUI::Macro::process($self->session,\$param_str);
|
||||
} else {
|
||||
$call = $self->get('callMethod');
|
||||
$param_str = $self->get('params');
|
||||
|
|
@ -310,7 +310,7 @@ sub view {
|
|||
} else {
|
||||
$cache_key = _create_cache_key($self, $call, $param_str);
|
||||
}
|
||||
$cache = WebGUI::Cache->new($cache_key,
|
||||
$cache = WebGUI::Cache->new($self->session,$cache_key,
|
||||
WebGUI::International::get(4, "Asset_WSClient"));
|
||||
|
||||
# passing a form param WSClient_skipCache lets us ignore even good caches
|
||||
|
|
|
|||
|
|
@ -84,7 +84,7 @@ Accepts an array ref of locations, and returns
|
|||
sub _getLocationData {
|
||||
my $self = shift;
|
||||
my $location = shift;
|
||||
my $cache = WebGUI::Cache->new(["weatherLocation",$location]);
|
||||
my $cache = WebGUI::Cache->new($self->session,["weatherLocation",$location]);
|
||||
my $locData = $cache->get;
|
||||
unless ($locData->{cityState}) {
|
||||
my $oldagent;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue