fix confirm sub in Wobject.pm

This commit is contained in:
Colin Kuskie 2006-06-20 20:17:37 +00:00
parent 5a7b73db82
commit 2bf7059e10
2 changed files with 6 additions and 5 deletions

View file

@ -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.

View file

@ -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 = '<h1>'.$i18n->get(42).'</h1>';
$output .= $_[1].'<p>';
$output .= '<div align="center"><a href="'.$_[2].'">'.$i18n->get(44).'</a>';
$output .= $message.'<p>';
$output .= '<div align="center"><a href="'.$yesURL.'">'.$i18n->get(44).'</a>';
$output .= ' &nbsp; <a href="'.$noURL.'">'.$i18n->get(45).'</a></div>';
return $output;
}