more session related bug fixes
This commit is contained in:
parent
a6dd6c89e0
commit
297b9f8487
6 changed files with 10 additions and 6 deletions
|
|
@ -78,7 +78,7 @@ sub secureEval {
|
|||
'WebGUI::International::get' => sub {$i18n->get(@_)},
|
||||
'WebGUI::International::getLanguages' => sub { $i18n->getLanguages(@_) },
|
||||
'$session->datetime->epochToHuman' => sub { $session->datetime->epochToHuman(@_) },
|
||||
'WebGUI::Icon::getToolbarOptions' => sub { WebGUI::Icon::getToolbarOptions(@_) },
|
||||
'WebGUI::Icon::getToolbarOptions' => sub { $session->icon->getToolbarOptions() },
|
||||
);
|
||||
foreach my $function (keys %trusted ) {
|
||||
while ($code =~ /($function\(([^)]*)\)\s*;*)/g) {
|
||||
|
|
|
|||
|
|
@ -149,7 +149,7 @@ sub delete {
|
|||
my $self = shift;
|
||||
my $urlParams = shift;
|
||||
my $pageURL = shift || $self->session->url->getRequestedUrl;
|
||||
$confirmText = shift;
|
||||
my $confirmText = shift;
|
||||
if($confirmText) {
|
||||
$confirmText = qq| onclick="return confirm('$confirmText')" |;
|
||||
}
|
||||
|
|
@ -167,6 +167,7 @@ Generates an icon that can be used to drag content.
|
|||
=cut
|
||||
|
||||
sub drag {
|
||||
my $self = shift;
|
||||
return '<img id="dragTrigger" class="dragTrigger" src="'.$self->_getBaseURL().'drag.gif" align="middle" border="0" alt="'.WebGUI::International->new($self->session,'Icon')->get('Drag').'" title="'.WebGUI::International->new($self->session,'Icon')->get('Drag').'" />';
|
||||
}
|
||||
|
||||
|
|
@ -231,6 +232,7 @@ Returns a hash reference containing the list of toolbar icon sets to be selected
|
|||
sub getToolbarOptions {
|
||||
my %options;
|
||||
tie %options, 'Tie::IxHash';
|
||||
my $self = shift;
|
||||
$options{useLanguageDefault} = WebGUI::International->new($self->session,'Icon')->get(1084);
|
||||
my $dir = $self->session->config->get("extrasPath")."/toolbar";
|
||||
opendir (DIR,$dir) or $self->session->errorHandler->warn("Can't open toolbar directory!");
|
||||
|
|
|
|||
|
|
@ -99,7 +99,7 @@ A reference to the current WebGUI::Session.
|
|||
=cut
|
||||
|
||||
sub new {
|
||||
my $class = shift
|
||||
my $class = shift;
|
||||
my $session = shift;
|
||||
my $settings = $session->db->buildHashRef("select * from settings");
|
||||
bless {_settings=>$settings, _session=>$session}, $class;
|
||||
|
|
@ -157,6 +157,7 @@ The value of the setting.
|
|||
=cut
|
||||
|
||||
sub set {
|
||||
my $self = shift;
|
||||
my $name = shift;
|
||||
my $value = shift;
|
||||
$self->{_settings}{$name} = $value;
|
||||
|
|
|
|||
|
|
@ -125,6 +125,7 @@ Returns a reference to the current session.
|
|||
=cut
|
||||
|
||||
sub session {
|
||||
my $self = shift;
|
||||
return $self->{_session};
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ sub process {
|
|||
my %var;
|
||||
$var{'body.content'} = shift;
|
||||
my $templateId = shift;
|
||||
if ($self->{_makePrintable} && exists $self->session->asset) {
|
||||
if ($self->{_makePrintable} && $self->session->asset) {
|
||||
$templateId = $self->session->asset->get("printableStyleTemplateId");
|
||||
my $currAsset = $self->session->asset;
|
||||
until ($templateId) {
|
||||
|
|
|
|||
|
|
@ -133,7 +133,7 @@ sub gateway {
|
|||
my $url = $self->session->config->get("gateway").'/'.$pageUrl;
|
||||
$url =~ s/\/+/\//g;
|
||||
if ($self->session->setting->get("preventProxyCache") == 1) {
|
||||
$url = $self->append($url,"noCache=".randint(0,1000).';'$self->session->datetime->time());
|
||||
$url = $self->append($url,"noCache=".randint(0,1000).';'.$self->session->datetime->time());
|
||||
}
|
||||
if ($pairs) {
|
||||
$url = $self->append($url,$pairs);
|
||||
|
|
@ -282,7 +282,7 @@ sub page {
|
|||
}
|
||||
$url .= $self->gateway($self->session->asset ? $self->session->asset->get("url") : $self->getRequestedUrl);
|
||||
if ($self->session->setting->get("preventProxyCache") == 1 && !$skipPreventProxyCache) {
|
||||
$url = $self->append($url,"noCache=".randint(0,1000).';'$self->session->datetime->time());
|
||||
$url = $self->append($url,"noCache=".randint(0,1000).';'.$self->session->datetime->time());
|
||||
}
|
||||
if ($pairs) {
|
||||
$url = $self->append($url,$pairs);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue