From 2bf7059e10addeaee9f044bc8d2160e2f203e48d Mon Sep 17 00:00:00 2001 From: Colin Kuskie Date: Tue, 20 Jun 2006 20:17:37 +0000 Subject: [PATCH] fix confirm sub in Wobject.pm --- docs/changelog/6.x.x.txt | 1 + lib/WebGUI/Asset/Wobject.pm | 10 +++++----- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/docs/changelog/6.x.x.txt b/docs/changelog/6.x.x.txt index 91ab6489f..ab1abb04f 100644 --- a/docs/changelog/6.x.x.txt +++ b/docs/changelog/6.x.x.txt @@ -3,6 +3,7 @@ - fix: Edit button missing in timetracker projects - fix: Upgrade from 6.8.10 to 6.99.4 failed - fix: Missing label in HTTP Proxy: Filter Content + - fix: Wobject.pm confirm() is broken - Fixed a memory leak in Spectre that could cause it to double in size roughly every 30 hours under certain conditions. diff --git a/lib/WebGUI/Asset/Wobject.pm b/lib/WebGUI/Asset/Wobject.pm index 732e05d8a..98aa6eca4 100644 --- a/lib/WebGUI/Asset/Wobject.pm +++ b/lib/WebGUI/Asset/Wobject.pm @@ -164,13 +164,13 @@ A comparison expression to be used when checking whether the action should be al =cut sub confirm { - my $self = shift; - return $self->session->privilege->vitalComponent() if ($_[4]); - my $noURL = $_[3] || $_[0]->getUrl; + my ($self, $message, $yesURL, $noURL, $vitalComparison) = @_; + return $self->session->privilege->vitalComponent() if ($vitalComparison); + $noURL = $noURL || $self->getUrl; my $i18n = WebGUI::International->new($self->session,'Asset_Wobject'); my $output = '

'.$i18n->get(42).'

'; - $output .= $_[1].'

'; - $output .= '

'.$i18n->get(44).''; + $output .= $message.'

'; + $output .= '

'.$i18n->get(44).''; $output .= '   '.$i18n->get(45).'
'; return $output; }