}
sub _get_review_url {
- my ($class, $bug_id, $attach_id) = @_;
- return get_review_url(Bugzilla::Bug->check({ id => $bug_id, cache => 1 }), $attach_id);
+ my ($class, $bug_id, $attach_id, $use_abs_url) = @_;
+ return get_review_url(Bugzilla::Bug->check({ id => $bug_id, cache => 1 }), $attach_id, $use_abs_url);
}
sub page_before_template {
}
sub get_review_base {
+ my $use_abs_url = shift // 0;
my $base = Bugzilla->params->{'splinter_base'};
$base =~ s!/$!!;
- my $basepath = Bugzilla->localconfig->{basepath};
+ my $basepath = Bugzilla->localconfig->{$use_abs_url ? 'urlbase' : 'basepath'};
$basepath =~ s!/$!! if $base =~ "^/";
$base = $basepath . $base;
return $base;
}
sub get_review_url {
- my ($bug, $attach_id) = @_;
- my $base = get_review_base();
+ my ($bug, $attach_id, $use_abs_url) = @_;
+ my $base = get_review_base($use_abs_url);
my $bug_id = $bug->id;
return $base . ($base =~ /\?/ ? '&' : '?') . "bug=$bug_id&attachment=$attach_id";
}